- The "Lightweight X11 Desktop Environment" is an extremely fast-performing and energy-saving desktop environment. Maintained by an international community of developers, it comes with a beautiful interface, multi-language support, standard keyboard short cuts and additional features like tabbed file browsing. LXDE uses less CPU and less RAM than other environments. It is especially designed for cloud computers with low hardware specifications, such as, netbooks, mobile devices (e.g. MIDs) or older computers.
- 1 Installation
- 2 Starting the Desktop
- 3 Tips and tricks
- 3.1 Application Menu Editing
- 3.2 Auto Mount
- 3.3 Autostart Programs
- 3.4 Bindings
- 3.5 Cursors
- 3.6 Digital clock applet time
- 3.7 Font Settings
- 3.8 Keyboard layout
- 3.9 Gnome-screensaver with LXDE
- 3.10 lxpanel Icons
- 3.11 LXDM
- 3.12 LXNM
- 3.13 PCManFM
- 3.14 Replacing Window Managers
- 3.15 Suspend and Hibernate Options
- 3.16 Shutdown and Reboot from LXDE
- 4 Troubleshooting
- 5 Resources
LXDE is very modular so you can choose the packages you need. 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.
You can install the LXDE group by:
# pacman -S lxde
This will install the following packages:
- Template:Package Official: A lightweight image viewer
- Template:Package Official: A utility to configure themes, icons and fonts for GTK+ applications
- Template:Package Official: The default settings for integrating different LXDE components
- Template:Package Official: An icon theme for LXDE
- Template:Package Official: An application launcher mainly for netbooks
- Template:Package Official: A collection of files intended to adapt freedesktop.org menu specification
- Template:Package Official: A desktop panel for LXDE
- Template:Package Official: A screen manager
- Template:Package Official: A standard-compliant X11 session manager with shutdown, reboot and suspend support
- Template:Package Official: A lightweight task manager
- Template:Package Official: A lightweight terminal emulator
- Template:Package Official: A daemon which automatically generates the menu for LXDE
- Template:Package Official: A lightweight, standard-compliant and highly-configurable window manager typically used with LXDE
- Template:Package Official: The default lightweight file manager for LXDE which also provides desktop integration
After the installation finishes, copy three files to ~/.config/openbox as instructed by pacman:
Place menu.xml, rc.xml and autostart.sh in ~/.config/openbox They can be found in /etc/xdg/openbox
As the user of interest
cp /etc/xdg/openbox/menu.xml /etc/xdg/openbox/rc.xml /etc/xdg/openbox/autostart.sh ~/.config/openbox
You will also need to install Gamin, a file and directory monitoring tool designed to be a subset of the FAM. It runs on demand of programs and therefore does not require a daemon like fam does. If you already have fam installed, remove it from the DAEMONS array in Template:Filename first and stop the daemon, then install gamin:
# pacman -S gamin
You may also want to install some lightweight applications typically used with LXDE:
# pacman -S leafpad xarchiver obconf epdfview
Note that some LXDE packages are experimental and you will need to install them from the AUR repository.
Starting the Desktop
There are lots of ways to start a LXDE desktop.
To be able to start the desktop from the console, several other options exist.
To use startx, you will need to define LXDE in your Template:Filename file:
exec ck-launch-session startlxde
This will launch LXDE with policykit session support (allow shutdown, restart, automounting...). Otherwise, use:
To start LXDE from the command line without a Template:Filename:
$ xinit /usr/bin/startlxde
If Template:Filename already exists this will not work.
Or start LXDE 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.
For other tasks you'll want to be sure that dbus is running as a daemon.
Tips and tricks
Application Menu Editing
The application menu works by resolving the Template:Filename files located in Template:Filename. Many desktop environments run programs that supersede these settings to allow customization of the menu. LXDE has yet to create an application menu editor but you can manually build them yourself if you are so inclined.
To remove items from the menu, instead of deleting the Template:Filename files, you can edit the file and add the following line in the file:
To expedite the process for a good number of files you can put it in a loop. For example:
cd /usr/share/applications for i in program1.desktop program2.desktop ...; do cp /usr/share/applications/$i \ /home/user/.local/share/applications/; echo "NoDisplay=true" >> \ /home/user/.local/share/applications/$i; done
This will work for all applications except KDE applications. For these, the only way to remove them from the menu is to log into KDE itself and use it's menu editor. For every item that you do not want displayed, check the 'Show only in KDE' option.
- .desktop files
$ ln -s /usr/share/applications/lxterminal.desktop ~/.config/autostart/
- autostart file
The second method is to use a Template:Filename file. This file is not a shell script, but each line represents a command to be executed, if a line begins with a @ symbol, the command following the @ will be automatically re-executed if it crashes. For example, to execute lxterminal and leafpad automatically at startup: Template:File
There is also a global autostart file at Template:Filename. If both files are present, all entries in both files will be executed.
Mouse and key bindings (i.e. keyboard shortcuts) are implemented with Openbox and are described in detail here. LXDE users should follow these instructions to edit the file ~/.config/openbox/lxde-rc.xml
The latest Template:Package AUR in AUR provides functionality to change cursor themes. If you do not want to install newer, experimental lxappearance2, you'll have to define your cursor in your Template:Filename file. See configuring cursor themes.
A basic way is to add the cursor to the default theme. First you will need to make the directory:
# mkdir /usr/share/icons/default
Custom folder icons in $HOME
Currently it looks like PCmanFM doesn't support this:
Digital clock applet time
You can right click on the digital clock applet on the panel and set how it displays the current time. For example, to display standard time instead of military time in the format of HH:MM:SS:
And in YYYY/MM/DD HH:MM:SS format:
See the man page on Template:Codeline for more options.
Most users of LXDE usually try to use GTK+ programs because GTK+ is the backend for LXDE. To set the fonts, you can use Template:Package Official and set the main font. For other fonts you will need to use the Gnome Font Preferences Control Panel:
# pacman -S gnome-control-center
After you have set your preferred font settings, you can safely remove the program as its settings will be retained.
1 way: Add in /etc/xdg/lxsession/LXDE/autostart following line before @lxpanel --profile LXDE:
@setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ru
or ~/.config/lxsession/LXDE/autostart (for separate user):
setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ru
2 way: Create /etc/xdg/autostart/setxkmap.desktop as following:
[Desktop Entry] Version=1.0 Encoding=UTF-8 Name=Fix keyboard settings Exec=setxkbmap -rules xorg -layout "us,ru" -variant ",winkeys" -option "grp:ctrl_shift_toggle" Terminal=false Type=Application
3 way: Edit ~/.Xkbmap for current user or /etc/X11/Xkbmap for all system add following line:
-option grp:ctrl_shift_toggle,grp_led:scroll us,ru
4 way: Add folowing line in /etc/X11/xinit/xinitrc or ~/.xinitrc:
setxkbmap -option grp:ctrl_shift_toggle,grp_led:scroll us,ru
Add the “Keyboard Layout Switcher” to our taskbar
- Right-click on your taskbar
- Choose “Add / Remove Panel Items”
- Choose “Add”
- Choose “Keyboard Layout Switcher”
Gnome-screensaver with LXDE
Install the needed packages:
pacman -S gnome-screensaver gnome-session
Create a simple launcher for gnome-session to allow the screensaver to work in Template:Filename
[Desktop Entry] Exec=/usr/bin/gnome-session
Now logout and log back in to enjoy gnome-screensaver.
Default icons used by lxpanel are stored in Template:Filename 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 Template:Filename file of the program whose icon you want to change in Template:Filename.
LXDE now provides an experimental display manager called LXDM. It's implemented with GTK+ and supports theming. To install LXDM:
# sudo pacman -S lxdm
Then change the following line to Template:Filename:
x:5:respawn:/usr/sbin/lxdm >& /dev/null
Edit your /etc/lxdm/lxdm.conf as following:
LXNM is a program based on scripts that attempts to manage the network connections. It is script-based and strives to make networking configuration as automatic as possible. It is not a full blown networking system like NetworkManager. If you want greater control, Wicd and Gnome's verions of NetworkManager works well with LXDE. You can install LXNM from [community] repository:
# pacman -S lxnm
The main script will need to be run as root. If you plan on consistently using it, put it in your Template:Filename. LXNM works with the network status monitor applet in lxpanel. LXNM works well most of the time, though at times it can take a while to get a connection.
If you want to be able to access the Trash, mount volumes, and folder/file tracking you'll want gvfs support:
pacman -S polkit-gnome gvfs
polkit-gnome provides an authentication and will need to be started on login:
mkdir -p ~/.config/autostart cp /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop ~/.config/autostart
Arch's polkit-gnome-authentication-agent-1.desktop currently doesn't exempt certain desktops. If you have trouble launching it remove the line:
Replacing Window Managers
Openbox, the default window manager of LXDE, can be easily replaced by other window managers, such as fvwm, icewm, dwm, metacity, compiz ...etc.
LXDE will attempt to use window manager from the user lxsession configuration file Template:Filename. If it does not exist, it will then attempt to use the global configuration file Template:Filename.
Replace the openbox-lxde command with the window manager of your choice:
window_manager=compiz ccp --indirect-rendering
Suspend and Hibernate Options
Currently (11-16-2010) to get Suspend and Hibernate buttons in the Logout dialog you will need to use HAL.
Shutdown and Reboot from LXDE
To be able to shutdown, reboot and suspend from the logout dialog, make sure that dbus and HAL are running, then add your user to the power group:
# gpasswd -a <USERNAME> power
exec ck-launch-session startlxde
If you still encounter problems, add the folowing lines in Template:Filename inbetween the <config> tag:
<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:
# /etc/rc.d/hal restart
NTFS with Chinese Characters
For a storage device with an NTFS filesystem, you will need to install the NTFS-3G package. Generally, PCManFM works well with NTFS filesystems, however there is one bug affecting NTFS users that if you have files or directories on an NTFS filesystem, the names of which contain non-latin characters (e.g. Chinese characters) may disappear when opening (or auto-mounting) the NTFS volume. This happens because the lxsession (or lxsession-lite) mount-helper is not correctly parsing the policies and locale options. There is a workaround for this:
Remove the Template:Filename which is a symbolic link.
# rm /sbin/mount.ntfs-3g
Create a new Template:Filename with a new bash script containing:
#!/bin/bash /bin/ntfs-3g $1 $2 -o locale=en_US.UTF-8
And then make it executable:
# chmod +x /sbin/mount.ntfs-3g
Add or edit the following line to Template:Filename under the [options] tag to prevent modification of this file in case of upgrading:
NoUpgrade = sbin/mount.ntfs-3g
KDM and LXDE Session
As of KDE 4.3.3, KDM will not recognize the LXDE desktop session. To fix it:
# cp /usr/share/xsessions/LXDE.desktop /usr/share/apps/kdm/sessions/
GTK+ Warnings with lxsession 0.4.1
When starting GTK+2 programs you get the following message:
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.
This is caused by the migration of lxde-settings-daemon config files into lxsession. If you made customizations to these config files, you are in need of merging those config files:
Alternatively, you can 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 Template:Filename, 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
# chmod a+x /etc/profile.d/kde3path.sh