Ubuntu Tips: How To Launch Applications Automatically During Startup

by Ramesh Natarajan on July 24, 2009

Question: How do I open Firefox browser (or any application) automatically when I login to Ubuntu or Kubuntu ?

Answer: In gnome you can do this by using the gnome-control-center (or) directly from the “Startup Application Preferences” as explained in this article.

Step 1: Go to “Startup Application Preferences” in Ubuntu

Go to System -> Preferences -> Startup Application, which will display the following window.

Fig: Ubuntu Startup Application Preferences

Fig: Ubuntu Startup Application Preferences

Step 2: Add the startup program

Click on ‘Add’ button and enter the following information as shown below. Reboot the system after this change and you’ll see Firefox browser automatically getting launched after login.

  • Name: Name of the program. For example, Firefox
  • Command: The command that needs to be executed. In this example, it is “firefox”. If the PATH is not set properly, click on Browse and choose the Firefox executable.
  • Comment: Enter some user-friendly information.
Fig: Ubuntu - Add Startup Program (e.g. Firefox Browser)

Fig: Ubuntu - Add Startup Program (e.g. Firefox Browser)


Linux Sysadmin Course Linux provides several powerful administrative tools and utilities which will help you to manage your systems effectively. If you don’t know what these tools are and how to use them, you could be spending lot of time trying to perform even the basic administrative tasks. The focus of this course is to help you understand system administration tools, which will help you to become an effective Linux system administrator.
Get the Linux Sysadmin Course Now!

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

{ 11 comments… read them below or add one }

1 Anonymous July 24, 2009 at 7:04 am

Is there a way to automate this procedure via command line rather than GUI? Thanks.

2 Gagan Brahmi July 24, 2009 at 12:48 pm

For newer version of Ubuntu the name has changed from “Startup” to “Sessions”.

So the following will be the path:

System -> Preferences -> Sessions

3 Chris July 24, 2009 at 5:07 pm

I have a script that disables my touch pad (it is too sensative). When I run the script it asks for the root password. I tried doing a chmod 7777 (4 of them) on the script but it still asks for the root password. Any ideas?

4 Ramesh Natarajan July 25, 2009 at 12:14 am

@Anonymous,

What are you trying to achive by trying to set this up using command-line. Whether you use command-line or GUI, you still need to do a one-time setup of this. After the initial setup, it is automatic. So, what is the advantage of trying to set this up from command line?

@Gagan,

Thanks for pointing out that the “Startup” got changed to “Sessions”.

@Chris,

For most administrative tasks you have to give root password to make any changes. So, I’m assuming that without the root password, that particular script might not be able to disable the touch pad. What is the problem in giving the root password? Don’t you remember your root password?

5 chris July 25, 2009 at 7:58 pm

(P.S. I am using Ubuntu) The touch pad is broken. When I type the touch pad thinks it is being clicked and moves the mouse. I tried to add the script to /etc/rc.local but it does not disable the touch pad when I log in. So when I log in, I have put an icon on my desktop to run the script. The script is set to 777. So what I am trying to do is modify my GUI login to disable the touchpad.

Thanks.

6 sarim August 10, 2009 at 7:00 am

I am using Ubuntu as well to disable the touch pad you just have to write a code

synclient TouchpadOff=1

make the file executable and add it in
system>preferences>sessions>startup programs

if you want to activate your touch pad just write in the terminal
synclient TouchpadOff=0

that’s it you don’t need any root password.
have fun

7 Edward November 1, 2009 at 3:48 am

I have a very silly question: how can I add a startup program if I have broken my window manager? I was trying to install the netbook-remix stuff on Intrepid (8.10) and it all looked great except I forgot the step to add the “netbook-launcher” app to my startup programs. Now I just get a blank X-session when I log in but no menus. I can start in command line mode but then I need to know exactly which files to edit to ensure the “netbook-launcher” starts. Thanks for your help. Edward

8 David February 1, 2010 at 6:10 pm

@Edward,

You can also add items to this list using the file ~/.xinitrc. Use gedit or nano to open the file, and then simply append to the file list. Good luck!

9 magellan January 17, 2011 at 9:32 am

Me i ask if how about the application is in need of root permission.

10 Krestyaji July 24, 2011 at 3:19 am

I confused with my problem, I can’t find startup application in my Ubuntu..
any way to open in terminal ?

11 Imran March 27, 2012 at 5:02 am

I have configured xscreensaver as a startup program just as mentioned above with the command “xscreensaver -no-spalsh” but it doesn’t start. How to fix this ? In general where to look the log of startup program to check whats the problems it faced in starting up configured commands.

Leave a Comment

Previous post:

Next post: