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:
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
nohupthe 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
datum.txtit’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
Aand then number between 0 and 9 (for the corresponding console)
screen -d sitzung1