"can't open display" weirdness over ssh
Solution 1
You're seeing the effects of the ForwardX11Trusted
option being turned off in ~/.ssh/config
. When this option is set to no
, remote X clients have fewer permissions on the local X server; this removes some ways in which the administrator of the remote machine can harm yours, but not all of them, so it is not an effective security measure. In addition, this option prevents new X clients from connecting if more than 20 minutes have elapsed since the connection was established.
Ubuntu has this option default to off, but the upstream default has it on. The client machine you're using must have been upgraded or had its configuration changed. Turn on ForwardX11Trusted
in your ~/.ssh/config
by adding the lines
Host *
ForwardX11Trusted yes
Recent versions of ssh allow the delay to be configured through the ForwardX11Timeout
option, so you can leave ForwardX11Trusted
off (for whatever benefit it might provide) and set a very high timeout.
Solution 2
I have the same issue,
on the remote server
1) Adding the following to your sshd_config
AddressFamily inet
2) Restart SSH
ref: http://www.linuxquestions.org/questions/ubuntu-63/cant-open-display-882197/
Related videos on Youtube
Rich Pixley
Updated on September 18, 2022Comments
-
Rich Pixley over 1 year
Some time back, (maybe a year?), my environment was working correctly. But some time in the last year or so I started getting "can't open display" errors.
It's weird because I can ssh into the ubuntu box, (from a mac, over cisco ipsec), and start several new x11 clients. But at some point, (1 - 20 minutes later), new attempts to start x11 clients result in "can't open display" errors. If there's any other antecedent event that leads to the "can't open display" problem, I havent' figured it out.
My DISPLAY hasn't changed in this time. Preexisting windows continue to exist and function so I believe my local X11 server is good, running, and that the previously existing X11 forwarding tunnels are still functioning. It appears to be a problem with the initial rendezvous to the display.
Does this sound familiar to anyone?
-
hiro protagonist over 8 yearsalso works on ubuntu 14.04.