Ubuntu 16.04 how to run a script automatically

Registration date
Thursday February 2, 2017
Last seen
February 2, 2017
 Blocked Profile -
I'm a political and economic refugee from Windows 10 also a Newbie so please be charitable and as detailed as possible.
In your article "Use Band in a Box under Linux" you quote a script for running Timidity automatically at startup.
How do I add this to my system so that it does run at startup?
Many thanks for the article which works for me if I do it manually via the terminal.

Script from Mihawk:
echo "Launch timidity"
nohup timidity -iA -B2,8 -Os -EFreverb=0
sleep 2
echo "Timidity is launched"
echo "Starting Band in a box ..."
echo "Upon closure of BIAB, Timidity will turn off automatically.."
echo "Lauch program... !"
sleep 2
echo "Wait for user to close biab..."
nohup wine "C:\bandinabox2007\bbw.exe"
sleep 2
echo "Band in a box was closed : timidity suicide"
sudo killall timidity
echo "Timidity is killed"

1 reply

One more option is schedule a job at boot time

crontab -e

Choose an editor to open the cron job file. Append the following with your script name
@reboot path/to/script.sh

crontab -e

@reboot /home/user/Documents/file.sh

Script should have executable permission