LXSession

From LXDE.org
Revision as of 13:47, 12 January 2012 by 10.0.0.8 (Talk)

Jump to: navigation, search
LXSession
Developer LXDE Team
Latest version 0.4.6.1 (from 2010-07-27)
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, It's desktop-independent and can be used with any window manager.

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

autostart

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.

config

This file stores some configuration options

Main config file used by LXSession (deprecated)

default

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