source: skype/README @ 1f4fc80

Last change on this file since 1f4fc80 was c29b62b, checked in by Miklos Vajna <vmiklos@…>, at 2009-12-09T12:02:47Z

document how to build plugins for 1.2.4

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