Lancer un programme root fenêtré sur un ordinateur distant

après s’être logguer par ssh -X machin@OrdiDistant , on lance la commande normale par exemple

machin@ccc:~$ sudo gparted

si ça ne marche, on doit voir cannot open display: localhost:10.0 (éventuellement un autre nombre que 10 )

on rajoute alors env DISPLAY=localhost:10.0 XAUTHORITY=/home/machin/.Xauthority donc:

machin@ccc:~$ env DISPLAY=localhost:10.0 XAUTHORITY=/home/machin/.Xauthority sudo gparted

Remarque :
on peut aussi se logguer avec su - et ne pas mettre sudo dans la ligne de commande, soit :
root@ccc:~# env DISPLAY=localhost:10.0 XAUTHORITY=/home/machin/.Xauthority gparted

ou tout simplement su (sans le -) on garde l’environnement user machin qui a un display, et on peut lancer directement la commande gparted.

ne marche pas

tu as un truc de cassé semble-t-il:
image