Xauthority problem xdpyinfo: unable to open display "".
7
votes
1
answer
24118
views
I am trying to run a program after enabling X windows port forwarding.
My sshd_config file in /etc/ssh/sshd_config is configured such that:
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
and my ssh_config file in /etc/ssh/ssh_config has:
Host *
ForwardAgent yes
ForwardX11 yes
I try to enable X Windows port forwarding with
lemon:~ # ssh -X localhost
lemon:~ # echo $DISPLAY
lemon:~ # /usr/bin/SMclient
xdpyinfo: unable to open display "".
Unable to launch GUI due to X server display setting problem, Exiting .
So $DISPLAY is set to nothing. I have tried everything I've seen online. Originally there was no .Xauthority file so I copied from
/var/run/gdm/auth-for--/database
and renamed the file .Xauthority
I then tried
lemon:~ # xauth generate :0 . trusted
Invalid MIT-MAGIC-COOKIE-1 keyxauth: (argv):1: unable to open display ":0".
When this didn't work, I deleted the old .Xauthority file and then:
lemon:~ # touch ~/.Xauthority
lemon:~ # xauth generate :0 . trusted
No protocol specified
xauth: (argv):1: unable to open display ":0".
And many others suggested to run host + which just leads to
lemon:~ # xhost +
xhost: unable to open display ""
Asked by CrazyCray
(71 rep)
Aug 8, 2017, 07:31 PM
Last activity: May 15, 2025, 09:06 AM
Last activity: May 15, 2025, 09:06 AM