Sometimes, you need to pipe several commands with find -exec, you can do it using the sh command!
Example:
1 | find . -exec sh -c 'cat $0 | rot13 | grep -q toto' {} \; -print |
Sometimes, you need to pipe several commands with find -exec, you can do it using the sh command!
Example:
1 | find . -exec sh -c 'cat $0 | rot13 | grep -q toto' {} \; -print |
Chromium allows you to encrypt website password using the gnome-keyring, the feature isn’t in the manual.
1 | $ chromium-browser --password-store=gnome |
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/ |
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 |