Monthly Archives: February 2012


Generally when you try opening any X application, say xclock or xterm, as a root user on a remote system, It gives an error saying “Can’t open display”. To get rid of this message what you can do is,

– First ssh with -X into remote system
$ ssh -vX

– Export a variable
$ export XAUTHORITY="~/foo/.Xauthority"

– Start X app (I am assuming user “foo” has a superuser privileges on remote system)
$ sudo xterm