====== Partage de bureau à distance ======
=====Configuration de l'ordinateur distant=====
====Ressources====
* [[https://fr.wikipedia.org/wiki/X11vnc|x11vnc sur Wikipedia fr]]
* [[https://en.wikipedia.org/wiki/X11vnc|x11vnc sur Wikipedia en]]
* [[https://sourceforge.net/projects/x11vnc/|Les sources sur sourceforge.net]]
* [[http://www.karlrunge.com/x11vnc/index.html|La doc]]
* [[https://www.linuxtricks.fr/wiki/vnc-x11vnc-pour-prendre-le-controle-du-bureau-a-distance|vnc-x11vnc bureau à distance sur linuxtricks.fr]]
====Installation====
sudo apt-get install x11vnc
====Configuration====
Le programme envoie sur le port 5900.
Générer un mot de passe:
x11vnc -storepasswd "*******" ~/.vnc_passwd
Lancer:
x11vnc -many -rfbauth ~/.vnc_passwd -xkb -cursor arrow -reopen -forever -loop
===Avec un crontab===
* [[https://blog.briangallimore.com/2014/01/06/use-cron-grep-ps-to-monitor-and-restart-a-program-x11vnc/|briangallimore.com x11vnc use cron]]
Pour avoir une relance automatique si x11vnc plante.
Ce fichier doit être dans votre home, excécutable et doit être adapté: toto=??
#!/bin/bash
# Check to see if x11vnc is running
if ps cax | grep x11vnc | grep -v check
then
echo "x11vnc running when checked at $(date)" >> /tmp/x11vnc-checker.log
else
x11vnc -many -forever -rfbauth /home/toto/.vnc/passwd -xkb -cursor arrow -o /tmp/x11vnc.log -bg
echo "Restarted x11vnc at $(date)" >> /tmp/x11vnc-checker.log
fi
**crontab**
crontab -e
ajouter, adapter à votre home, toutes les 5 mn:
*/5 * * * * /home/toto/check-x11vnc-running.sh
=====Configuration de l'ordinateur qui contrôle l'ordinateur distant=====
Sur la box et/ou le routeur, il faut rediriger le port 5600 en TCP vers l'IP de votre PC.
====Exemple 1====
Cas d'un PC derrière un Pare-feu matériel et logiciel qu gère les redirections:
xvncviewer dev.toto.org:0
====Exemple 2====
Cas d'un PC derrière une box ou routeur:
xvncviewer 156.124.25.148:5900
====Exemple 3====
Sur un réseau local
xvncviewer 192.168.0.102:5900
{{tag> ordinateur partage sb }}