Outils pour utilisateurs

Outils du site


partage_de_bureau_a_distance

Ceci est une ancienne révision du document !


Partage de bureau à distance

Configuration de l'ordinateur distant

Ressources

Installation

sudo apt-get install x11vnc

Configuration

Le programme envoie sur le port 5900. Il faut penser à ouvrir le parefeu sur ce port en TCP.

Générer un mot de passe:

x11vnc -storepasswd "*******" ~/.vnc_passwd

Lancer:

x11vnc -many -rfbauth ~/.vnc_passwd -xkb -cursor arrow

Avec un crontab

Pour avoir une relance automatique si x11vnc plante.

x11vnc.sh
#!/bin/bash
x11vnc -many -rfbauth ~/.vnc_passwd -xkb -cursor arrow
autorestart.sh
#!/bin/bash
 
# relance de x11vnc si ne tourne pas
running=$(ps -f -C python3|grep 'meteo_download.py'|wc -l)
echo "running = $running"
if [ $running -eq 1  ] ; then
    echo "`date` => x11vnc is running"
else
    if [ $running -eq 0 ] ; then
        echo "restarting x11vnc"
        cd meteo_download && python3 meteo_download.py
    fi
fi
crontab -e

ajouter

 */2 * * * * sh /home/serge/autorestart.sh > /tmp/autorestart.log 2>&1

Configuration de l'ordinateur qui contrôle l'ordinateur distant

Sur la box et/ou le routeur, il faut rediriger le port 5600 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.lobotomie.org:0

Exemple 2

Cas d'un PC derrière une box ou routeur:

xvncviewer 156.124.25.148:5600
partage_de_bureau_a_distance.1557235137.txt.gz · Dernière modification : 2019/05/07 13:18 de serge