- SSH with local X (any X window should be run locally rather than remotely)
ssh -X user@instance
- Leave a process running even when you leave the SSH session
- Make your script executable with
chmod +x main.py
- 2 possible instructions:
- If console output does not matter (console output is still available in nohup.out but only if execution is finished successfully):
nohup python main.py &
- If output must be saved even if you interrupt the execution:
- (bash)
nohup python -u main.py > output.log &
- (zsh)
nohup python -u main.py > output.log &!
- (bash)
- If console output does not matter (console output is still available in nohup.out but only if execution is finished successfully):
exit
- Make your script executable with
References: