Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I ssh tunnel into a remote desktop running Ubuntu via a terminal - and use gnu screen to do my work there. I have enabled X11 forwarding in my ssh config for the use of X11 applications launched from one of screen's tabs.

Every few hours though, I cannot launch a new app (say for example emacs) - the message is that connection to localhost:10 display failed.

So something that works when I reattach to a screen session stops working for a while.

Any ideas as to how to solve this?

share|improve this question
Do you have "trusted mode" (ssh -Y or ForwardX11Trusted yes) enabled? – grawity Jun 1 '12 at 18:45
@grawity: No - I don't. – user64752 Jun 1 '12 at 18:49
up vote 0 down vote accepted

It's probably caused not by Screen, but by the X11 security features in OpenSSH. By default, forwarded connections are in "untrusted" mode, with restricted access to certain features, and a time limit for the X11 authentication data.

Try enabling "trusted" mode by adding the -Y option to ssh, and/or the following into your ~/.ssh/config:

Host yourserver
    ForwardX11Trusted yes
share|improve this answer
Actually it turns out that even with trusted ssh tunnel, I am still losing the display connection. Any ideas as to how I may debug this? – user64752 Jun 4 '12 at 16:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .