POV-Ray : Newsgroups : povray.advanced-users : Pause : Re: Pause Server Time
28 Jul 2024 10:22:01 EDT (-0400)
  Re: Pause  
From: Warp
Date: 29 Apr 2006 15:42:35
Message: <4453c1a4@news.povray.org>
Orchid XP v2 <voi### [at] devnull> wrote:
> I'm running it remotely using SSH. I start POV-Ray, then log out of SSH. 
> I don't know of a way of reconnecting to the original console. So I can 
> use the kill command to pause it, but how can I unpause it? Is there 
> some signal for that, or...?

  Actually what you want to use here is an utility called 'screen'.
'screen' is a terminal emulator which keeps running in the background
independently of the terminal process which started it. It can be used
to keep programs running in the background even if you close terminals
or log out of the system.
  It works like this:

  The first time you want to use 'screen', log in the system and just
write 'screen' (it will give you some info and ask you to press enter).
  Now you are in the 'screen' terminal emulation. You'll not notice any
difference (except that ctrl-a is captured by screen).
  Now start povray (or whichever program you want).
  Now, while povray is running, press ctrl-a ctrl-d. This will "detach"
the current screen. This means that you "exit" screen to the console
where you started it in the first place, but screen (and povray, which
you started inside it) will keep running in the background.
  Now you can log out and povray will still be running.

  When you want to open screen again, log in and write "screen -r" (r as in
reattach) and voila, the console where you started povray from pops up.

  You can actually open several virtual consoles from screen. This is done
by pressing ctrl-a ctrl-c. To change between the last two consoles press
ctrl-a ctrl-a. You can also jump to a specific console with ctrl-a <number>.
To close a console simply write "exit" there (you can also kill a console
with ctrl-a ctrl-k, but that violently kills all the processes running in
that console so be careful).
  If you write "exit" in the only virtual console, it will terminate screen
altogether.

  Screen is especially useful when connecting to a remote machine with ssh
because it makes things safer. Your connection may suddenly be cut, but
that doesn't matter: After you log in again, you can get back to where
you were with "screen -d -r" (in this case the -d makes the running screen
to remotely deattach first; this is necessary because it was not explicitly
deattached when the connection suddenly dropped).

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.