# pacman-g2 -S bitlbee-skype
Okay, this exists now, with lots of thanks to vmiklos for his excellent work!!
It’s not in the main BitlBee and it’ll never be for various reasons, but because it’s a plugin that shouldn’t be a problem.
One day I browsed the BitlBee bugtracker and found this ticket. Then after a while I returned and saw that it was still open. So I wrote it.
It’s pretty stable (one day I wanted to restart it because of an upgrade and just noticed it was running for 2+ months without crashing), I use it for my daily work. Being a plug-in, no patching is required, you can just install it after installing BitlBee itself.
|
Note
|
You will see that this implementation of the Skype plug-in still requires a Skype instance to be running. This is because I’m not motivated to reverse engineer Skype’s obfuscation layer. (Not mentioning that you should ask your lawyer about if it is legal or not..) |
Skype >= 1.4.0.99. The latest version I’ve tested is 2.1.0.81.
BitlBee >= 1.2.4. Use old versions (0.5.1 or earlier) if you have older BitlBee installed.
Skype4Py >= 0.9.28.7. Previous versions won’t work due to API changes. The latest version I’ve tested is 1.0.32.0.
Python >= 2.5. Skype4Py does not work with 2.4.
PyGObject >= 2.8.0. Older versions are part of PyGTK. (And you don’t want to install GTK for nothing, right?)
pyopenssl or python-gnutls.
bitlbee-skype has been tested under Linux and Mac OS X. Skype and Skype4py is available under Windows, too, so it probably works, but this has not been tested.
Before you start. The setup is the following: BitlBee can’t connect directly to Skype servers (the company’s ones). It needs a running Skype client to do so. In fact BitlBee will connect to skyped (a tcp server, provided in this package) and skyped will connect to to your Skype client.
The benefit of this architecture is that you can run Skype and skyped on a machine different to the one where you run BitlBee (it can be even a public server) and/or your IRC client.
|
Note
|
The order is important. First skyped starts Skype. Then skyped connects to Skype, finally BitlBee can connect to skyped. |
Install the necessary packages:
# pacman-g2 -S bitlbee-skype
or
# apt-get install skyped bitlbee-plugin-skype
(the later from the experimental repo)
and you don’t have to compile anything manually.
Install the necessary packages from ports:
|
Note
|
You have to edit the Portfile manually to include the install-dev target, just append install-dev after install-etc. |
# port -v install bitlbee # port -v install py25-gobject
and you have to install bitlbee-skype, skype4py and python-gnutls from source.
|
Note
|
bitlbee-skype by default builds and installs skyped and the plugin. In case you just want to install the plugin for a public server or you want to use skyped with a public server (like bitlbee1.asnetinc.net), you don’t need both. |
You need the latest stable BitlBee release (unless you want to use a public server):
$ wget http://get.bitlbee.org/src/bitlbee-1.2.4.tar.gz $ tar xf bitlbee-1.2.4.tar.gz $ cd bitlbee-1.2.4
Backport r482 and r483 from bzr, to fix plugin support. If you don’t want to use bzr, you can find the patches here.
Now compile and install it:
$ ./configure $ make # make install install-dev
To install Skype4Py from source (unless you want to install the plugin for a public server):
$ tar -zxvf Skype4Py-x.x.x.x.tar.gz $ cd Skype4Py-x.x.x.x # python setup.py install
To install python-gnutls from source (unless you want to install the plugin for a public server):
$ tar -zxvf python-gnutls-x.x.x.tar.gz $ cd python-gnutls-x.x.x # python setup.py install
|
Note
|
On OS X you will need the following hacks first: |
$ export LD_LIBRARY_PATH=/opt/local/lib $ export CFLAGS="-I/opt/local/include" $ export LDFLAGS="-L/opt/local/lib"
Get the plugin code (in an empty dir, or whereever you want, it does not matter):
$ wget http://vmiklos.hu/project/bitlbee-skype/bitlbee-skype-0.8.0.tar.gz $ tar xf bitlbee-skype-0.8.0.tar.gz $ cd bitlbee-skype-0.8.0
Compile and install it:
$ ./configure $ make # make install
This will install the plugin to where BitlBee expects them, which is /usr/local/lib/bitlbee if you installed BitlBee from source.
Set up ~/.skyped/skyped.conf: Create the ~/.skyped directory, copy skyped.conf and skyped.cnf from /usr/local/etc/skyped/skyped.conf to ~/.skyped, adjust username and password. The username should be your Skype login and the password can be whatever you want, but you will have to specify that one when adding the Skype account to BitlBee (see later).
|
Note
|
Here, and later - /usr/local/etc can be different on your installation if you used the --sysconfdir switch when running bitlbee-skype’s configure. |
Generate the SSL pem files:
# cd ~/.skyped
# openssl req -new -x509 -days 365 -nodes -config skyped.cnf -out skyped.cert.pem \
-keyout skyped.key.pem
|
Note
|
Maybe you want to adjust the permissions in the ~/.skyped dir. For example make it readable by just your user. |
If both pyopenssl and python-gnutls are available, then python-gnutls will be used. This behaviour can be overwritten by:
$ export SKYPED_NO_GNUTLS=1
Start skyped (the tcp server):
$ skyped
Start your IRC client, connect to BitlBee and add your account:
account add skype <user> <pass> account set skype/server localhost
<user> should be your Skype account name, <pass> should be the one you declared in skyped.conf. If you want to run skyped on a remote machine, replace localhost with the name of the machine.
If you are running skyped on a custom port:
account set skype/port <port>
If you want to set your full name (optional):
account set skype/display_name "John Smith"
If you want to see your skypeout contacts online as well (they are offline by default):
account set skype/skypeout_offline false
Optionally, if you want to run Skype on a server, you might want to setup up a VNC server as well. I used tightvnc but probably other VNC servers will work, too.
First run
$ vncpasswd ~/.vnc/passwd
and create a password. You will need it at least once.
Now create ~/.vnc/xstartup with the following contents:
#!/bin/sh blackbox
Adjust the permissions:
$ chmod +x ~/.vnc/xstartup
Then start the server:
$ vncserver
Then connect to it, start an xterm, set up Skype (username, password, enable X11 API and allow the Skype4Py client), quit from Skype, and start skyped. If you want to watch its traffic, enable debug messages and foreground mode:
$ skyped -n -d
Download nicks and away statuses from Skype
Noticing joins / parts while we’re connected
Sending messages
Receiving messages
Receiving away status changes
skyped (the tcp daemon that is a gateway between Skype and tcp)
Error handling when skyped is not running and when it exits
Marking received messages as seen so that Skype won’t say there are unread messages
Adding / removing contacts
Set away state when you do a /away.
When you account off, Skype will set status to Offline
When you account on, Skype will set status to Online
Detect when somebody wants to add you and ask for confirmation
Detect when somebody wants to transfer a file
Group chat support:
Detect if we’re invited
Send / receive group chat messages
Invite others (using /invite <nick>)
Part from group chats
Starting a group chat (using /j #nick)
Topic changes in group chats:
Show the current topic (if any) on join
Notice when someone changes the topic
Support changing the topic using /topic
Viewing the profile using the info command.
Handling skype actions (when the CHATMESSAGE has EMOTED type)
Setting your display name using the nick command.
Running Skype on a machine different to BitlBee is possible, the communication is encrypted.
Managing outgoing calls (with call duration at the end, including SkypeOut calls if you use a phone number instead of a nick):
account set skype/call nick
account set -del skype/call
Managing incoming calls via questions, just like when you add / remove contacts.
Querying the current SkypeOut balance:
account set skype/balance query
For debug purposes, it’s possible to send any command to skyped. To achieve this, you need to:
account set skype/skypeconsole true
then writing skypeconsole: <command> will work in the control channel.
account set skype/skypeconsole_receive true will make the skypeconsole account dump all the recieved raw traffic for you
If you want to automatically join bookmarked groupchats right after you logged in, do:
account set skype/auto_join true
Edited messages are shown with the EDIT: prefix. If you don’t like this, you can set your own prefix using:
account set skype/edit_prefix "updated message:"
Notice if foo invites bar. Currently you can see only that bar joined.
Public chats. See this feature request, this is because it is still not possible (under Linux) to join_chat to a public chat..
Add yasrd (Yet Another Skype-Related Daemon) to allow using a public server for users who are behind NAT.
If something does not work and it’s not in the TODO section, then please contact me! Please also try the git version before reporting a bug, your problem may be already fixed there.
In fact, of course, I wrote this documentation after figured out how to do this setup, so maybe I left out some steps. If you needed any additional tricks, then it would be nice to include them here.
File transfers are view-only from BitlBee. Quoting the relevant documentation: File transfers cannot be initiated nor accepted via API commands. So it’s not something I can add support for, sadly.
You can reach some screenshots here.
The Skype API documentation is here if you’re interested.
00:56 < scathe> I like your skype plugin :)
It's really working great so far. Good Job and thank you! Sebastian
Big respect for your work, i really appreciate it. Martin
Thanks for bitlbee-skype. As a blind Linux user, I cannot use the skype GUI client because qt apps ar not accessible yet with the available screen readers. bitlbee-skype allows me to make use of skype without having to interact much with the GUI client, which helps me a lot. Lukas
02:12 < newton> i must say, i love this little bee ;) 02:15 < newton> tried it out today with the skype plugin, good work!
18:10 < miCSu> it works fine
13:56 < seo> i just want to thank you :) 13:56 < seo> for bitlbee-skype 13:57 < seo> it's working very well, so, again, thank you for your work, and for sharing it
22:16 < ecraven> vmiklos: thanks a lot for the skype plugin for bitlbee!
I'm blind and so I have to use a screen reader, in my case Gnome-Orca. But since Skype is written in QT, while Orca uses gtk+, I have no direct access to the Skype interface. That's why I desided to use Skyped and Erc. The text console is fully accessible. Thank you very much. Hermann
i love that bitlbeeplugin. big thx for that. michael
23:47 < krisfremen> thanks for creating this fabulous piece of software vmiklos :)
to the following people:
Wilmer van der Gaast, for answering questions about the BitlBee plugin interface
Arkadiusz Wahlig, author of skype4py, for making suggestions to skyped
Gabor Adam Toth (tg), for noticing extra code is needed to handle multiline messages
Cristobal Palmer (tarheelcoxn), for helping to testing the plugin in a timezone different to mine
Risko Gergely, for his SkypeOut ideas
people on #bitlbee for feedback
Back to my projects page.
Apache Server at vmiklos.hu Port 80Name Last modified Size Description
Parent Directory -
Changelog 08-Mar-2010 23:48 85K
HACKING 31-Aug-2009 17:56 332
Makefile 09-Dec-2009 13:02 2.3K
NEWS 27-Sep-2009 13:28 6.0K
README 08-Mar-2010 23:48 13K
asciidoc.conf 27-Sep-2009 13:22 595
bitlbee-skype-0.1.0...> 21-Aug-2007 21:14 74K
bitlbee-skype-0.1.0...> 21-Aug-2007 21:14 252
bitlbee-skype-0.1.1...> 22-Aug-2007 01:27 75K
bitlbee-skype-0.1.1...> 22-Aug-2007 01:27 252
bitlbee-skype-0.1.2...> 31-Aug-2007 00:56 76K
bitlbee-skype-0.1.2...> 31-Aug-2007 00:56 252
bitlbee-skype-0.1.3...> 04-Sep-2007 19:07 77K
bitlbee-skype-0.1.3...> 04-Sep-2007 19:07 252
bitlbee-skype-0.1.4...> 16-Sep-2007 00:27 79K
bitlbee-skype-0.1.4...> 16-Sep-2007 00:27 252
bitlbee-skype-0.2.0...> 07-Oct-2007 23:01 82K
bitlbee-skype-0.2.0...> 07-Oct-2007 23:01 252
bitlbee-skype-0.2.1...> 30-Oct-2007 15:29 83K
bitlbee-skype-0.2.1...> 30-Oct-2007 15:29 252
bitlbee-skype-0.2.2...> 20-Nov-2007 10:58 84K
bitlbee-skype-0.2.2...> 20-Nov-2007 10:58 252
bitlbee-skype-0.2.3...> 24-Nov-2007 00:51 84K
bitlbee-skype-0.2.3...> 24-Nov-2007 00:51 252
bitlbee-skype-0.2.4...> 14-Dec-2007 02:16 85K
bitlbee-skype-0.2.4...> 14-Dec-2007 02:16 252
bitlbee-skype-0.2.5...> 16-Dec-2007 23:43 88K
bitlbee-skype-0.2.5...> 16-Dec-2007 23:43 252
bitlbee-skype-0.2.6...> 10-Jan-2008 17:37 88K
bitlbee-skype-0.2.6...> 10-Jan-2008 17:37 252
bitlbee-skype-0.3.0...> 12-Jan-2008 21:28 92K
bitlbee-skype-0.3.0...> 12-Jan-2008 21:28 252
bitlbee-skype-0.3.1...> 21-Jan-2008 14:57 93K
bitlbee-skype-0.3.1...> 21-Jan-2008 14:57 252
bitlbee-skype-0.3.2...> 23-Feb-2008 03:46 94K
bitlbee-skype-0.3.2...> 23-Feb-2008 03:46 252
bitlbee-skype-0.4.0...> 29-Feb-2008 03:13 96K
bitlbee-skype-0.4.0...> 29-Feb-2008 03:13 252
bitlbee-skype-0.4.1...> 31-Mar-2008 02:38 97K
bitlbee-skype-0.4.1...> 31-Mar-2008 02:38 252
bitlbee-skype-0.4.2...> 20-Apr-2008 23:41 99K
bitlbee-skype-0.4.2...> 20-Apr-2008 23:41 260
bitlbee-skype-0.5.0...> 24-May-2008 03:02 101K
bitlbee-skype-0.5.0...> 24-May-2008 03:02 260
bitlbee-skype-0.5.1...> 18-Jun-2008 19:38 102K
bitlbee-skype-0.5.1...> 18-Jun-2008 19:38 260
bitlbee-skype-0.6.0...> 28-Jun-2008 02:15 102K
bitlbee-skype-0.6.0...> 28-Jun-2008 02:15 242
bitlbee-skype-0.6.1...> 05-Sep-2008 21:55 101K
bitlbee-skype-0.6.1...> 05-Sep-2008 21:55 242
bitlbee-skype-0.6.2...> 05-Sep-2008 22:06 101K
bitlbee-skype-0.6.2...> 05-Sep-2008 22:06 242
bitlbee-skype-0.6.3...> 08-Sep-2008 09:32 102K
bitlbee-skype-0.6.3...> 08-Sep-2008 09:32 242
bitlbee-skype-0.7.0...> 07-Jan-2009 01:38 107K
bitlbee-skype-0.7.0...> 07-Jan-2009 01:38 242
bitlbee-skype-0.7.1...> 13-Feb-2009 23:39 109K
bitlbee-skype-0.7.1...> 13-Feb-2009 23:39 242
bitlbee-skype-0.7.2...> 29-Apr-2009 19:26 124K
bitlbee-skype-0.7.2...> 29-Apr-2009 19:26 242
bitlbee-skype-0.8.0...> 27-Sep-2009 13:29 126K
bitlbee-skype-0.8.0...> 27-Sep-2009 13:30 242
checkpatch.pl 07-Dec-2009 15:11 72K
client.sh 21-Dec-2008 20:17 54
config.mak.in 05-Sep-2008 21:55 301
configure.ac 12-Dec-2009 01:19 2.1K
shot/ 07-Mar-2010 20:53 -
skype.c 08-Mar-2010 23:48 32K
skyped.cnf 12-Jan-2008 21:14 1.1K
skyped.conf.dist.in 19-May-2008 20:22 242
skyped.py 08-Mar-2010 23:48 9.5K
skyped.txt 27-Sep-2009 13:22 1.1K
t/ 07-Mar-2010 19:40 -