Difference between revisions of "RHEL 5 Desktop Startup Programs and Session Configuration"

From Techotopia
Jump to: navigation, search
(New page: By default, the Red Hat Enterprise Linux 5 GNOME system starts a number of different programs each time a user logs into a desktop session. Sometimes the default list includes programs tha...)
(No difference)

Revision as of 16:31, 28 July 2010

By default, the Red Hat Enterprise Linux 5 GNOME 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, or the user may wish for any currently running programs to be automatically restarted next time that user logs in to the desktop. In this chapter we will look at configuring programs to auto-load when a user logs in and how to create and manage sessions.


Contents


Session Managed and Non-Session Managed Programs

Programs in the context of the GNOME desktop fall into two categories; those that are session managed and those that are not. Session managed programs are aware that they are running in a session and are able to react to notifications from the session manager. A session managed program, for example, will save all the current settings and data when informed by the session manager that the session is ending. Depending on the session configuration settings, the program will then restart with the previous settings and data the next time the session starts. Programs that are not session managed will not be able to respond to notifications that the session is ending and will lose any settings and data that have not already been manually saved by the user.

Understanding Sessions

Each time a user logs into the RHEL 5 GNOME desktop they create an instance of 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 by the session manager. 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. In addition custom sessions can be created, each with a different set of default programs configured to start up, that can then be selected by users when logging into the desktop.


Creating a New Session

When The GNOME desktop is installed along with the RHEL 5 operating system a small selection of sessions are also installed. When the login screen appears, clicking on the Sessions option at the bottom of the screen lists these sessions. Typically the first time user will log in using the session named GNOME. It is possible, however, to create new sessions that are configured to start specific programs automatically. New sessions are created from the Sessions configuration tool which is launched via the System -> Preferences -> More Preferences -> Sessions menu option. Once loaded, the dialog will display with the Session Options panel preselected:


RHEL 5 session management dialog


To create a new session, click on the Add button and enter a descriptive name for the session and then exit from the Sessions tool. Next time you encounter the login screen your new session should be listed and available for selection when you click on the Sessions option.

Configuring Session Preferences

The Session Options panel of the Session configuration tool provides three preferences that apply to all sessions. These options are as follows:

  • Show splash screen on login – Controls whether or not the CentOS splash screen is displayed when the user logs in. This small window appears after the user has entered the login credentials and displays information as each component of the desktop environment is loaded.
  • Ask on logout – Controls whether a confirmation dialog is displayed when the user logs out of the current desktop session.
  • Automatically save changes to session – When selected, this option causes the status of the currently running session managed programs to be saved when the user logs out of the session and then restarted the next time the user logs in. If, for example, the user was editing a file using the GEdit text editor, the editor would start with the same file opened next time the user logs in. Note that not all programs are session managed, so may not restart automatically even if this option is selected.

Configuring the Current Session

The Current Session page of the Session management tool provides the ability to modify various aspects the programs that are currently running in the session. When selected, the panel appears as illustrated in the following figure:


Currently running programs


The main area of this screen lists all the currently running programs within the current desktop session. Scrolling through the list will display a number of background processes together with any applications that you have started on the desktop since logging in. Below the program list are a number of buttons and menus that allows a variety of factors to be configured:

  • Order – Specifies the priority given to the currently selected program during the session start up process. The lower the value, the higher the priority for the program during startup. To change the priority of a program, select it from the list, change the Order value and click on the Apply button.
  • Style – Controls what happens to the selected program when the session restarts. Normal indicates the program should start automatically when the session starts. Restart causes the program to be restarted whenever it is exited or terminated. Trash disables autostart for the program. The Settings option causes the application to autostart using the same session settings that were configured during the last session instance.
  • Remove – Removes the currently selection program from the session. The program will terminate and, if the current session is saved, will not start next time the user logs in to the current session.

Configuring Startup Programs

So far we have looked primarily at configuring session managed programs. The Startup Programs page of the Sessions tool allows you to configure non-session managed programs to be automatically started when the user logs in:


Configuring RHEL 5 Startup programs


To add a new program to the list, simply click on the Add button and use the Browse button in the resulting Add Startup Command window to navigate to the program to be started each time a user logs into the session. To disable autostart for the currently selected program simply click the Disable button. The label on button will then change to Enable and may then be used to re-enable the selected program if required.