Here is a description how you can still run programs after you have logged out. This happens by starting the programs on the server which is configured identically on the computers in the hall.
If a student wants to run a computer intensive program at night, this is in principle not a problem, as far as the following points are taken into consideration:
ssh RBG-Kennung@lxhalle.in.tum.de
test.sh
, that writes every single second the actual date in datum.txt
. This is just an example of a program, that can run in the console. The script is composed by the following line of code:
#!/bin/bash while true do sleep 1 date done >> datum.txt
nice -n 19 nohup ./test.sh &starts the test script and the control operator (
&
) makes the command run in the background.
datum.txt
, even after the user logs out
nohup
the PID of the process is shown. PID can be used to close a program (if it doesn’t terminate automatically), to do so you should enter the following command kill PID
.
datum.txt
it’s still written
The screen command enables you to create more than one screen sessions, which once again can consist of up to 10 virtual consoles. In this consoles you can start programs, that remain even after the session of the terminal window is closed.
nice -n 19 screen
nice -n 19 screen -S sitzung1
Strg
+ A
and then C
Strg
+ A
and then K
Strg
+ A
and then Leertaste
Strg
+ A
and then number between 0 and 9 (for the corresponding console)
Strg
+ A
and then D
screen -d sitzung1
Strg
+ D
exit
screen -ls
Strg
+ A
and then ?
man screen
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
![]() |
nohupTest.png | manage | 93 K | 05 May 2011 - 07:14 | MarekOrschewskiNe26gik | |
![]() |
screen.jpg | manage | 74 K | 29 Jun 2011 - 08:16 | MarekOrschewskiNe26gik | |
![]() |
vdiExit.png | manage | 2 K | 12 May 2011 - 09:53 | MarekOrschewskiNe26gik |