6

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.
11

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...))

  • 2
    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 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.