Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.