[0c60f96] | 1 | = Skype plugin for BitlBee |
---|
[668a122] | 2 | Miklos Vajna <vmiklos@vmiklos.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 | |
---|
[31fe322] | 31 | * Skype >= 1.4.0.99. The latest version I've tested is 2.0.0.63. |
---|
[36fbaa0] | 32 | * BitlBee >= 1.1.1dev. The latest version I've tested is 1.2. |
---|
[eb39102] | 33 | * Skype4Py >= 0.9.28.7. Previous versions won't work due to API changes. |
---|
[c60b864] | 34 | * Python >= 2.5. Skype4Py does not work with 2.4. |
---|
[e49da25] | 35 | * PyGObject >= 2.8.0. Older versions are part of PyGTK. (And you don't want to |
---|
| 36 | install GTK for nothing, right?) |
---|
[22d97b4] | 37 | |
---|
[df1a59d4] | 38 | `bitlbee-skype` has been tested under Linux and Mac OS X. Skype and Skype4py is |
---|
| 39 | available under Windows, too, so it probably works, but this has not been tested. |
---|
[760ed1f] | 40 | |
---|
[9e03e55] | 41 | == How to set it up |
---|
[afe221f] | 42 | |
---|
[751b149] | 43 | Before you start. The setup is the following: BitlBee can't connect directly to |
---|
| 44 | Skype servers (the company's ones). It needs a running Skype client to do so. |
---|
| 45 | In fact BitlBee will connect to `skyped` (a tcp server, provided in this |
---|
[4c3a4c8] | 46 | package) and `skyped` will connect to to your Skype client. |
---|
[751b149] | 47 | |
---|
[833eaee] | 48 | NOTE: The order is important. First `skyped` starts Skype. Then `skyped` can |
---|
| 49 | connect to Skype, finally BitlBee can connect to `skyped`. |
---|
[7e4f0ca1] | 50 | |
---|
[36fbaa0] | 51 | - If you happen to be a happy Frugalware user: |
---|
[11eed8f] | 52 | |
---|
[36fbaa0] | 53 | ---- |
---|
| 54 | # pacman-g2 -S bitlbee-skype |
---|
| 55 | ---- |
---|
| 56 | |
---|
| 57 | - You need the latest stable BitlBee release: |
---|
[afe221f] | 58 | |
---|
[0c60f96] | 59 | ---- |
---|
[36fbaa0] | 60 | $ wget http://get.bitlbee.org/src/bitlbee-1.2.tar.gz |
---|
| 61 | $ tar xf bitlbee-1.2.tar.gz |
---|
| 62 | $ cd bitlbee-1.2 |
---|
[0c60f96] | 63 | ---- |
---|
[afe221f] | 64 | |
---|
[d044a5a] | 65 | NOTE: You no longer need additional patches, as of version 1.1.1dev. |
---|
[b8b0bfd] | 66 | |
---|
[afe221f] | 67 | - Now compile and install it: |
---|
| 68 | |
---|
[0c60f96] | 69 | ---- |
---|
[ccb50f5] | 70 | $ ./configure |
---|
| 71 | $ make |
---|
| 72 | # make install install-dev |
---|
[0c60f96] | 73 | ---- |
---|
[afe221f] | 74 | |
---|
| 75 | - Get the plugin code: |
---|
| 76 | |
---|
[0c60f96] | 77 | ---- |
---|
[3b495c0] | 78 | $ wget http://vmiklos.hu/project/bitlbee-skype/bitlbee-skype-@VERSION@.tar.gz |
---|
| 79 | $ tar xf bitlbee-skype-@VERSION@.tar.gz |
---|
| 80 | $ cd bitlbee-skype-@VERSION@ |
---|
[0c60f96] | 81 | ---- |
---|
[afe221f] | 82 | |
---|
[3b495c0] | 83 | It doesn't matter where do you get it, it'll install the plugin to `/usr/local` |
---|
| 84 | by default (that's the location where BitlBee searches for plugins by default). |
---|
[6e97a7a] | 85 | |
---|
[afe221f] | 86 | - Compile and install it: |
---|
| 87 | |
---|
[0c60f96] | 88 | ---- |
---|
[ccb50f5] | 89 | $ ./configure |
---|
| 90 | $ make |
---|
| 91 | # make install |
---|
[0c60f96] | 92 | ---- |
---|
[afe221f] | 93 | |
---|
[c15f71a] | 94 | - Install http://skype4py.sourceforge.net/[Skype4Py]. |
---|
| 95 | |
---|
[52d377d] | 96 | - Edit `/usr/local/etc/skyped/skyped.conf`: adjust `username` and `password`. The |
---|
[e65ceaa] | 97 | `username` should be your Skype login and the `password` can be whatever you |
---|
| 98 | want, but you will have to specify that one when adding the Skype account to |
---|
| 99 | BitlBee (see later). |
---|
| 100 | |
---|
[52d377d] | 101 | NOTE: Here, and later - `/usr/local/etc` can be different on your installation |
---|
| 102 | if you used the `--sysconfdir` switch when running bitlbee-skype's `configure`. |
---|
| 103 | |
---|
| 104 | - Generate the SSL pem files: |
---|
| 105 | |
---|
| 106 | ---- |
---|
[ccb50f5] | 107 | # cd /usr/local/etc/skyped |
---|
| 108 | # openssl req -new -x509 -days 365 -nodes -config skyped.cnf -out skyped.cert.pem \ |
---|
[52d377d] | 109 | -keyout skyped.key.pem |
---|
| 110 | ---- |
---|
| 111 | |
---|
[ccb50f5] | 112 | NOTE: Maybe you want to adjust the permissions in the `/usr/local/etc/skyped` |
---|
| 113 | dir. For example make it readable by just your user. |
---|
| 114 | |
---|
[833eaee] | 115 | - Start `skyped` (the tcp server): |
---|
[afe221f] | 116 | |
---|
[0c60f96] | 117 | ---- |
---|
[ccb50f5] | 118 | $ skyped |
---|
[0c60f96] | 119 | ---- |
---|
[ba20c39] | 120 | |
---|
[4c3a4c8] | 121 | - Start your `IRC` client, connect to BitlBee and add your account: |
---|
[7338d59] | 122 | |
---|
| 123 | ---- |
---|
[789d055] | 124 | account add skype <user> <pass> |
---|
| 125 | account set skype/server localhost |
---|
[7338d59] | 126 | ---- |
---|
| 127 | |
---|
[e65ceaa] | 128 | <user> should be your Skype account name, <pass> should be the one you declared |
---|
[10a42d9] | 129 | in `skyped.conf`. If you want to run skyped on a remote machine, replace |
---|
| 130 | `localhost` with the name of the machine. |
---|
[7338d59] | 131 | |
---|
[23b84e1] | 132 | == Setting up Skype in a VNC server (optional) |
---|
| 133 | |
---|
| 134 | Optionally, if you want to run Skype on a server, you might want to setup up |
---|
[4c3a4c8] | 135 | a `VNC` server as well. I used `tightvnc` but probably other `VNC` servers will |
---|
[23b84e1] | 136 | work, too. |
---|
| 137 | |
---|
| 138 | First run |
---|
| 139 | |
---|
| 140 | ---- |
---|
[ccb50f5] | 141 | $ vncpasswd ~/.vnc/passwd |
---|
[23b84e1] | 142 | ---- |
---|
| 143 | |
---|
| 144 | and create a password. You will need it at least once. |
---|
| 145 | |
---|
| 146 | Now create `~/.vnc/xstartup` with the following contents: |
---|
| 147 | |
---|
| 148 | ---- |
---|
| 149 | #!/bin/sh |
---|
| 150 | |
---|
[2dbb768] | 151 | twm |
---|
[23b84e1] | 152 | ---- |
---|
| 153 | |
---|
[57087df] | 154 | Adjust the permissions: |
---|
| 155 | |
---|
| 156 | ---- |
---|
[ccb50f5] | 157 | $ chmod +x ~/.vnc/xstartup |
---|
[57087df] | 158 | ---- |
---|
| 159 | |
---|
[23b84e1] | 160 | Then start the server: |
---|
| 161 | |
---|
| 162 | ---- |
---|
[ccb50f5] | 163 | $ vncserver |
---|
[23b84e1] | 164 | ---- |
---|
| 165 | |
---|
[2dbb768] | 166 | Then connect to it, and set up Skype (username, password, enable |
---|
| 167 | auto-login, start skyped and allow the `SkypeApiPythonShell` client when |
---|
| 168 | Skype asks about it). |
---|
[23b84e1] | 169 | |
---|
[dffa24f] | 170 | Please be aware about that Skype has serious memory leak issues. After running |
---|
| 171 | with for a few weeks it may eat >300 MB of memory. Just don't forget to restart |
---|
| 172 | your VNC server regularly. (How ugly.) |
---|
| 173 | |
---|
[123e45a] | 174 | == Features |
---|
[b6d26ac] | 175 | |
---|
[adce2de] | 176 | - Download nicks and away statuses from Skype |
---|
[b6d26ac] | 177 | |
---|
[39a0d64] | 178 | - Noticing joins / parts while we're connected |
---|
| 179 | |
---|
[93ece66] | 180 | - Sending messages |
---|
| 181 | |
---|
[8dd21bb] | 182 | - Receiving messages |
---|
| 183 | |
---|
[72f697b] | 184 | - Receiving away status changes |
---|
| 185 | |
---|
[62bb4e4] | 186 | - `skyped` (the tcp daemon that is a gateway between Skype and tcp) |
---|
[ed2e37f] | 187 | |
---|
[62bb4e4] | 188 | - Error handling when `skyped` is not running and when it exits |
---|
[afe221f] | 189 | |
---|
[62bb4e4] | 190 | - Marking received messages as seen so that Skype won't say there are unread messages |
---|
[440665b] | 191 | |
---|
[6627d92] | 192 | - Adding / removing contacts |
---|
| 193 | |
---|
[23411c6] | 194 | - Set away state when you do a `/away`. |
---|
| 195 | |
---|
[d3cbd17] | 196 | - When you `account off`, Skype will set status to `Offline` |
---|
[348a3a2] | 197 | |
---|
[d3cbd17] | 198 | - When you `account on`, Skype will set status to `Online` |
---|
[348a3a2] | 199 | |
---|
[d3cbd17] | 200 | - Detect when somebody wants to add you and ask for confirmation |
---|
[8dd21bb] | 201 | |
---|
[df9255d] | 202 | - Detect when somebody wants to transfer a file |
---|
| 203 | |
---|
[d6a371e] | 204 | - Group chat support: |
---|
| 205 | |
---|
| 206 | * Detect if we're invited |
---|
| 207 | |
---|
| 208 | * Send / receive group chat messages |
---|
[93ece66] | 209 | |
---|
[ff58445] | 210 | * Invite others (using `/invite <nick>`) |
---|
[c5dd164] | 211 | |
---|
[d6a371e] | 212 | * Part from group chats |
---|
[c5dd164] | 213 | |
---|
[ff58445] | 214 | * Starting a group chat (using `/j #nick`) |
---|
| 215 | |
---|
[e103e73] | 216 | - Topic changes in group chats: |
---|
| 217 | |
---|
| 218 | * Show the current topic (if any) on join |
---|
| 219 | |
---|
| 220 | * Notice when someone changes the topic |
---|
| 221 | |
---|
| 222 | * Support changing the topic using `/topic` |
---|
| 223 | |
---|
[fb36492] | 224 | - Viewing the profile using the `info` command. |
---|
| 225 | |
---|
[a06a0a5] | 226 | - Handling skype actions (when the `CHATMESSAGE` has `EMOTED` type) |
---|
| 227 | |
---|
[6b266f6] | 228 | - Setting your display name using the `nick` command. |
---|
[a06a0a5] | 229 | |
---|
[ccb50f5] | 230 | - Running Skype on a machine different to BitlBee is possible, the |
---|
| 231 | communication is encrypted. |
---|
| 232 | |
---|
[9aed2f1] | 233 | - Managing outgoing calls (with call duration at the end, including |
---|
| 234 | SkypeOut calls if you use a phone number instead of a nick): |
---|
[2eb4b1f] | 235 | |
---|
| 236 | * `account set skype/call nick` |
---|
| 237 | * `account set -del skype/call` |
---|
[123e45a] | 238 | |
---|
[e0074cb] | 239 | - Managing incoming calls via questions, just like when you add / remove |
---|
| 240 | contacts. |
---|
[c5dd164] | 241 | |
---|
[9aed2f1] | 242 | - Querying the current SkypeOut balance: |
---|
| 243 | |
---|
| 244 | * `account set skype/balance query` |
---|
| 245 | |
---|
[e0074cb] | 246 | == What needs to be done (aka. TODO) |
---|
[846ceffb] | 247 | |
---|
[d6a371e] | 248 | - Notice if foo invites bar. Currently you can see only that bar joined. |
---|
| 249 | |
---|
[4285920] | 250 | - Public chats. See link:http://forum.skype.com/index.php?showtopic=98872[this |
---|
| 251 | forum thread], it is still unclear how could it be done for you to be able to |
---|
| 252 | `/join` to a public chat.. |
---|
[d6a371e] | 253 | |
---|
[3511d80] | 254 | - Add `--disable-skyped` and `--disable-plugin` switches in case one wants to |
---|
| 255 | build `bitlbee-skype` only for a public server or only for use with a public |
---|
| 256 | server. |
---|
[fdde7d8] | 257 | |
---|
[0c60f96] | 258 | == I would like to have support for ... |
---|
| 259 | |
---|
[23b84e1] | 260 | If something does not work and it's not in the TODO section, then please |
---|
[e72d869] | 261 | contact me! Please also try the link:HACKING[git version] before reporting a bug, your |
---|
[80d9004] | 262 | problem may be already fixed there. |
---|
[23b84e1] | 263 | |
---|
| 264 | In fact, of course, I wrote this documentation after figured out how to do this |
---|
| 265 | setup, so maybe I left out some steps. If you needed 'any' additional tricks, |
---|
| 266 | then it would be nice to include them here. |
---|
[afe221f] | 267 | |
---|
[f78f949] | 268 | == Known bugs |
---|
| 269 | |
---|
[5652d43] | 270 | - None at this time. |
---|
[f78f949] | 271 | |
---|
[0c60f96] | 272 | == Screenshots |
---|
| 273 | |
---|
[668a122] | 274 | You can reach some screenshots link:shot[here]. |
---|
[ddd3502] | 275 | |
---|
[25d87e4] | 276 | == Additional resources |
---|
[a60c3c2] | 277 | |
---|
[25d87e4] | 278 | You can reach the Changelog link:Changelog[here], and a gitweb interface |
---|
[6f01885] | 279 | http://vmiklos.hu/gitweb/?p=bitlbee-skype.git[here]. |
---|
[a60c3c2] | 280 | |
---|
[c09f90f] | 281 | The Skype API documentation is |
---|
| 282 | https://developer.skype.com/Docs/ApiDoc[here] if you're interested. |
---|
| 283 | |
---|
[ceee9c7] | 284 | |
---|
| 285 | == Testimonials |
---|
| 286 | |
---|
| 287 | ---- |
---|
| 288 | 00:56 < scathe> vmiklos: I like your skype plugin :) |
---|
| 289 | ---- |
---|
| 290 | |
---|
[6774d83] | 291 | ---- |
---|
| 292 | It's really working great so far. |
---|
| 293 | |
---|
| 294 | Good Job and thank you! |
---|
| 295 | Sebastian |
---|
| 296 | ---- |
---|
| 297 | |
---|
[65e4020] | 298 | == Thanks |
---|
| 299 | |
---|
| 300 | for the following people: |
---|
| 301 | |
---|
[e49da25] | 302 | * Wilmer van der Gaast, for answering questions about the BitlBee plugin interface |
---|
[65e4020] | 303 | |
---|
[56a3616] | 304 | * Arkadiusz Wahlig, author of skype4py, for making suggestions to skyped |
---|
[65e4020] | 305 | |
---|
[9834597] | 306 | * Gabor Adam Toth (tg), for noticing extra code is needed to handle multiline |
---|
| 307 | messages |
---|
| 308 | |
---|
| 309 | * Cristobal Palmer (tarheelcoxn), for helping to testing the plugin in a |
---|
| 310 | timezone different to mine |
---|
[65e4020] | 311 | |
---|
[4834307] | 312 | * Risko Gergely, for his SkypeOut ideas |
---|
| 313 | |
---|
[437ddf5] | 314 | * people on `#bitlbee` for feedback |
---|
| 315 | |
---|
[eb9cbb8] | 316 | Back to my link:/projects[projects page]. |
---|
| 317 | |
---|
[0c60f96] | 318 | // vim: ft=asciidoc |
---|