How can I make Ubuntu execute a script or program at startup?
If you need to execute something after you log into your Gnome session, then all you need to do is choose System>Preferences>Sessions from the menu, choose the “Startup Programs” tab, and add the path to whatever script/program you want to run at startup of session. If you need to run the script at boot time, before the GUI even loads, then it’s time to learn about the linux runlevel system. This page and this page will teach you in some detail about it. Here I will tell you about the basics very briefly. • The startup/shutdown scripts all live in directory /etc/init.d • Linux systems can operate in several “runlevels”. The default Ubuntu runlevel is 2. • Runlevel configuration is done by placing links from /etc/rcX.d/ to scripts in /etc/init.d (where X is the number of the runlevel) • The link naming convention is that the ones that start with S run at startup, ones that start with K run at shutdown, and the numbers allow you to specify the order in which the scripts run. • The progra