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.
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.
| Språk: | Kommentarer: | 0 | Aid: | 561 | Brukervurdering: |
|
|
| Sist oppdatert: | 2007-08-06 | Forfatter: | livermor | Lest: | 223 ganger |