Ubuntu 11.04 Unity Desktop - Starting Applications on Login
By default, the system starts a number of different programs each time a user logs into a desktop session. Sometimes the default list includes programs that are not needed by every user. On other occasions, additional programs are required by the user. In this chapter we will look at configuring programs to auto-load when a user logs into an Ubuntu desktop session.
Understanding Sessions
Each time a user logs into the Ubuntu desktop they create a session. This session lasts right up until the point that the user logs out of the desktop or switches to another user. When a session starts, a number of programs are started automatically. Many of these are required for the desktop environment to function and are largely invisible to the user. Others may be applications which the user prefers to have started each time she logs in. Fortunately Ubuntu makes it easy to control what gets started when a specific user logs in.
Configuring Desktop Startup Programs
The programs that get started when a user logs in are controlled via the Startup Applications Preferences tool. This tool may be launched by selecting the Startup Applications button in the Control Panel (click on the power button in the top right hand corner of the screen and select the System Settings menu option). Alternatively, launch the tool directly by pressing Alt-F2 and entering gnome-session-properties into the Run a command box. When first loaded, the dialog displays the Startup Applications Preferences panel listing the programs that are to be started when a user logs into a desktop session:
Any programs which are not required may be disabled on desktop startup simply by unselecting the selection box next to the item. Most of the programs configured to start by default are there for a reason so unless you are sure you will not need the program (for example you may never plan to use Bluetooth) there is really little to be gained by disabling a program.
It is more likely, however, that you will need to add a program to be launched automatically when you log in to a desktop session. This can easily be achieved by clicking on the Add button. In the resulting Add Startup Program dialog enter the name of the program and then click on the Browse button to locate the program on the file system. Once you have filled in the dialog press the Add button to apply the program to the list:
The above dialog is configuring the session to automatically launch a Terminal window (which is actually a program named gnome-terminal located in the /usr/bin directory) each time the current user logs into the desktop session.
Saving the Current Session
Those familiar with previous releases of Ubuntu may have used a feature known as session saving. This feature allowed the desktop to be configured to automatically save details of any currently running applications when the user logged out of the desktop, and then restart them at the start of the next session. Unfortunately due to problems with supporting multiple session types and identifying which processes represented actual user application as opposed to desktop related system processes this feature was removed from Ubuntu 11.04. This feature may return in a future release though at time of writing there appear to be no immediate plans to re-introduce this support, at least in the near future.