Difference between revisions of "LXDE"

From ArchWiki
Jump to navigation Jump to search
(use i18n template)
Line 1: Line 1:
[[Category:Desktop environments (English)]]
[[Category:Desktop environments (English)]]
[[Category:HOWTOs (English)]]
[[Category:HOWTOs (English)]]
{{i18n_entry|简体中文|LXDE (简体中文)}}
{{i18n_entry|Español|LXDE (Español)}}
{{i18n_entry|Italiano|LXDE (italiano)}}
The article will guide you how to install and setup various components of the '''L'''ightweight '''X'''11 '''D'''esktop '''E'''nvironment.  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.
The article will guide you how to install and setup various components of the '''L'''ightweight '''X'''11 '''D'''esktop '''E'''nvironment.  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.

Revision as of 00:05, 20 February 2010

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

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.


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.

The minimal obligatory packages which you have to install to run LXDE are Template:Package Official, Template:Package Official, Template:Package Official, and a window manager.

Install the LXDE group by:

# pacman -S lxde

Installing the group lxde will install the following packages:

  • gpicview
  • lxappearance
  • lxde-common
  • lxde-settings-daemon
  • lxlauncher
  • lxmenu-data
  • lxpanel
  • lxrandr
  • lxsession-lite
  • lxtask
  • lxterminal
  • menu-cache
  • openbox
  • pcmanfm

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:

exec startlxde

To start LXDE from the command line without a Template:Filename (if a Template:Filename already exists this will not work):

$ 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.

Auto Mount

If you want a removable storage device to mount automatically with PCManFM, you must install HAL and add your user to hal group:

# 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.

NTFS bug

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.
rm /sbin/mount.ntfs-3g
  • Create a new "/sbin/mount.ntfs-3g" with a new bash script containing:
/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]"

Autostart Programs

To auto-start programs (have them load when you login), two methods are available.

First you can link a program's Template:Filename file to Template:Filename. Installed programs put their Template:Filename file in Template:Filename. For example:

$ ln -s /usr/share/applications/lxterminal.desktop ~/.config/autostart/

Once Template:Filename files have been added you can manipulate them with the GUI configuration tool Template:Package AUR.

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:

man strftime

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:

  1. 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)
  2. Right click anywhere on the launch bar applet
  3. Choose "application launch bar settings"
  4. Choose "add"
  5. 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]
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)

lxpanel Icons

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:

  1. Save the new icon to /usr/share/pixmaps
  2. 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)
  3. Change



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 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 action="org.freedesktop.hal.power-management.reboot">
 <return result="yes"/>
<match action="org.freedesktop.hal.power-management.suspend">
 <return result="yes"/>
<match action="org.freedesktop.hal.power-management.hibernate">
 <return result="yes"/>

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.

LXsession full

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