PDA

View Full Version : Run a sh file when ubuntu startup



shivashiva
February 10th, 2012, 07:15 AM
Hi Friends,
I need to run a sh file when the ubuntu 9.04 startup.Please help me how to do. Thanks.

jayshomebrew
February 10th, 2012, 07:33 AM
goto
system/preferences/startup applicatoins
click the add button and add your .sh script.


http://lh6.ggpht.com/_FJH0hYZmVtc/Son1CMwQbhI/AAAAAAAACD0/r3F-Hwh5QsA/Ubuntu%209.04%20Jaunty%20Jackalope%20-%20Gnome%20-%20Startup%20Applications%20Preferences%5B4%5D.png

alternatively, you can add it to cron:
https://help.ubuntu.com/community/CronHowto

ie,

crontab -e
@reboot /home/jayshomebrew/bin/mycoolscript.sh