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@
./setup.sh &
[1] 1084

Continue work by X application. VPN drops.


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 --start=xterm
xpra attach :100
  • 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.
    – user1686
    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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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