Tag Archives: skype

Skype + minbif on Debian.

I will explain to you my ugly method to use skype with minbif.

Indeed, skype is a proprietary protocol, and we can only use the API of the Qt client for that hack. We must use it with a virtual X server, Xvfb.

On the remote server:

1
2
3
4
5
6
7
8
9
10
# aptitude install xvfb x11vnc
# dpkg -i skype-debian_2.1.0.81-1_i386.deb
# apt-get -f install
# aptitude install minbif
# usermod -s /bin/bash minbif
# sudo su minbif
$ export DISPLAY=:25
$ Xvfb :25 -screen 0 1024x768x16 &
$ skype &
$ x11vnc -bg

On your local computer:

1
$ ssh server -L 5900:localhost:5900

Next on your local computer:

1
$ xvncviewer localhost

You must accept the license and enter your login/password, then activate the autologin. You can now use your graphical skype client over VNC.

On the remote server:

1
2
3
$ killall x11vnc
$ killall skype
$ killall Xvfb

You must edit the config.xml, after minbif can access to the skype API.

1
2
3
4
5
6
7
8
$ vim /var/lib/minbif/.Skype/YOURACCOUNT/config.xml
  <UI>
    <API>
      <Authorizations>(null)</Authorizations>
      <BlockedPrograms></BlockedPrograms>
    </API>
  </UI>
</config>
1
# usermod -s /bin/false minbif

Now you must install skype4pidgin with Xvfb.

1
# aptitude install pidgin-dev

I use revision 579

1
2
3
svn checkout -r 579 http://skype4pidgin.googlecode.com/svn/trunk/ skype4pidgin
gcc -I/usr/include/libpurple `pkg-config --libs purple x11` -DPURPLE_PLUGINS -DENABLE_NLS -DUSE_XVFB_SERVER -Wall -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib64/glib-2.0/include -I/usr/include -I. -g -pipe libskype.c -o libskype.so -shared -fPIC -DPIC
cp libskype.so /usr/lib/purple-2/
Log on minbif
If everything is ok, you can speak to “echo123″
1
2
3
4
5
6
$ ps aux | grep minbif
minbif    6764  0.0  2.0  10248  5440 ?        S    14:15   0:01 Xvfb :25 -ac -terminate -tst -xinerama -render -shmem -screen 0 320x240x16
minbif    6766  0.4 13.8  80096 36328 ?        Sl   14:15   1:00 skype --pipelogin -display :25
minbif   10342  0.3  0.6  12368  1580 ?        Ss   15:38   0:29 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf
minbif   14203  9.5  4.8  86264 12616 ?        Sl   17:31   1:05 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf
minbif   14232  0.4  1.8  85680  4964 ?        S    17:31   0:03 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf

Skype (skype4pidgin) + minbif, ou comment utiliser l’IM skype dans votre irssi.

Vous savez surement que j’utilise minbif pour la messagerie instantanée. Mais il y a un protocole que j’utilise régulièrement pour la messagerie instantanée entre autre, et que je n’ai jamais pensé à intégré dans minbif, il s’agit de Skype.

Ce que je vous propose ici et une solution bien moche, en effet, skype est un protocole propriétaire, nous allons devoir utiliser le binaire skype, le lancer et passer par son API.

Cependant ce binaire ne propose pas de solution en console, il va falloir lancer skype en mode graphique, et le minbif étant sur un serveur, celà pose problème. La solution: utiliser Xvfb, un “fake” serveur X.

Voici la procédure que j’ai utilisé

Sur la machine distance :

1
2
3
4
5
6
7
8
9
10
# aptitude install xvfb x11vnc
# dpkg -i skype-debian_2.1.0.81-1_i386.deb
# apt-get -f install
# aptitude install minbif
# usermod -s /bin/bash minbif
# sudo su minbif
$ export DISPLAY=:25
$ Xvfb :25 -screen 0 1024x768x16 &
$ skype &
$ x11vnc -bg

Puis sur votre machine locale :

1
$ ssh server -L 5900:localhost:5900

Et également en local :

1
$ xvncviewer localhost

Vous pouvez alors accepter les conditions d’utilisation, entrer votre login/password et activer l’autologin. Votre client skype devrait-être fonctionnel en graphique.

Sur la machine distante :

1
2
3
$ killall x11vnc
$ killall skype
$ killall Xvfb

On modifie le fichier config.xml pour donner l’accès de minbif à l’API skype, tout à la fin:

1
2
3
4
5
6
7
8
$ vim /var/lib/minbif/.Skype/VOTRECOMPTE/config.xml
  <UI>
    <API>
      <Authorizations>(null)</Authorizations>
      <BlockedPrograms></BlockedPrograms>
    </API>
  </UI>
</config>
1
# usermod -s /bin/false minbif

Maintenant il faut compiler le plugin skype4pidgin avec le mode Xvfb :

1
# aptitude install pidgin-dev

j’utilise la révision 579

1
2
3
svn checkout http://skype4pidgin.googlecode.com/svn/trunk/ skype4pidgin
gcc -I/usr/include/libpurple `pkg-config --libs purple x11` -DPURPLE_PLUGINS -DENABLE_NLS -DUSE_XVFB_SERVER -Wall -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib64/glib-2.0/include -I/usr/include -I. -g -pipe libskype.c -o libskype.so -shared -fPIC -DPIC
cp libskype.so /usr/lib/purple-2/
Connectez vous à minbif, ajoutez un compte skype
Normalement si tout se passe bien, vous devriez voir se connecter echo123 et pouvoir faire des tests en lui parlant.
1
2
3
4
5
6
$ ps aux | grep minbif
minbif    6764  0.0  2.0  10248  5440 ?        S    14:15   0:01 Xvfb :25 -ac -terminate -tst -xinerama -render -shmem -screen 0 320x240x16
minbif    6766  0.4 13.8  80096 36328 ?        Sl   14:15   1:00 skype --pipelogin -display :25
minbif   10342  0.3  0.6  12368  1580 ?        Ss   15:38   0:29 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf
minbif   14203  9.5  4.8  86264 12616 ?        Sl   17:31   1:05 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf
minbif   14232  0.4  1.8  85680  4964 ?        S    17:31   0:03 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf