How do I keep tmux, screen, matlab, and other long running processes running after I log off?

Tags Linux

In order to prevent extraneous processes that tend to remain after log off from slowing down the Linux home folder storage, our Linux configuration will kill any processes after log off of a graphical session this additionally makes determining whether a machine is in use or not. 

However, we allow users to explicitly launch long running processes. First enable the "linger" capability for your user:

loginctl enable-linger $USER

It is recommended to put this line in your ~/.xinit or ~/.xsession if you will use this functionality often. Then launch your program/process using the following systemd-run command in any terminal:

systemd-run --scope --user tmux

Replacing tmux as needed with any other process name. If may be useful to make aliases corresponding to the above command in your .bashrc or .zshrc .

Keep in mind that the Linux lab machines are liable to be rebooted at any time for maintenance (except when a user is physically present at a machine). If you find you need more reliable uptime, consider running your process remotely on isengard.mines.edu or in the HPC environment.

Details

Article ID: 72051
Created
Thu 2/14/19 11:21 AM
Modified
Thu 6/6/19 7:30 AM