[0c60f96] | 1 | = Skype plugin for BitlBee |
---|
[7f1cf70] | 2 | Miklos Vajna <vmiklos-at-vmiklos-dot-hu> |
---|
[afe221f] | 3 | |
---|
[56e4ac4] | 4 | == Status |
---|
| 5 | |
---|
[4eaadf6] | 6 | [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 | |
---|
[56e4ac4] | 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 |
---|
[1138b25] | 17 | returned and saw that it was still open. So I wrote it. |
---|
[56e4ac4] | 18 | |
---|
[2042b56] | 19 | It's pretty stable, I use it for my daily work. Being a plug-in, no patching |
---|
[20994cb] | 20 | is required, you can just install it after installing BitlBee itself. |
---|
[75742cc] | 21 | |
---|
[4c3a4c8] | 22 | NOTE: You will see that this implementation of the Skype plug-in still requires |
---|
[54c269d] | 23 | a Skype instance to be running. This is because I'm not motivated to reverse |
---|
| 24 | engineer Skype's |
---|
| 25 | http://en.wikipedia.org/wiki/Skype_Protocol#Obfuscation_Layer[obfuscation |
---|
| 26 | layer]. (Not mentioning that you should ask your lawyer about if it is legal or |
---|
| 27 | not..) |
---|
| 28 | |
---|
[22d97b4] | 29 | == Requirements |
---|
| 30 | |
---|
[7987be8] | 31 | * Skype >= 1.4.0.99. The latest version I've tested is 2.0.0.68. |
---|
[039116a] | 32 | * BitlBee >= 1.2.1. Use old versions (<=0.5.1) if you have 1.2 or |
---|
| 33 | 1.1.1dev installed. |
---|
[eb39102] | 34 | * Skype4Py >= 0.9.28.7. Previous versions won't work due to API changes. |
---|
[d276c9a] | 35 | |
---|
[f7c6049] | 36 | NOTE: I had not had time to add support for 1.x yet. |
---|
[d276c9a] | 37 | |
---|
[c60b864] | 38 | * Python >= 2.5. Skype4Py does not work with 2.4. |
---|
[e49da25] | 39 | * PyGObject >= 2.8.0. Older versions are part of PyGTK. (And you don't want to |
---|
| 40 | install GTK for nothing, right?) |
---|
[b0d40f5] | 41 | * pyopenssl or python-gnutls. |
---|
[22d97b4] | 42 | |
---|
[df1a59d4] | 43 | `bitlbee-skype` has been tested under Linux and Mac OS X. Skype and Skype4py is |
---|
| 44 | available under Windows, too, so it probably works, but this has not been tested. |
---|
[760ed1f] | 45 | |
---|
[9e03e55] | 46 | == How to set it up |
---|
[afe221f] | 47 | |
---|
[751b149] | 48 | Before you start. The setup is the following: BitlBee can't connect directly to |
---|
| 49 | Skype servers (the company's ones). It needs a running Skype client to do so. |
---|
| 50 | In fact BitlBee will connect to `skyped` (a tcp server, provided in this |
---|
[4c3a4c8] | 51 | package) and `skyped` will connect to to your Skype client. |
---|
[751b149] | 52 | |
---|
[d0a6a8c] | 53 | The benefit of this architecture is that you can run Skype and `skyped` |
---|
| 54 | on a machine different to the one where you run BitlBee (it can be even |
---|
| 55 | a public server) and/or your IRC client. |
---|
[7e4f0ca1] | 56 | |
---|
[d0a6a8c] | 57 | NOTE: The order is important. First `skyped` starts Skype. Then `skyped` |
---|
| 58 | connects to Skype, finally BitlBee can connect to `skyped`. |
---|
| 59 | |
---|
| 60 | === Installing under Frugalware |
---|
| 61 | |
---|
| 62 | - Install the necessary packages: |
---|
[11eed8f] | 63 | |
---|
[36fbaa0] | 64 | ---- |
---|
[1d14818] | 65 | # pacman-g2 -S bitlbee-skype |
---|
[36fbaa0] | 66 | ---- |
---|
| 67 | |
---|
[4966d841] | 68 | and you don't have to compile anything manually. |
---|
| 69 | |
---|
[d0a6a8c] | 70 | === Installing under Debian |
---|
| 71 | |
---|
| 72 | - Install the necessary development package: |
---|
[4966d841] | 73 | |
---|
| 74 | ---- |
---|
| 75 | # apt-get install bitlbee-dev |
---|
| 76 | ---- |
---|
| 77 | |
---|
[5293707] | 78 | and you have to install `bitlbee-skype` and `skype4py` from source. |
---|
[4966d841] | 79 | |
---|
[d0a6a8c] | 80 | === Installing from source |
---|
| 81 | |
---|
| 82 | - You need the latest stable BitlBee release: |
---|
[afe221f] | 83 | |
---|
[0c60f96] | 84 | ---- |
---|
[36fbaa0] | 85 | $ wget http://get.bitlbee.org/src/bitlbee-1.2.tar.gz |
---|
| 86 | $ tar xf bitlbee-1.2.tar.gz |
---|
| 87 | $ cd bitlbee-1.2 |
---|
[0c60f96] | 88 | ---- |
---|
[afe221f] | 89 | |
---|
[d044a5a] | 90 | NOTE: You no longer need additional patches, as of version 1.1.1dev. |
---|
[b8b0bfd] | 91 | |
---|
[afe221f] | 92 | - Now compile and install it: |
---|
| 93 | |
---|
[0c60f96] | 94 | ---- |
---|
[ccb50f5] | 95 | $ ./configure |
---|
| 96 | $ make |
---|
| 97 | # make install install-dev |
---|
[0c60f96] | 98 | ---- |
---|
[afe221f] | 99 | |
---|
[21a387fd] | 100 | - Get the plugin code (in an empty dir, or whereever you want, it does |
---|
| 101 | not matter): |
---|
[afe221f] | 102 | |
---|
[0c60f96] | 103 | ---- |
---|
[3b495c0] | 104 | $ wget http://vmiklos.hu/project/bitlbee-skype/bitlbee-skype-@VERSION@.tar.gz |
---|
| 105 | $ tar xf bitlbee-skype-@VERSION@.tar.gz |
---|
| 106 | $ cd bitlbee-skype-@VERSION@ |
---|
[0c60f96] | 107 | ---- |
---|
[afe221f] | 108 | |
---|
| 109 | - Compile and install it: |
---|
| 110 | |
---|
[0c60f96] | 111 | ---- |
---|
[ccb50f5] | 112 | $ ./configure |
---|
| 113 | $ make |
---|
| 114 | # make install |
---|
[0c60f96] | 115 | ---- |
---|
[afe221f] | 116 | |
---|
[21a387fd] | 117 | This will install the plugin to where BitlBee expects them, which is |
---|
| 118 | `/usr/local/lib/bitlbee` if you installed BitlBee from source. |
---|
| 119 | |
---|
[5293707] | 120 | - To install http://skype4py.sourceforge.net/[Skype4Py] from source: |
---|
| 121 | |
---|
| 122 | ---- |
---|
| 123 | $ tar -zxvf Skype4Py-x.x.x.x.tar.gz |
---|
| 124 | $ cd Skype4Py-x.x.x.x |
---|
| 125 | # python setup.py install |
---|
| 126 | ---- |
---|
[c15f71a] | 127 | |
---|
[d0a6a8c] | 128 | === Configuring |
---|
| 129 | |
---|
[52d377d] | 130 | - Edit `/usr/local/etc/skyped/skyped.conf`: adjust `username` and `password`. The |
---|
[e65ceaa] | 131 | `username` should be your Skype login and the `password` can be whatever you |
---|
| 132 | want, but you will have to specify that one when adding the Skype account to |
---|
| 133 | BitlBee (see later). |
---|
| 134 | |
---|
[52d377d] | 135 | NOTE: Here, and later - `/usr/local/etc` can be different on your installation |
---|
| 136 | if you used the `--sysconfdir` switch when running bitlbee-skype's `configure`. |
---|
| 137 | |
---|
| 138 | - Generate the SSL pem files: |
---|
| 139 | |
---|
| 140 | ---- |
---|
[ccb50f5] | 141 | # cd /usr/local/etc/skyped |
---|
| 142 | # openssl req -new -x509 -days 365 -nodes -config skyped.cnf -out skyped.cert.pem \ |
---|
[52d377d] | 143 | -keyout skyped.key.pem |
---|
| 144 | ---- |
---|
| 145 | |
---|
[ccb50f5] | 146 | NOTE: Maybe you want to adjust the permissions in the `/usr/local/etc/skyped` |
---|
| 147 | dir. For example make it readable by just your user. |
---|
| 148 | |
---|
[b0d40f5] | 149 | - If both pyopenssl and python-gnutls are available, then python-gnutls |
---|
| 150 | will be used. This behaviour can be overwritten by: |
---|
| 151 | |
---|
| 152 | ---- |
---|
| 153 | $ export SKYPED_NO_GNUTLS=1 |
---|
| 154 | ---- |
---|
| 155 | |
---|
[833eaee] | 156 | - Start `skyped` (the tcp server): |
---|
[afe221f] | 157 | |
---|
[0c60f96] | 158 | ---- |
---|
[ccb50f5] | 159 | $ skyped |
---|
[0c60f96] | 160 | ---- |
---|
[ba20c39] | 161 | |
---|
[4c3a4c8] | 162 | - Start your `IRC` client, connect to BitlBee and add your account: |
---|
[7338d59] | 163 | |
---|
| 164 | ---- |
---|
[789d055] | 165 | account add skype <user> <pass> |
---|
| 166 | account set skype/server localhost |
---|
[7338d59] | 167 | ---- |
---|
| 168 | |
---|
[e65ceaa] | 169 | <user> should be your Skype account name, <pass> should be the one you declared |
---|
[10a42d9] | 170 | in `skyped.conf`. If you want to run skyped on a remote machine, replace |
---|
| 171 | `localhost` with the name of the machine. |
---|
[7338d59] | 172 | |
---|
[9ace502] | 173 | If you are running skyped on a custom port: |
---|
| 174 | |
---|
| 175 | ---- |
---|
| 176 | account set skype/port <port> |
---|
| 177 | ---- |
---|
| 178 | |
---|
[7996794] | 179 | If you want to set your full name (optional): |
---|
| 180 | |
---|
| 181 | ---- |
---|
| 182 | account set skype/display_name "John Smith" |
---|
| 183 | ---- |
---|
| 184 | |
---|
| 185 | If you want to see your skypeout contacts online as well (they are |
---|
| 186 | offline by default): |
---|
| 187 | |
---|
| 188 | ---- |
---|
| 189 | account set skype/skypeout_offline false |
---|
| 190 | ---- |
---|
| 191 | |
---|
[23b84e1] | 192 | == Setting up Skype in a VNC server (optional) |
---|
| 193 | |
---|
| 194 | Optionally, if you want to run Skype on a server, you might want to setup up |
---|
[4c3a4c8] | 195 | a `VNC` server as well. I used `tightvnc` but probably other `VNC` servers will |
---|
[23b84e1] | 196 | work, too. |
---|
| 197 | |
---|
| 198 | First run |
---|
| 199 | |
---|
| 200 | ---- |
---|
[ccb50f5] | 201 | $ vncpasswd ~/.vnc/passwd |
---|
[23b84e1] | 202 | ---- |
---|
| 203 | |
---|
| 204 | and create a password. You will need it at least once. |
---|
| 205 | |
---|
| 206 | Now create `~/.vnc/xstartup` with the following contents: |
---|
| 207 | |
---|
| 208 | ---- |
---|
| 209 | #!/bin/sh |
---|
| 210 | |
---|
[2dbb768] | 211 | twm |
---|
[23b84e1] | 212 | ---- |
---|
| 213 | |
---|
[57087df] | 214 | Adjust the permissions: |
---|
| 215 | |
---|
| 216 | ---- |
---|
[ccb50f5] | 217 | $ chmod +x ~/.vnc/xstartup |
---|
[57087df] | 218 | ---- |
---|
| 219 | |
---|
[23b84e1] | 220 | Then start the server: |
---|
| 221 | |
---|
| 222 | ---- |
---|
[ccb50f5] | 223 | $ vncserver |
---|
[23b84e1] | 224 | ---- |
---|
| 225 | |
---|
[ece66da] | 226 | Then connect to it, start an `xterm`, set up Skype (username, password, |
---|
| 227 | enable X11 API and allow the `Skype4Py` client), quit from Skype, and |
---|
| 228 | start `skyped`. If you want to watch its traffic, enable debug messages |
---|
| 229 | and foreground mode: |
---|
[23b84e1] | 230 | |
---|
[ece66da] | 231 | ---- |
---|
| 232 | $ skyped -n -d |
---|
| 233 | ---- |
---|
[dffa24f] | 234 | |
---|
[123e45a] | 235 | == Features |
---|
[b6d26ac] | 236 | |
---|
[adce2de] | 237 | - Download nicks and away statuses from Skype |
---|
[b6d26ac] | 238 | |
---|
[39a0d64] | 239 | - Noticing joins / parts while we're connected |
---|
| 240 | |
---|
[93ece66] | 241 | - Sending messages |
---|
| 242 | |
---|
[8dd21bb] | 243 | - Receiving messages |
---|
| 244 | |
---|
[72f697b] | 245 | - Receiving away status changes |
---|
| 246 | |
---|
[62bb4e4] | 247 | - `skyped` (the tcp daemon that is a gateway between Skype and tcp) |
---|
[ed2e37f] | 248 | |
---|
[62bb4e4] | 249 | - Error handling when `skyped` is not running and when it exits |
---|
[afe221f] | 250 | |
---|
[62bb4e4] | 251 | - Marking received messages as seen so that Skype won't say there are unread messages |
---|
[440665b] | 252 | |
---|
[6627d92] | 253 | - Adding / removing contacts |
---|
| 254 | |
---|
[23411c6] | 255 | - Set away state when you do a `/away`. |
---|
| 256 | |
---|
[d3cbd17] | 257 | - When you `account off`, Skype will set status to `Offline` |
---|
[348a3a2] | 258 | |
---|
[d3cbd17] | 259 | - When you `account on`, Skype will set status to `Online` |
---|
[348a3a2] | 260 | |
---|
[d3cbd17] | 261 | - Detect when somebody wants to add you and ask for confirmation |
---|
[8dd21bb] | 262 | |
---|
[df9255d] | 263 | - Detect when somebody wants to transfer a file |
---|
| 264 | |
---|
[d6a371e] | 265 | - Group chat support: |
---|
| 266 | |
---|
| 267 | * Detect if we're invited |
---|
| 268 | |
---|
| 269 | * Send / receive group chat messages |
---|
[93ece66] | 270 | |
---|
[ff58445] | 271 | * Invite others (using `/invite <nick>`) |
---|
[c5dd164] | 272 | |
---|
[d6a371e] | 273 | * Part from group chats |
---|
[c5dd164] | 274 | |
---|
[ff58445] | 275 | * Starting a group chat (using `/j #nick`) |
---|
| 276 | |
---|
[e103e73] | 277 | - Topic changes in group chats: |
---|
| 278 | |
---|
| 279 | * Show the current topic (if any) on join |
---|
| 280 | |
---|
| 281 | * Notice when someone changes the topic |
---|
| 282 | |
---|
| 283 | * Support changing the topic using `/topic` |
---|
| 284 | |
---|
[fb36492] | 285 | - Viewing the profile using the `info` command. |
---|
| 286 | |
---|
[a06a0a5] | 287 | - Handling skype actions (when the `CHATMESSAGE` has `EMOTED` type) |
---|
| 288 | |
---|
[6b266f6] | 289 | - Setting your display name using the `nick` command. |
---|
[a06a0a5] | 290 | |
---|
[ccb50f5] | 291 | - Running Skype on a machine different to BitlBee is possible, the |
---|
| 292 | communication is encrypted. |
---|
| 293 | |
---|
[9aed2f1] | 294 | - Managing outgoing calls (with call duration at the end, including |
---|
| 295 | SkypeOut calls if you use a phone number instead of a nick): |
---|
[2eb4b1f] | 296 | |
---|
| 297 | * `account set skype/call nick` |
---|
| 298 | * `account set -del skype/call` |
---|
[123e45a] | 299 | |
---|
[e0074cb] | 300 | - Managing incoming calls via questions, just like when you add / remove |
---|
| 301 | contacts. |
---|
[c5dd164] | 302 | |
---|
[9aed2f1] | 303 | - Querying the current SkypeOut balance: |
---|
| 304 | |
---|
| 305 | * `account set skype/balance query` |
---|
| 306 | |
---|
[e0074cb] | 307 | == What needs to be done (aka. TODO) |
---|
[846ceffb] | 308 | |
---|
[d6a371e] | 309 | - Notice if foo invites bar. Currently you can see only that bar joined. |
---|
| 310 | |
---|
[6344674] | 311 | - Public chats. See |
---|
| 312 | link:https://developer.skype.com/jira/browse/SCL-381[this feature |
---|
| 313 | request], this is because it is still not possible (under Linux) to |
---|
| 314 | `join_chat` to a public chat.. |
---|
[d6a371e] | 315 | |
---|
[3511d80] | 316 | - Add `--disable-skyped` and `--disable-plugin` switches in case one wants to |
---|
| 317 | build `bitlbee-skype` only for a public server or only for use with a public |
---|
| 318 | server. |
---|
[fdde7d8] | 319 | |
---|
[0c60f96] | 320 | == I would like to have support for ... |
---|
| 321 | |
---|
[23b84e1] | 322 | If something does not work and it's not in the TODO section, then please |
---|
[e72d869] | 323 | contact me! Please also try the link:HACKING[git version] before reporting a bug, your |
---|
[80d9004] | 324 | problem may be already fixed there. |
---|
[23b84e1] | 325 | |
---|
| 326 | In fact, of course, I wrote this documentation after figured out how to do this |
---|
| 327 | setup, so maybe I left out some steps. If you needed 'any' additional tricks, |
---|
| 328 | then it would be nice to include them here. |
---|
[afe221f] | 329 | |
---|
[f78f949] | 330 | == Known bugs |
---|
| 331 | |
---|
[5652d43] | 332 | - None at this time. |
---|
[f78f949] | 333 | |
---|
[0c60f96] | 334 | == Screenshots |
---|
| 335 | |
---|
[668a122] | 336 | You can reach some screenshots link:shot[here]. |
---|
[ddd3502] | 337 | |
---|
[25d87e4] | 338 | == Additional resources |
---|
[a60c3c2] | 339 | |
---|
[25d87e4] | 340 | You can reach the Changelog link:Changelog[here], and a gitweb interface |
---|
[6f01885] | 341 | http://vmiklos.hu/gitweb/?p=bitlbee-skype.git[here]. |
---|
[a60c3c2] | 342 | |
---|
[c09f90f] | 343 | The Skype API documentation is |
---|
| 344 | https://developer.skype.com/Docs/ApiDoc[here] if you're interested. |
---|
| 345 | |
---|
[ceee9c7] | 346 | |
---|
| 347 | == Testimonials |
---|
| 348 | |
---|
| 349 | ---- |
---|
| 350 | 00:56 < scathe> vmiklos: I like your skype plugin :) |
---|
| 351 | ---- |
---|
| 352 | |
---|
[6774d83] | 353 | ---- |
---|
| 354 | It's really working great so far. |
---|
| 355 | |
---|
| 356 | Good Job and thank you! |
---|
| 357 | Sebastian |
---|
| 358 | ---- |
---|
| 359 | |
---|
[587a921] | 360 | ---- |
---|
| 361 | Big respect for your work, i really appreciate it. |
---|
| 362 | |
---|
| 363 | Martin |
---|
| 364 | ---- |
---|
| 365 | |
---|
[93264f0] | 366 | ---- |
---|
| 367 | Thanks for bitlbee-skype. As a blind Linux user, I cannot use the |
---|
| 368 | skype GUI client because qt apps ar not accessible yet with the |
---|
| 369 | available screen readers. bitlbee-skype allows me to make use of skype |
---|
| 370 | without having to interact much with the GUI client, which helps me a |
---|
| 371 | lot. |
---|
| 372 | |
---|
| 373 | Lukas |
---|
| 374 | ---- |
---|
| 375 | |
---|
[e3d0b10] | 376 | ---- |
---|
| 377 | 02:12 < newton> i must say, i love this little bee ;) |
---|
| 378 | 02:15 < newton> tried it out today with the skype plugin, good work! |
---|
| 379 | ---- |
---|
| 380 | |
---|
[65e4020] | 381 | == Thanks |
---|
| 382 | |
---|
| 383 | for the following people: |
---|
| 384 | |
---|
[e49da25] | 385 | * Wilmer van der Gaast, for answering questions about the BitlBee plugin interface |
---|
[65e4020] | 386 | |
---|
[56a3616] | 387 | * Arkadiusz Wahlig, author of skype4py, for making suggestions to skyped |
---|
[65e4020] | 388 | |
---|
[9834597] | 389 | * Gabor Adam Toth (tg), for noticing extra code is needed to handle multiline |
---|
| 390 | messages |
---|
| 391 | |
---|
| 392 | * Cristobal Palmer (tarheelcoxn), for helping to testing the plugin in a |
---|
| 393 | timezone different to mine |
---|
[65e4020] | 394 | |
---|
[4834307] | 395 | * Risko Gergely, for his SkypeOut ideas |
---|
| 396 | |
---|
[437ddf5] | 397 | * people on `#bitlbee` for feedback |
---|
| 398 | |
---|
[eb9cbb8] | 399 | Back to my link:/projects[projects page]. |
---|
| 400 | |
---|
[0c60f96] | 401 | // vim: ft=asciidoc |
---|