Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 am planning to log in to my college PC using ssh and run some simulations. These simulations take very long time, so I would like the relevant process to run longer than the ssh session (I want to log in, run the process, log out and collect the results the next day).

How can I do it

  1. If the process is a command line tool that doesn't expect any inputs (so that I just need the resulting output file)?
  2. If the process is a GUI, which sadly doesn't save the results to a file, but displays it instead. So in this case I was thinking of using ssh -X ... command, but then I don't know how to reconnect to the open window.
share|improve this question
up vote 11 down vote accepted

Assuming your college's computer runs all the time:

  1. Use GNU Screen or tmux and live happily ever after.
  2. Apparently, xpra offers that, i.e. it attempts to be "Screen for X11". (I've never used it, though.)

(There're other solutions for (1.), e.g. nohup and IO redirection, but Screen probably is the canonical tool for these kinds of issues. (You can then just re-attach to the detached session and see if the simulation still runs etc...))

share|improve this answer
+1 for finding xpra – Sachin Divekar Jan 29 '12 at 12:13
An alternative to 'screen' is 'nohup'. It has only very basic functionality compared to screen but it is more general available. – antje-m Jan 29 '12 at 12:19
@antje-m: you're right and I've just edited the answer some minutes ago :) – sr_ Jan 29 '12 at 12:20

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.