Démarrer une application graphique sur un affichage distant en ssh

Pour lancer une application sur l’hôte SSH :

Il suffit d’exécuter export DISPLAY=:id# dans la session SSH.

toto@pc:~$ ssh testSSH@myServer
toto@pc:~$ export DISPLAY=:0
toto@pc:~$ gedit
ssh testSSH@myServer "DISPLAY=:0 nohup gedit"

Pour l’affichage en root

export XAUTHORITY=/home/user/.Xauthority