www.ntnu.no *
INFOWEB >  programs >  general  > Running programs even if you're logged off
Tasks
You may add comments
Or e-mail this article
Read articles written by livermor
User rating
How much did this article help you?
Much Some Little
Print preview
You do not need a 'printer-friendly page' to print this page. Here's why
Contents

Running programs even if you're logged off

When logging off, programs will normally be closed. There are several ways to avoid this, you can use nohup or screen on NTNU's servers.

nohup

nohup is simple and easy to understand. With the command nohup use_command &, where use_command indicates which command you want to leave running even when you're logged out, you can start working. It's the &-sign which denotes 'working in background' that allows you to log off. For more information, type man nohup in any terminal.

screen

screen is more advanced and has a world of possibilities. It opens virtual windows (screens) where you can do whatever you want. You can have different things running on different screens and switch between them easily.

If you decide to use screen, you might want to give your screens different names so it is easier to navigate between them. To start a screen named 'irc' use the command screen -R irc. You will now be in the new screen and you can start everything normally there. To 'detach' the screen, press Ctrl+a+d. For more information on which commands you can give to the screen, press Ctrl+a+?. The Ctrl-part will be denoted with ^.

To open your screen again, write screen -r irc . If you want to, you can list all screens with screen -ls.

kode #1
There are screens on:
        1175.pts-75.james       (Detached)
        5217.pts-75.james       (Detached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.
For more information on how to use screen, type man screen.


Languages: en flag_no Comments: 0 Aid: 561 User rating:
 
 
Last updated: 2007-08-06 Author: livermor Read: 229 times