Home » Questions » Computers [ Ask a new question ]

ssh X11 forwarding issue

ssh X11 forwarding issue

I have put ForwardX11 in my ~/.ssh/config and then I start a X11 application like this:

Asked by: Guest | Views: 269
Total answers/comments: 2
Guest [Entry]

"The SSH connection you are initiating stays up only as long as:

The commands you've specified are running.
There are active X11 connections.

In your case, when you specify ""someapp; sleep 1"", this means that after ""someapp"" exits, there is a 1 second time window in which a new X11 connection must be established, before the connection is terminated.

SSH cannot know by itself when it should terminate, if someapp starts another application in the background, which will only later connect to the X display - hence you need to work out something to give it that information. Like a wrapper script that doesn't exit until the program spawned by the launcher exits.

Or just say ""sleep 1day"" and be happy."
Guest [Entry]

"You also have to enable AllowX11Forwarding on the server side. It might be, that this is not needed/used for SSH1.

For details see here"