|Latest version||0.4.3 (from 2010-03-18)|
|License||GNU General Public License|
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 supports X11 session management. However, this implementation is currently buggy and rarely used, and due to the complexity of X11 session management the bug cannot be fixed at the moment. A lightweight, stripped down version without X session management is being developed in parallel, named LXSession Lite.
Before the bugs in LXSession get fixed, replacing LXSession with LXSession Lite is highly recommended.
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)
In the future versions, LXSession will use the same config files as LXSession Lite.
Automatically start some applications on login
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;"
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.