FOR UBUNTU 11.04, 11.10 either look for "startup" in your DASH menu, or select from the Applications > Other menu "Startup applications"

There are two ways to get Ubuntu to load applications automatically each time you start up:

  1. Save your session when you log off, and the applications will be restarted when you sign back on.
  2. Configure Ubuntu to run an application every time you sign on.

Session Preferences Dialog

This dialog is not available in more recent versions of Ubuntu. It has been removed due to a bug.

Each time you log on to Ubuntu you are creating a "session." To customize your session, you have to modify the session settings. To do this go to (dependent on Ubuntu version) either of:

  • System > Preferences > Sessions

  • System > Preferences > Startup Applications

Ubuntu opens a dialog box that allows you to configure your session settings.

In Ubuntu 8.04 there are three tabs: "Session Options", "Current Sessions" and "Startup Programs". In Ubuntu 9.04 there are just two tabs: "Startup Programs"; "Options".

sessions.png

Startup Programs

This tab allows you to specify any applications that you want to run each time you begin a session. An example of such an application would be the network-manager applet (nm-applet), which allows easier access to wireless networks.

ADD

To add an applications click the "Add" button and type in the command you would use to run the application. If the program is called "evolution" the command would be evolution, but there are options, as well, that can be added to the command. (see below).

ADD.png


How to find the appropriate startup command

As an example consider the Evolution mail client. Imagine you want to load Evolution every time you start up, instead of clicking on the "Evolution Mail" icon in the panel bar to launch the program. You can add the appropriate command to the Startup Programs tab.

The following paragraph assumes your desktop environment uses Gnome 2. If you are using Ubuntu 11.04 or newer, then by default you are not using Gnome 2, and this procedure will not work.

Find the icon for Evolution in the panel bar at the top of the screen. Right click on it, and select "Properties." This will bring up the "Launcher Properties" dialog box. Notice the command in the "Command field." It may be necessary to place a cursor in the field by clicking on the line. Then use the arrow key to move right, to see the entire command.

properties.png

In this case, the command is: evolution --component=mail

Now we want to add this line as the command in the Add Startup Program dialog box. The Name Field can be any name you choose.

To summarize:

  • Go to System > Preferences > Sessions (or Startup Applications)

  • Select the "Startup Programs" tab
  • Click add
  • Enter a name to call the application (any name will do)
  • In the "Startup command box," enter the command
  • Click OK (You should see your new command)
  • Click Close

Test by restarting or logging out and back in.

If the application you want to add does not have an icon in the menu bar

First, locate the application in the menu structure -- do not select it to run, right mouse click to get the context menu and select "Add this launcher to panel."

This will place an icon for the application on the panel at the top of the desktop. Now you can follow the steps above to find and copy the appropriate command.

If you wish to remove the icon from your panel after you have done this, simply right click and select "Remove from panel."

To stop an application from running at startup

If you no longer want the application to start up when you logon:

  • Go to System > Preferences > Sessions

  • Select the "Startup Programs" tab
  • Select the application you want to remove
  • Click Remove
  • Click Close

OR

  • Un-check the box next to the name of the application

Session Options

options.png

This tab allows you to tell the system to remember what applications are running at logout, and start those applications at the beginning of your next login. This is accomplished by checking the box Automatically remember running applications when logging out. Similarly, clicking the floppy disk icon, tells the system to remember the applications that are currently running (if pidgin where running, for example), and to start those applications at the beginning of your next section.

Current Session

This tab shows the processes that are currently running.

Options

A simplified version of "Session Options" for 9.04; includes the Automatically remember running applications when logging out tick-box only.

Modifying program run options

Now you may wish to modify the way an application works at startup. This is possible through command line options, there are parts to the command line:

evolution --component=mail

The first part "evolution" is the command that is running.

The second part "--component=mail" is called an option. You can modify the way evolution starts up by changing this option. The real trick is to find out what the command line supports. You might try Google to search for these options. You can test these out on a command line:

  • Applications > Accessories > Terminal

And try out variations first. Once you have it right then you can change the settings in startup.

Good luck...

Moving applications to a workspace on startup and other advanced options

Using the way described above, all the applications start in one workspace, maximized and so on. If you wished for example to start an application in workspace 2 minimized, you would have to do it manually - unless you install devilspie - detailed howto can be found on the forums: http://ubuntuforums.org/showthread.php?t=75749t

Comments

This is a very handy way to start gdesklet, Firestarter (firewall) or other applications automatically. Some applications will actually add themselves to your Startup Programs tab after you configure them for the first time.


After following this tutorial I found that I didn't have a sessions tab for some reason and could not find the commands to open a couple programs. My alternative solution was to find the program under the applications drop down and right click and select "add this launcher to the desktop". then I right clicked the new desktop shortcut and copied the command field and manually added it. The browse button just wasn't doing it for me. I didn't know where to look. Being new to Ubuntu and Linux I never would have guessed that the command I needed to open cairo-dock was "cairo-dock -o". Afterwards deleted the shortcut on the desktop. Hope that helps someone.


AddingProgramToSessionStartup (last edited 2012-08-22 10:57:15 by 64)