Version 3 of session management

Updated 2003-10-10 09:23:16

Definitions

A session is a group of running applications, each of which has a particular state. The session is controlled by a service called the session manager. The applications participating in the session are called session clients.

The session manager issues commands to its clients on behalf of the user. These commands may cause clients to commit unsaved changes (for example by saving open files), to preserve their state for future sessions, or to terminate gracefully. The set of these operations is called session management.

In the common case, a session consists of all applications that a user runs on their desktop at a time. Under Unix/X11, however, a session may include applications running on different computers and may span multiple displays.


On Unix/Linux, you can get a list of session clients with the command xlsclients


X session management has been centered around libSM, which has come with X for years. It is shared by GNOME and KDE - even twm. Standards documents on include ftp://ftp.x.org:21/pub/R6.4/xc/doc/hardcopy/SM/SMlib.PS.gz and ftp://ftp.x.org/pub/R6.4/xc/doc/hardcopy/SM/xsmp.PS.gz

See also the ICCCM section on SM. For GNOME apps, use the GnomeClient object. For a simple example of using libSM directly, twm/session.c in the twm source code is pretty easy to understand.


See also:


Category Glossary