Home > howto, shell > Start [email protected] on Boot with Screen on Ubuntu Linux

Start [email protected] on Boot with Screen on Ubuntu Linux

March 1st, 2008

Quick instructions to get [email protected] (or any other program) to run at boot before user login on Ubuntu Linux. This probably works on other distros with an rc.local file too.

1. Install [email protected] client, mine is in /opt/folding

2. Create a simple script, I called mine folding.sh and is only has:

1
2
3
#!/bin/bash
cd /opt/folding
./fah6 -smp

3. Put the screen command in /etc/rc.local. This will execute as user nick (su nick -c), “-dmS” will create the session detached and name it folding, and “bash –rcfile” will allow the screen session to keep running even if folding quits.

1
su nick -c "screen -dmS folding bash --rcfile /home/nick/bin/folding.sh"

[email protected] now starts whenever the computer boots, before anyone logs in. Nick can reattach to it and  control it or watch the progress by running “screen -r folding”.

Categories: howto, shell
Comments are closed.