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)

Download Free eBook - Linux 101 Hacks

Get free Unix tutorials, tips and tricks straight to your email in-box.

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

  1. Ubuntu Tips: How To Fix Firefox Slow Scrolling Problem
  2. Ubuntu Tips: How to Login Without Entering Username and Password
  3. Ubuntu Tips: How To Use Windows Applications in Linux Desktop Distributions
  4. Ubuntu Tips: What is a Timed Login In Ubuntu or Kubuntu ?
  5. Ubuntu Tips: How To Enable Root User ( Super User ) in Ubuntu
  

Vim 101 Hacks Book

{ 8 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!

Leave a Comment

Previous post:

Next post: