Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 am VPN from a Linux box to another. I log in to the other box with ssh -X. I open an X window/program in an attempt to do a software installation. The painful truth is that this software cannot be installed from the shell. Anyway, all is well but slow. However, the VPN session will periodically drop and the installation is frozen.

Does anyone have any suggestions for how after I re-login to VPN could I restore that ssh/X session? Or, is that impossible?

ssh -X user@
./ &
[1] 1084

Continue work by X application. VPN drops.

share|improve this question
up vote 5 down vote accepted

You cannot reconnect to a session you already lost. You can only kill its processes.

But if you are preparing for future, you can use tmux or screen for terminal-based programs and xpra (this fork) for X11 ones.

tmux ls
tmux attach

xpra start :100 && export DISPLAY=:100
xpra attach :100
share|improve this answer
If it's not finished immediately, never run it outside screen. Should be in the motd on all systems. – Daniel Beck Oct 18 '11 at 17:54
Because all users read the motd, yes. – grawity Oct 18 '11 at 18:12
Probably not, but seeing it upon every login might still have an effect -- at least for command-line access. I see the MOTDs of several systems every day. – Daniel Beck Oct 18 '11 at 18:16

You could also use nomachine NX or Freenx if ist available for your distro. Its also much faster than ssh +X forwarding. Another option is teamviewer or vnc.

share|improve this answer

Your Answer


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.