The article will guide you how to install and setup various components of the Lightweight X11 Desktop Environment. LXDE is designed to be able to run on computers with minimal hardware requirements, and needs few dependencies. The LXDE design philosophy is to be lightweight but useful.
- 1 Features
- 2 Components
- 3 Install
- 4 Starting the Desktop
- 5 Tips and Bug Fixes
- 5.1 Auto Mount
- 5.2 Autostart Programs
- 5.3 Digital Clock Applet Time
- 5.4 KDM bug fix
- 5.5 lxpanel Add Launcher (application)
- 5.6 lxpanel Add Launcher (location)
- 5.7 lxpanel Icons
- 5.8 My Documents Icon
- 5.9 Replace Window Manager
- 5.10 Shutdown and Reboot from LXDE
- 5.11 Problems when updating to Version 0.4.1 of lxsession
- 5.12 LXsession full
- 5.13 Using KDEmod3 applications under LXDE
- 6 Resources
Some of LXDE's features are:
- Lightweight - runs with reasonable memory usage (After Xorg server and LXDE are started, the total memory usage is about 45 MB on i386 machines.)
- Fast - runs well even on older machines produced in 1999 (The hardware requirements of LXDE is similar to Windows 98)
- Functional design - gtk2 user interface and GNOME HIG standards.
- Desktop independent - Components can be used without LXDE.
- Standards compliant - follows the specifications of the Freedesktop project.
Information about some of the components:
- PCManFM: File manager, desktop functionality, and wallpaper.
- LXPanel: Taskbar with application manager, application menu, and number of applets.
- LXSession: Standard-compliant X11 session manager with shutdown/reboot/suspend support (requires HAL).
- LXAppearance: Theme editor able to change GTK+ themes, icon themes, and fonts for GTK applications.
- Openbox: Lightweight, standard-compliant, and highly-configurable window manager (recommended WM, but not developed by LXDE Project).
- Obconf - Tool to configure the Openbox theme style.
- GPicView: A basic lightweight image viewer.
- Leafpad: Lightweight and basic text editor (not developed by LXDE Project).
- XArchiver: Lightweight file archiver (not developed by LXDE Project).
- LXNM Lightweight network manager for wireless connections (under development and in the AUR).
LXDE is modular so you can choose the packages you need. Some packages are experimental and you will need to use the AUR repository to install them.
Install the LXDE group by:
# pacman -S lxde
Installing the group lxde will install the following packages:
You will also need to install Gamin. Gamin is a file and directory monitoring tool designed to be a subset of the FAM. It runs on demand for programs that have support for it so does not require a daemon like fam does. If you have fam installed, remove it from the DAEMONS array in Template:Filename and stop the daemon before installing gamin.
pacman -S gamin
Other packages you might want to install:
pacman -S leafpad xarchiver obconf
Starting the Desktop
You can start LXDE in several different ways. If you are using display managers like SLiM, GDM, or KDM, open the session option and choose LXDE. To be able to do this from the console, several other options exist.
To use startx you will need to define LXDE in your [[Beginners'_Guide#C:_Test_X|Template:Filename]] file:
exec ck-launch-session startlxde
This will launch LXDE with HAL support that provides the ability to restart or shutdown your computer from the logout dialog. If you don't want to use HAL:
$ xinit /usr/bin/startlxde
- Or from a console-kit session:
$ xinit /usr/bin/ck-launch-session startlxde
If you want to run startx at boot automatically, take a look at the starting X at boot guide.
Tips and Bug Fixes
Tips to help with LXDE programs and bug fixes.
# gpasswd -a your_username hal
Then pmount is required for mounting removable devices without root access:
pacman -S pmount
Now logout and back in again to so that your user is recognized as part of the hal group.
If your removable storage device has an NTFS filesystem, you should install NTFS-3G as well.
Generally, PCManFM works well with HAL. Currently, there is one bug affecting NTFS users that if you have files or folders on an NTFS filesystem, the names of which contain non-latin characters (ie: Chinese Characters) may disappear when opening (or automounting) the NTFS volume. This happens because the lxsession (or lxsession-lite) mounthelper is not correctly parsing the policies and locale option. There is a workaround for this:
- Remove the "/sbin/mount.ntfs-3g" which is a symlink.
- Create a new "/sbin/mount.ntfs-3g" with a new bash script containing:
#!/bin/bash /bin/ntfs-3g $1 $2 -o locale=en_US.UTF-8
- Make it executable:
chmod +x /sbin/mount.ntfs-3g
- Add "NoUpgrade = sbin/mount.ntfs-3g" to pacman.conf under the "[options]"
To auto-start programs (have them load when you login), two methods are available.
$ ln -s /usr/share/applications/lxterminal.desktop ~/.config/autostart/
The second method is to use a Template:Filename file.
$ touch ~/.config/lxsession/autostart
And add the program you would like to start on a newline:
Digital Clock Applet Time
To get standard time (not military time) use:
More options are available in:
KDM bug fix
As of KDE 4.3.3, KDM will not recognize the LXDE desktop session. To have it do so:
# cp /usr/share/xsessions/LXDE.desktop /usr/share/apps/kdm/sessions/
lxpanel Add Launcher (application)
lxpanel comes with a launcher applet by default and all you need to do to add new apps to it is:
- Make sure launch bar applet is enabled:
- 1a. right click the panel
- 1b. select "add/remove panel items"
- 1c. make sure "application launch bar" is listed (if it's not, select "add" and add it)
- Right click anywhere on the launch bar applet
- Choose "application launch bar settings"
- Choose "add"
- Direct it to the .desktop file of whatever application you want to add (found in usr/share/applications)
lxpanel Add Launcher (location)
To add a launcher to a specific location such as a media hard drive or folder you need to create a .desktop file and save it in /usr/share/applications. You can then add it the same way as adding an application to the panel.
Here is a custom .desktop file as an example, edit lines "Exec" and "Icon" as needed:
[Desktop Entry] Version=1.0 Encoding=UTF-8 Name=media Exec=pcmanfm /mnt/xbox (basically you're telling pcmanfm to open a specific location - /mnt/xbox in this case) Icon=xbmc.png (this should be the name of an icon in /usr/share/pixmaps) Terminal=false X-MultipleArgs=false Type=Application Categories=Application StartupNotify=true
Default icons used by lxpanel are stored in /usr/share/pixmaps and any custom icons you want lxpanel to use need to be saved there as well.
You can change default icons for applications by taking the following steps:
- Save the new icon to /usr/share/pixmaps
- Use a text editor to open the .desktop file of the program whose icon you want to change (.desktop files can be found in /usr/share/applications)
My Documents Icon
The desktop entry for "My Documents" cannot be removed. It is compiled directly into pcmanfm, file src/desktop/desktop-window.c. The icon that is used is gnome-fs-home, with folder-home as fallback. If the chosen icon theme does not have this icon, it needs to be created, or else the desktop entry will have no icon associated with it.
Replace Window Manager
OpenBox, the default window manager of LXDE, can be easily replaced by any one you like, such as fvwm, icewm, dwm and awesome... etc..
The window manager LXDE will attempt to use is defined this file:
Per default this is defined as
Replace openbox-lxde with the window manager of your choice.
It might be also worth looking at:
These default settings however appear to be deprecated, as there is this note in the file:
! This file is kept for backward compatibility. ! Only used by obsolete lxsession, not lxsession-lite.
Anyhow, for example, somebody's /etc/xdg/lxsession/LXDE/default looks like this:
smproxy openbox lxpanel
smproxy is a program provided in xorg. It provides session management support for programs which don't know X11 R6 session management protocol. It is highly recommended you include this line in your desktop.
Shutdown and Reboot from LXDE
To be able to shutdown, reboot, suspend and so on from lxde make sure that DBus and HAL are running. Then add your user to the power group.
# gpasswd -a <USERNAME> power
If you still encounter problems, add inbetween the <config></config> tags in /etc/PolicyKit/PolicyKit.conf the folowing lines:
<match action="org.freedesktop.hal.power-management.shutdown"> <return result="yes"/> </match> <match action="org.freedesktop.hal.power-management.reboot"> <return result="yes"/> </match> <match action="org.freedesktop.hal.power-management.suspend"> <return result="yes"/> </match> <match action="org.freedesktop.hal.power-management.hibernate"> <return result="yes"/> </match>
Then restart HAL.
Problems when updating to Version 0.4.1 of lxsession
When starting GTK2 programs you get:
GTK+ icon them is not properly set
This usually means you don't have an XSETTINGS manager running. Desktop environment like GNOME or XFCE automatically execute their XSETTING managers like gnome-settings-daemon or xfce-mcs-manager.
Functionality/Config files of lxde-settings-daemon was recently merged into lxsession. If you made customizations to config files you are in need of merging those config files:
You can also use lxappearance from the community repository to fix this.
There are some bugs in lxsession related to session management. lxsession-lite is a version of lxsession which does not have the session management capability. The stability of lxsession-lite is better than lxsession, however it can not save and restore sessions. Thus it is recommended to use lxsession-lite till the problems in lxsession are fixed.
Using KDEmod3 applications under LXDE
As older versions of KDEmod[-legacy] are still installed under /opt/kde/bin, they are not automatically recognized by LXDE. To use them, you can either edit your PATH with the following command:
echo 'PATH=$PATH:/opt/kde/bin' >> /etc/rc.local
or you can add the following script to /etc/profile.d:
Save it as "kde3path.sh" and make it executable:
chmod +x /etc/profile.d/kde3path.sh