Sometimes I find myself in the situation of having to lauch some graphical software like synaptic, gedit, baobab while already using the server as root from the command line. I do not want to ‘exit’ my session and use the previous methods of which I’ve written in the past.
This is how I did it.
koolinus@localhost:~$ ssh -Y email@example.com koolinus@remote:~$ sudo -i root@remote:~# touch .Xauthority root@remote:~# xauth merge /home/koolinus/.Xauthority
And that’s all. Now I can launch the needed program without interrupting my root session, for example:
root@remote:~# baobab &