1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
|
= Skype plugin for BitlBee
Miklos Vajna <vmiklos@vmiklos.hu>
== Status
[Wilmer van der Gaast (author of BitlBee)]
____
Okay, this exists now, with lots of thanks to vmiklos for his *excellent*
work!!
It's not in the main BitlBee and it'll never be for various reasons, but
because it's a plugin that shouldn't be a problem.
____
One day I browsed the BitlBee bugtracker and found
http://bugs.bitlbee.org/bitlbee/ticket/82[this] ticket. Then after a while I
returned and saw that it was still open. So I wrote it.
It's pretty stable, I use it for my daily work. Being a plug-in, no patching
is required, you can just install it after installing BitlBee itself.
NOTE: You will see that this implementation of the Skype plug-in still requires
a Skype instance to be running. This is because I'm not motivated to reverse
engineer Skype's
http://en.wikipedia.org/wiki/Skype_Protocol#Obfuscation_Layer[obfuscation
layer]. (Not mentioning that you should ask your lawyer about if it is legal or
not..)
== Requirements
* Skype >= 1.4.0.99. The latest version I've tested is 2.0.0.27.
* bitlbee >= 1.1.1dev. (This is the latest version I've tested, probably
newer versions probably will work, too.)
* Skype4Py >= 0.9.28.7. Previous versions won't work due to API changes.
* Python >= 2.5. Skype4Py does not work with 2.4.
* pygobject
`bitlbee-skype` has been tested under Linux and Windows. Skype is available
under OSX, too, so it probably works, but this has not been tested.
== How to set it up
Before you start. The setup is the following: BitlBee can't connect directly to
Skype servers (the company's ones). It needs a running Skype client to do so.
In fact BitlBee will connect to `skyped` (a tcp server, provided in this
package) and `skyped` will connect to to your Skype client.
NOTE: The order is important. First you have to start Skype. Then `skyped` can
connect to it, finally BitlBee can connect to `skyped`. (In fact `skyped`
automatically reconnect if you restart Skype.)
- If you happen to be a happy Frugalware user, you can install the `bitlbee`
and `bitlbee-skype` packages from
http://ftp.frugalware.org/pub/other/people/vmiklos/bmf/[my repo].
- You need the BitlBee testing/development version:
----
wget http://get.bitlbee.org/src/bitlbee-1.1.1dev.tar.gz
tar xf bitlbee-1.1.1dev.tar.gz
cd bitlbee-1.1.1dev
----
NOTE: You no longer need additional patches, as of version 1.1.1dev.
- Now compile and install it:
----
./configure
make
make install install-dev
----
- Get the plugin code:
----
git clone git://vmiklos.hu/bitlbee-skype
----
(Or you can use the tarballs below, see the Changelog about what
features/bugfixes will you miss in this case).
NOTE: It doesn't matter where do you get it, it'll install the plugin to
`/usr/local` by default (that's the location where BitlBee searches for plugins
by default).
- Compile and install it:
----
cd bitlbee-skype
make prepare
./configure
make
make install
----
- Install http://skype4py.sourceforge.net/[Skype4Py].
(You may remember that previous versions of `skyped` did not require this
package. This because it now uses the X11 interface of Skype (because the
previously used `DBus` interface had
http://forum.skype.com/index.php?s=&showtopic=94545&view=findpost&p=431710[known
problems]), but I wanted to prevent a large code duplication from that project.
In addition it then no longer requires the `dbus-python` package, just
`pygobject`.)
- Edit `/usr/local/etc/skyped/skyped.conf`: adjust `username` and `password`. The
`username` should be your Skype login and the `password` can be whatever you
want, but you will have to specify that one when adding the Skype account to
BitlBee (see later).
NOTE: Here, and later - `/usr/local/etc` can be different on your installation
if you used the `--sysconfdir` switch when running bitlbee-skype's `configure`.
- Generate the SSL pem files:
----
cd /usr/local/etc/skyped
openssl req -new -x509 -days 365 -nodes -config skyped.cnf -out skyped.cert.pem \
-keyout skyped.key.pem
----
- Start Skype and `skyped` (the tcp server):
----
skype
skyped
----
NOTE: You should run `skyped` on the same `X11` display, otherwise it won't be
able to connect to Skype!
- Start your `IRC` client, connect to BitlBee and add your account:
----
account add skype <user> <pass>
----
<user> should be your Skype account name, <pass> should be the one you declared
in `skyped.conf`.
== Setting up Skype in a VNC server (optional)
Optionally, if you want to run Skype on a server, you might want to setup up
a `VNC` server as well. I used `tightvnc` but probably other `VNC` servers will
work, too.
First run
----
vncpasswd ~/.vnc/passwd
----
and create a password. You will need it at least once.
Now create `~/.vnc/xstartup` with the following contents:
----
#!/bin/sh
sleep 1
skype &
sleep 5
skyped
----
Adjust the permissions:
----
chmod +x ~/.vnc/xstartup
----
Then start the server:
----
vncserver
----
Then connect to it, and set up Skype (username, password, enable auto-login, and
allow the `SkypeApiPythonShell` client when Skype asks about it).
Please be aware about that Skype has serious memory leak issues. After running
with for a few weeks it may eat >300 MB of memory. Just don't forget to restart
your VNC server regularly. (How ugly.)
== What works
- Download nicks and away statuses from Skype
- Noticing joins / parts while we're connected
- Sending messages
- Receiving messages
- Receiving away status changes
- `skyped` (the tcp daemon that is a gateway between Skype and tcp)
- Error handling when `skyped` is not running and when it exits
- Marking received messages as seen so that Skype won't say there are unread messages
- Adding / removing contacts
- Set away state when you do a `/away`.
- When you `account off`, Skype will set status to `Offline`
- When you `account on`, Skype will set status to `Online`
- Detect when somebody wants to add you and ask for confirmation
- Detect when somebody wants to transfer a file
- Group chat support:
* Detect if we're invited
* Send / receive group chat messages
* Invite others (using `/invite <nick>`)
* Part from group chats
* Starting a group chat (using `/j #nick`)
- Topic changes in group chats:
* Show the current topic (if any) on join
* Notice when someone changes the topic
* Support changing the topic using `/topic`
- Viewing the profile using the `info` command.
- Handling skype actions (when the `CHATMESSAGE` has `EMOTED` type)
- Setting your mood text using the `nick` command.
== What needs to be done (aka. TODO)
- Add a question callback for calls.
- Notice if foo invites bar. Currently you can see only that bar joined.
- Public chats. See link:http://forum.skype.com/index.php?showtopic=98872[this
forum thread], it is still unclear how could it be done for you to be able to
`/join` to a public chat..
== I would like to have support for ...
If something does not work and it's not in the TODO section, then please
contact me! Please also try the git version before reporting a bug, your
problem may be already fixed there.
In fact, of course, I wrote this documentation after figured out how to do this
setup, so maybe I left out some steps. If you needed 'any' additional tricks,
then it would be nice to include them here.
== Known bugs
- None at this time.
== Screenshots
You can reach some screenshots link:shot[here].
== Additional resources
You can reach the Changelog link:Changelog[here], and a gitweb interface
http://repo.or.cz/w/bitlbee-skype.git[here].
The Skype API documentation is
https://developer.skype.com/Docs/ApiDoc[here] if you're interested.
== Thanks
for the following people:
* Wilmer van der Gaast, for answering questions about the bitlbee plugin interface
* Arkadiusz Wahlig, author of skype4py, for making suggestions to skyped
* Gabor Adam Toth (tg), for noticing extra code is needed to handle multiline
messages
* Cristobal Palmer (tarheelcoxn), for helping to testing the plugin in a
timezone different to mine
* people on `#bitlbee` for feedback
Back to my link:/projects[projects page].
// vim: ft=asciidoc
|