Difference between revisions of "LXSession"

From LXDE.org
Jump to: navigation, search
(LXSession and LXSession Lite: update)
m (add ru)
Line 74: Line 74:

Revision as of 23:11, 13 November 2010

Developer LXDE Team
Latest version 0.4.4 (from 2010-04-05)
Genre Session Manager
License GNU General Public License
Website lxde.org

LXSession is the standard session manager used by LXDE. LXSession automatically starts a set of applications and sets up a working desktop environment. Moreover, the session manager is able to remember the applications in use when a user logs out and to restart them the next time the user logs in.

LXSession and LXSession Lite

LXSession Lite is an older package name which is no longer used.

LXSession was intended to support X11 session management, but the implementation was buggy and rarely used. As of version 0.4.4, there is still no support for X session management.

A lightweight, stripped down version without X session management was developed in parallel, named LXSession Lite, and still exists in repos for some older distros. In those cases, it is a suitable replacement for LXSession. LXSession Lite was renamed LXSession beginning at 0.3.8.

Configuration files

The config files of LXSession are stored in ~/.config/lxsession/<Profile Name>

If the config files are missing, LXSession loads system-wide config in /usr/share/lxsession/<Profile name> instead.

Note: If no -session has been passed on the command line to lxsession, the default profile name is LXDE.

Main config files used by LXSession Lite


This file stores the commands that will be executed at the beginning of the session. It is not a shell script, but each line represents a different command to be executed. If a line begins with @, the command following the @ will be automatically re-executed if it crashes.

Commands globally executed are stored in the /etc/xdg/lxsession/<profile>/autostart file, and in addition, other commands can be locally specified in the ~/.config/lxsession/<profile>/autostart file. If both files are present, all the entries in both files will be executed.


This file stores some configuration options

Main config file used by LXSession (deprecated)


default settings

In the future versions, LXSession will use the same config files as LXSession Lite.

Automatically start some applications on login

Both LXSession and LXSession Lite support freedesktop.org Autostart spec. Put *.desktop files of those applications in ~/.config/autostart, and they will get executed when the session starts.

Important note:

Some gnome applications have the "OnlyShowIn=GNOME" key in their *.desktop files. That key means 'only load this application in GNOME' and it prevents the application from being loaded in other desktop environments. Actually, most of those applications can work well under other desktops, but sometimes they claim they are GNOME-only.

If you cannot get an application automatically started and you already have a .desktop file for it in the autostart directory, then check the setting of the 'OnlyShowIn' key. Try commenting it out or removing the key. If the application still works ok then it's not really GNOME-specific - file a bug report for that application to its author and packager. As an example, the NetworkManager Applet (nm-applet) has the setting "OnlyShowIn=Gnome", but it works fine in LXDE. To make it autostart, just comment out or delete "OnlyShowIn=Gnome" in your ~/.config/autostart/nm-applet.desktop. If you are using different desktop environments on different sessions, and wish to use NetworkManager in LXDE, XFCE and Gnome, but not in KDE, you might want to add "OnlyShowIn=Gnome;XFCE;LXDE;" and/or "NotShowIn=KDE;"

Logging Out

To log out from the session you can run the command lxsession-logout. This will show you a dialog asking if you want to shutdown, reboot, change session, etc.

External Links