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