Ubuntu 16.04 how to run a script automatically [Closed]

gmcc8888 1 Posts Thursday February 2, 2017Registration date February 2, 2017 Last seen - Feb 2, 2017 at 12:07 PM - Latest reply: ChristianC123 4 Posts Wednesday July 5, 2017Registration date July 6, 2017 Last seen
- Jul 5, 2017 at 10:20 PM
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"
See more 

1 reply

ChristianC123 4 Posts Wednesday July 5, 2017Registration date July 6, 2017 Last seen - Jul 5, 2017 at 10:20 PM
0
Thank you
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

Regards,
Christian