Ubuntu 16.04 how to run a script automatically

Closed
gmcc8888 Posts 1 Registration date Thursday February 2, 2017 Status Member Last seen February 2, 2017 - Feb 2, 2017 at 12:07 PM
 Blocked Profile - 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"
Related:

1 response

Blocked Profile
Jul 5, 2017 at 10:20 PM
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
0