source: skype/README @ a25bddf

Last change on this file since a25bddf was a25bddf, checked in by Miklos Vajna <vmiklos@…>, at 2009-04-29T17:36:52Z

add filetransfer bug

  • Property mode set to 100644
File size: 12.6 KB
RevLine 
[0c60f96]1= Skype plugin for BitlBee
[7f1cf70]2Miklos Vajna <vmiklos-at-vmiklos-dot-hu>
[afe221f]3
[56e4ac4]4== Status
5
[9f829c4]6[quote, Wilmer van der Gaast (author of BitlBee)]
[4eaadf6]7____
8Okay, this exists now, with lots of thanks to vmiklos for his *excellent*
9work!!
10
11It's not in the main BitlBee and it'll never be for various reasons, but
12because it's a plugin that shouldn't be a problem.
13____
14
[56e4ac4]15One day I browsed the BitlBee bugtracker and found
16http://bugs.bitlbee.org/bitlbee/ticket/82[this] ticket. Then after a while I
[1138b25]17returned and saw that it was still open. So I wrote it.
[56e4ac4]18
[15e2200]19It's pretty stable (one day I wanted to restart it because of an upgrade
20and just noticed it was running for 2+ months without crashing), I use
21it for my daily work. Being a plug-in, no patching is required, you can
22just install it after installing BitlBee itself.
[75742cc]23
[4c3a4c8]24NOTE: You will see that this implementation of the Skype plug-in still requires
[54c269d]25a Skype instance to be running. This is because I'm not motivated to reverse
26engineer Skype's
27http://en.wikipedia.org/wiki/Skype_Protocol#Obfuscation_Layer[obfuscation
28layer]. (Not mentioning that you should ask your lawyer about if it is legal or
29not..)
30
[22d97b4]31== Requirements
32
[75d5e71]33* Skype >= 1.4.0.99. The latest version I've tested is 2.0.0.72.
[1f59f2f]34* BitlBee >= @BITLBEE_VERSION@. Use old versions (0.5.1 or earlier) if
35  you have older BitlBee installed.
[eb39102]36* Skype4Py >= 0.9.28.7. Previous versions won't work due to API changes.
[7199b74]37  The latest version I've tested is 1.0.31.0.
[d276c9a]38
[c60b864]39* Python >= 2.5. Skype4Py does not work with 2.4.
[e49da25]40* PyGObject >= 2.8.0. Older versions are part of PyGTK. (And you don't want to
41  install GTK for nothing, right?)
[b0d40f5]42* pyopenssl or python-gnutls.
[22d97b4]43
[df1a59d4]44`bitlbee-skype` has been tested under Linux and Mac OS X. Skype and Skype4py is
45available under Windows, too, so it probably works, but this has not been tested.
[760ed1f]46
[9e03e55]47== How to set it up
[afe221f]48
[751b149]49Before you start. The setup is the following: BitlBee can't connect directly to
50Skype servers (the company's ones). It needs a running Skype client to do so.
51In fact BitlBee will connect to `skyped` (a tcp server, provided in this
[4c3a4c8]52package) and `skyped` will connect to to your Skype client.
[751b149]53
[d0a6a8c]54The benefit of this architecture is that you can run Skype and `skyped`
55on a machine different to the one where you run BitlBee (it can be even
56a public server) and/or your IRC client.
[7e4f0ca1]57
[d0a6a8c]58NOTE: The order is important. First `skyped` starts Skype. Then `skyped`
59connects to Skype, finally BitlBee can connect to `skyped`.
60
61=== Installing under Frugalware
62
63- Install the necessary packages:
[11eed8f]64
[36fbaa0]65----
[1d14818]66# pacman-g2 -S bitlbee-skype
[36fbaa0]67----
68
[4966d841]69and you don't have to compile anything manually.
70
[d0a6a8c]71=== Installing under Debian
72
73- Install the necessary development package:
[4966d841]74
75----
[88c2cc3]76# apt-get install bitlbee-dev python-skype python-gobject-dev python-gnutls
[4966d841]77----
78
[88c2cc3]79and you have to install `bitlbee-skype` from source.
[4966d841]80
[720ae58]81=== Installing under OS X
82
83- Install the necessary packages from ports:
84
85NOTE: You have to edit the Portfile manually to include the install-dev target,
86just append install-dev after install-etc.
87
88----
89# port -v install bitlbee
90# port -v install py25-gobject
91----
92
93and you have to install `bitlbee-skype`, `skype4py` and `python-gnutls` from
94source.
95
[d0a6a8c]96=== Installing from source
97
[56d88ba]98NOTE: bitlbee-skype by default builds and installs skyped and the
99plugin. In case you just want to install the plugin for a public server
[cc5f8ac]100or you want to use skyped with a public server (like
101`bitlbee1.asnetinc.net`), you don't need both.
[56d88ba]102
103- You need the latest stable BitlBee release (unless you want to use a
104  public server):
[afe221f]105
[0c60f96]106----
[1f59f2f]107$ wget http://get.bitlbee.org/src/bitlbee-@BITLBEE_VERSION@.tar.gz
108$ tar xf bitlbee-@BITLBEE_VERSION@.tar.gz
109$ cd bitlbee-@BITLBEE_VERSION@
[0c60f96]110----
[afe221f]111
112- Now compile and install it:
113
[0c60f96]114----
[ccb50f5]115$ ./configure
116$ make
117# make install install-dev
[0c60f96]118----
[afe221f]119
[56d88ba]120- To install http://skype4py.sourceforge.net/[Skype4Py] from source
121  (unless you want to install the plugin for a public server):
122
123----
124$ tar -zxvf Skype4Py-x.x.x.x.tar.gz
125$ cd Skype4Py-x.x.x.x
126# python setup.py install
127----
128
[2a8d790]129- To install http://pypi.python.org/pypi/python-gnutls[python-gnutls] from source
130  (unless you want to install the plugin for a public server):
131
132----
133$ tar -zxvf python-gnutls-x.x.x.tar.gz
134$ cd python-gnutls-x.x.x
135# python setup.py install
136----
137
[720ae58]138NOTE: On OS X you will need the following hacks first:
139
140----
141$ export LD_LIBRARY_PATH=/opt/local/lib
142$ export CFLAGS="-I/opt/local/include"
143$ export LDFLAGS="-L/opt/local/lib"
144----
145
[21a387fd]146- Get the plugin code (in an empty dir, or whereever you want, it does
147  not matter):
[afe221f]148
[0c60f96]149----
[3b495c0]150$ wget http://vmiklos.hu/project/bitlbee-skype/bitlbee-skype-@VERSION@.tar.gz
151$ tar xf bitlbee-skype-@VERSION@.tar.gz
152$ cd bitlbee-skype-@VERSION@
[0c60f96]153----
[afe221f]154
155- Compile and install it:
156
[0c60f96]157----
[ccb50f5]158$ ./configure
159$ make
160# make install
[0c60f96]161----
[afe221f]162
[21a387fd]163This will install the plugin to where BitlBee expects them, which is
164`/usr/local/lib/bitlbee` if you installed BitlBee from source.
165
[d0a6a8c]166=== Configuring
167
[1b48afb]168- Set up `~/.skyped/skyped.conf`: Create the `~/.skyped` directory, copy
169  `skyped.conf` and `skyped.cnf` from
170  `/usr/local/etc/skyped/skyped.conf` to `~/.skyped`, adjust `username`
171  and `password`. The `username` should be your Skype login and the
172  `password` can be whatever you want, but you will have to specify that
173  one when adding the Skype account to BitlBee (see later).
[e65ceaa]174
[52d377d]175NOTE: Here, and later - `/usr/local/etc` can be different on your installation
176if you used the `--sysconfdir` switch when running bitlbee-skype's `configure`.
177
178- Generate the SSL pem files:
179
180----
[1b48afb]181# cd ~/.skyped
[ccb50f5]182# openssl req -new -x509 -days 365 -nodes -config skyped.cnf -out skyped.cert.pem \
[52d377d]183        -keyout skyped.key.pem
184----
185
[1b48afb]186NOTE: Maybe you want to adjust the permissions in the `~/.skyped`
[ccb50f5]187dir. For example make it readable by just your user.
188
[b0d40f5]189- If both pyopenssl and python-gnutls are available, then python-gnutls
190  will be used. This behaviour can be overwritten by:
191
192----
193$ export SKYPED_NO_GNUTLS=1
194----
195
[833eaee]196- Start `skyped` (the tcp server):
[afe221f]197
[0c60f96]198----
[ccb50f5]199$ skyped
[0c60f96]200----
[ba20c39]201
[4c3a4c8]202- Start your `IRC` client, connect to BitlBee and add your account:
[7338d59]203
204----
[789d055]205account add skype <user> <pass>
206account set skype/server localhost
[7338d59]207----
208
[e65ceaa]209<user> should be your Skype account name, <pass> should be the one you declared
[10a42d9]210in `skyped.conf`. If you want to run skyped on a remote machine, replace
211`localhost` with the name of the machine.
[7338d59]212
[9ace502]213If you are running skyped on a custom port:
214
215----
216account set skype/port <port>
217----
218
[7996794]219If you want to set your full name (optional):
220
221----
222account set skype/display_name "John Smith"
223----
224
225If you want to see your skypeout contacts online as well (they are
226offline by default):
227
228----
229account set skype/skypeout_offline false
230----
231
[23b84e1]232== Setting up Skype in a VNC server (optional)
233
234Optionally, if you want to run Skype on a server, you might want to setup up
[4c3a4c8]235a `VNC` server as well. I used `tightvnc` but probably other `VNC` servers will
[23b84e1]236work, too.
237
238First run
239
240----
[ccb50f5]241$ vncpasswd ~/.vnc/passwd
[23b84e1]242----
243
244and create a password. You will need it at least once.
245
246Now create `~/.vnc/xstartup` with the following contents:
247
248----
249#!/bin/sh
250
[2dbb768]251twm
[23b84e1]252----
253
[57087df]254Adjust the permissions:
255
256----
[ccb50f5]257$ chmod +x ~/.vnc/xstartup
[57087df]258----
259
[23b84e1]260Then start the server:
261
262----
[ccb50f5]263$ vncserver
[23b84e1]264----
265
[ece66da]266Then connect to it, start an `xterm`, set up Skype (username, password,
267enable X11 API and allow the `Skype4Py` client), quit from Skype, and
268start `skyped`. If you want to watch its traffic, enable debug messages
269and foreground mode:
[23b84e1]270
[ece66da]271----
272$ skyped -n -d
273----
[dffa24f]274
[123e45a]275== Features
[b6d26ac]276
[adce2de]277- Download nicks and away statuses from Skype
[b6d26ac]278
[39a0d64]279- Noticing joins / parts while we're connected
280
[93ece66]281- Sending messages
282
[8dd21bb]283- Receiving messages
284
[72f697b]285- Receiving away status changes
286
[62bb4e4]287- `skyped` (the tcp daemon that is a gateway between Skype and tcp)
[ed2e37f]288
[62bb4e4]289- Error handling when `skyped` is not running and when it exits
[afe221f]290
[62bb4e4]291- Marking received messages as seen so that Skype won't say there are unread messages
[440665b]292
[6627d92]293- Adding / removing contacts
294
[23411c6]295- Set away state when you do a `/away`.
296
[d3cbd17]297- When you `account off`, Skype will set status to `Offline`
[348a3a2]298
[d3cbd17]299- When you `account on`, Skype will set status to `Online`
[348a3a2]300
[d3cbd17]301- Detect when somebody wants to add you and ask for confirmation
[8dd21bb]302
[df9255d]303- Detect when somebody wants to transfer a file
304
[d6a371e]305- Group chat support:
306
307  * Detect if we're invited
308
309  * Send / receive group chat messages
[93ece66]310
[ff58445]311  * Invite others (using `/invite <nick>`)
[c5dd164]312
[d6a371e]313  * Part from group chats
[c5dd164]314
[ff58445]315  * Starting a group chat (using `/j #nick`)
316
[e103e73]317- Topic changes in group chats:
318
319  * Show the current topic (if any) on join
320
321  * Notice when someone changes the topic
322
323  * Support changing the topic using `/topic`
324
[fb36492]325- Viewing the profile using the `info` command.
326
[a06a0a5]327- Handling skype actions (when the `CHATMESSAGE` has `EMOTED` type)
328
[6b266f6]329- Setting your display name using the `nick` command.
[a06a0a5]330
[ccb50f5]331- Running Skype on a machine different to BitlBee is possible, the
332  communication is encrypted.
333
[9aed2f1]334- Managing outgoing calls (with call duration at the end, including
335  SkypeOut calls if you use a phone number instead of a nick):
[2eb4b1f]336
337  * `account set skype/call nick`
338  * `account set -del skype/call`
[123e45a]339
[e0074cb]340- Managing incoming calls via questions, just like when you add / remove
341  contacts.
[c5dd164]342
[9aed2f1]343- Querying the current SkypeOut balance:
344
345  * `account set skype/balance query`
346
[08a355b]347- For debug purposes, it's possible to send any command to `skyped`. To
348  achieve this, you need to:
349
350  * `account set skype/skypeconsole true`
351
352  * then writing `skypeconsole: <command>` will work in the control
353    channel.
354
[b820226]355  * `account set skype/skypeconsole_receive true` will make the
356    `skypeconsole` account dump all the recieved raw traffic for you
357
[5acf9ab]358- If you want to automatically join bookmarked groupchats right after
359  you logged in, do:
360
361  * `account set skype/auto_join true`
362
[e0074cb]363== What needs to be done (aka. TODO)
[846ceffb]364
[d6a371e]365- Notice if foo invites bar. Currently you can see only that bar joined.
366
[6344674]367- Public chats. See
368  link:https://developer.skype.com/jira/browse/SCL-381[this feature
369  request], this is because it is still not possible (under Linux) to
370  `join_chat` to a public chat..
[d6a371e]371
[c49820d]372- Add yasrd (Yet Another Skype-Related Daemon) to allow using a public
373  server for users who are behind NAT.
374
[0c60f96]375== I would like to have support for ...
376
[23b84e1]377If something does not work and it's not in the TODO section, then please
[e72d869]378contact me! Please also try the link:HACKING[git version] before reporting a bug, your
[80d9004]379problem may be already fixed there.
[23b84e1]380
381In fact, of course, I wrote this documentation after figured out how to do this
382setup, so maybe I left out some steps. If you needed 'any' additional tricks,
383then it would be nice to include them here.
[afe221f]384
[f78f949]385== Known bugs
386
[a25bddf]387- File transfers are view-only from BitlBee. Quoting the
388  https://developer.skype.com/Docs/ApiDoc/FILETRANSFER_object[relevant
389  documentation]: 'File transfers cannot be initiated nor accepted via
390  API commands.' So it's not something I can add support for, sadly.
[f78f949]391
[0c60f96]392== Screenshots
393
[668a122]394You can reach some screenshots link:shot[here].
[ddd3502]395
[25d87e4]396== Additional resources
[a60c3c2]397
[25d87e4]398You can reach the Changelog link:Changelog[here], and a gitweb interface
[6f01885]399http://vmiklos.hu/gitweb/?p=bitlbee-skype.git[here].
[a60c3c2]400
[c09f90f]401The Skype API documentation is
402https://developer.skype.com/Docs/ApiDoc[here] if you're interested.
403
[ceee9c7]404
405== Testimonials
406
407----
[3e8a4ea]40800:56 < scathe> I like your skype plugin :)
[ceee9c7]409----
410
[6774d83]411----
412It's really working great so far.
413
414Good Job and thank you!
415Sebastian
416----
417
[587a921]418----
419Big respect for your work, i really appreciate it.
420
421Martin
422----
423
[93264f0]424----
425Thanks for bitlbee-skype. As a blind Linux user, I cannot use the
426skype GUI client because qt apps ar not accessible yet with the
427available screen readers. bitlbee-skype allows me to make use of skype
428without having to interact much with the GUI client, which helps me a
429lot.
430
431Lukas
432----
433
[e3d0b10]434----
43502:12 < newton> i must say, i love this little bee ;)
43602:15 < newton> tried it out today with the skype plugin, good work!
437----
438
[df482d4]439----
44018:10 < miCSu> it works fine
441----
442
[3e8a4ea]443----
44413:56 < seo> i just want to thank you :)
44513:56 < seo> for bitlbee-skype
44613:57 < seo> it's working very well, so, again, thank you for your work, and for sharing it
447----
448
[8cb17ff]449----
45022:16 < ecraven> vmiklos: thanks a lot for the skype plugin for bitlbee!
451----
452
[8ee6def]453----
454I'm blind and so I have to use a screen reader, in my case Gnome-Orca.
455But since Skype is written in QT, while Orca uses gtk+, I have no direct
456access to the Skype interface. That's why I desided to use Skyped and
457Erc.
458The text console is fully accessible.
459Thank you very much.
460
461Hermann
462----
463
[b9f2894]464----
465i love that bitlbeeplugin. big thx for that.
466
467michael
468----
469
[65e4020]470== Thanks
471
[37ae52a]472to the following people:
[65e4020]473
[e49da25]474* Wilmer van der Gaast, for answering questions about the BitlBee plugin interface
[65e4020]475
[56a3616]476* Arkadiusz Wahlig, author of skype4py, for making suggestions to skyped
[65e4020]477
[9834597]478* Gabor Adam Toth (tg), for noticing extra code is needed to handle multiline
479  messages
480
481* Cristobal Palmer (tarheelcoxn), for helping to testing the plugin in a
482  timezone different to mine
[65e4020]483
[4834307]484* Risko Gergely, for his SkypeOut ideas
485
[437ddf5]486* people on `#bitlbee` for feedback
487
[eb9cbb8]488Back to my link:/projects[projects page].
489
[0c60f96]490// vim: ft=asciidoc
Note: See TracBrowser for help on using the repository browser.