LXDE Tips
Installing
With a Debian distribution, install the lxde
package.
# apt-get install lxde
Configuration
Autostart
To automatically start programs when your session starts you can either;
1. create a .desktop file in `~/.config/autostart/` e.g.
$ cat <<EOF >> ~/.config/autostart/lxterminal.desktop
[Desktop Entry]
Type=Application
Exec=lxterminal
OnlyShowIn=LXDE;
EOF
2. Add an entry to `/etc/xdg/lxsession/LXDE/autostart`
See also:
gnome-power-manager
To use gnome-power-manager to manage the battery, add an entry to
/etc/xdg/lxsession/LXDE/autostart e.g.
$ cat <<EOF | sudo tee -a /etc/xdg/lxsession/LXDE/autostart
@gnome-power-manager
EOF
lxpanel
See https://wiki.lxde.org/en/LXPanel
To restart lxpanel:
$ killall lxpanel
$ lxpanel -p LXDE &
Alternatively, you may be able to use:
$ lxpanelctl restart
Note: lxpanel in Debian 5.0 (Lenny) appears to fail
to display the menu if there are other files in
~/.config/lxpanel/LXDE/panels, e.g. a backup file such as
panel~. There also seems to be a bug when interactively
modifying the panel settings where the alpha value is
always set to zero and tintcolor is not updated with any
change.
When the panel is initially created, it includes buttons which can’t
be added using the interactive Application Launch Bar tool.
If you wish to add them to an application launch bar, you will need to
manually edit the ~/.config/lxpanel/LXDE/panels/panel
configuration file. An entry such as the following will replace
them:
Plugin {
type = launchbar
Config {
Button {
id=/usr/share/applications/lxde-x-www-browser.desktop
}
Button {
id=lxde-screenlock.desktop
}
Button {
id=lxde-logout.desktop
}
}
}
Keyboard Shortcuts
Keyboard and mouse bindings are configured in
~/.config/openbox/lxde-rc.xml
After making any changes, force openbox to reload the configuration with:
$ openbox --reconfigure
To find the names of keys, run xev in a terminal,
e.g. the following output is shown when the Print key is
pressed:
KeyPress event, serial 48, synthetic NO, window 0x3c00001,
root 0x2d5, subw 0x0, time 8709884, (858,131), root:(1207,181),
state 0x0, keycode 107 (keysym 0xff61, Print), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
The key’s name is shown on line three after
keysym 0xff61,
Some changes you may like to make:
...
<placement>
...
<monitor>Mouse</monitor>
...
</placement>
...
<theme>
...
<keepBorder>no</keepBorder>
...
</theme>
...
<desktops>
...
<number>4</number>
...
</desktops>
...
<keyboard>
...
<!-- Disable keys which conflict with Eclipse keys
<keybind key="C-A-Up">
<action name="DesktopUp">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-A-Down">
<action name="DesktopDown">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
-->
...
<!-- Modify S-A combinations to match Gnome defaults -->
<keybind key="C-S-A-Left">
<action name="SendToDesktopLeft">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-S-A-Right">
<action name="SendToDesktopRight">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-S-A-Up">
<action name="SendToDesktopUp">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<keybind key="C-S-A-Down">
<action name="SendToDesktopDown">
<dialog>no</dialog>
<wrap>no</wrap>
</action>
</keybind>
<!-- End - Modify S-A combinations to match Gnome defaults -->
...
<keybind key="W-l">
<action name="Execute">
<command>xscreensaver-command -lock</command>
</action>
</keybind>
<keybind key="W-t">
<action name="Execute">
<command>lxterminal --geometry=96x30</command>
</action>
</keybind>
<keybind key="A-C-l">
<action name="Execute">
<command>xscreensaver-command -lock</command>
</action>
</keybind>
<keybind key="W-Print">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Screenshot</name>
</startupnotify>
<command>xfce4-screenshooter</command>
</action>
</keybind>
<keybind key="A-F10">
<action name="MaximizeFull"/>
</keybind>
<keybind key="A-F5">
<action name="UnmaximizeFull"/>
</keybind>
<keybind key="A-F9">
<action name="Iconify"/>
</keybind>
<keybind key="A-F7">
<action name="Move"/>
</keybind>
<keybind key="A-F8">
<action name="Resize"/>
</keybind>
...
</keyboard>
LXAppearance
Many configuration changes can be made using the LXAppearance
application, which is available from the LXDE menu under
Preferences->Appearance.
Background Wallpaper
To change the background wallpaper, right-click on the desktop and
select Desktop Settings from the pop-up menu. The wallpaper
can be changed on the Desktop tab.
Menu
Desktop files (.desktop) are placed under;
/usr/share/applications~/.local/share/applications
See https://wiki.lxde.org/en/Main_Menu
Screenshots
Alternatively, if you are using Debian 6.0 (Squeeze) or later, you
can use the shutter application.
# apt-get install shutter
or
xfce4 Screenshot
# apt-get install xfce4-screenshooter
Preferred Applications
You can change the default browser and e-mail client by running
/usr/bin/libfm-pref-apps from the libfm-gtk0
package in Debian 6.0 (Squeeze). This is available on the Preferences
menu, under Preferred Applications.
Using lightdm Display Manager
On Debian, try setting the default xsession with:
# /usr/lib/i386-linux-gnu/lightdm/lightdm-set-defaults -s lxde
If you are using ~/.xession you will need to modify the
exec entry to exec startlxde
See also https://wiki.debian.org/LXDE
Debian Package Update Notifications
Install the package-update-notifier package.
When the display manager is next started, an icon is added to the System Tray panel applet, which is by default situated to the left of the Digital Clock panel applet in the task bar.
If the application is not running, it can be run in the background with:
$ package-update-indicator&
The running instance can be stopped with:
$ package-update-indicator --quit
Clicking on the package-update-indicator icon in the system tray lets
you modify the application’s preferences. You can also alter the
preferences from the desktop menu under
Preferences > Package Update Indicator Preferences.
To view the application’s debug logging, run it from inside a terminal with:
$ G_MESSAGES_DEBUG=all package-update-indicator
Use Ctrl-c to terminate it running in the foreground, or suspend it with Ctrl-z and run it in the background with:
$ bg %1
When the Refresh cache interval is set to
Always, it seems to update the cache three minutes after
the application is first run and thereafter hourly. Presumably
Always differs from Hourly in that
Always will also refresh the cache each time you login to a
new desktop session, whether within the hour or not.
– Frank Dean - 07 Aug 2025
Trouble-shooting
Screen Saver Auto Locks the Session after 10 minutes
This forces you to have to login again. This is the behaviour seen on
Debian 12 (Bookworm) and Debian 13 (Trixie) if xscreensaver
is not installed.
The current X screen saver settings can be viewed with:
$ xset q
To change the settings to disable both the screen saver and display blanking:
$ xset s 0 0 s noblank s noexpose -dpms
See the ‘s’ option in man xset for the meaning of these
values.
To run those settings on subsequent sessions, append them to
${HOME}/.config/lxsession/LXDE/autostart, e.g.
$ echo 'xset s 0 0 s noblank s noexpose -dpms' \
>> ${HOME}/.config/lxsession/LXDE/autostart
– Frank Dean - 01 Dec 2025
Resources
- https://lxde.org
- https://wiki.lxde.org/en/LXDE:Questions
- https://wiki.debian.org/LXDE
- https://standards.freedesktop.org/desktop-entry-spec/latest/
- https://openbox.org/help/Configuration
- https://wiki.archlinux.org/index.php/NetworkManager#Automatically_unlock_keyring_after_login
– Frank Dean - 2 Dec 2011
Related Topics: DebianTips, LinuxHintsAndTips