Welcome to the Tiny Core Linux Wiki at tinycorelinux.net!

Migrate from FLWM to LXDE (dCore-trusty example)

LXDE is a Desktop Environment based on the OpenBox Window Manager. It includes, among other things, a comfortable panel and a set of helper applications, the most prominent being it's file manager PCManFM and editor Leafpad. Although LXDE does not provide the necessary mechanisms for dealing with OnDemand applications, with a little work it plays nice with dCore.


These instructions are known to work on …

  • dCore-trusty — sm8ps 2015/07/21 04:20


(nitram, 20170608) LXDE displays a popup error at boot, which delays desktop loading, on dCore-jessie and dCore-wily. This is an unresolved bug reported in the LXDE mailing list, not dCore specific. Alternatively import these for a similar LXDE experience: openbox, obconf, lxpanel or tint2 (nice built-in panel configuration GUI), leafpad, lxterminal and pcmanfm. This provides a modular setup with an integrated OnDemand menu. Right click lxpanel crashing may be experienced.


For Ubuntu, the packages lxde-core and lxde-common are needed. This will include most notably LXPanel next to some useful basic applications like LXTerminal, PMmanFM, GPicView and LXRandR. The extension must be included into 'sceboot.lst'.

First run

Setting the desktop boot-code to the start-command “startlxde” will boot into a functional LXDE desktop. After some time of use, however, one will recognize that the concept of ondemand-applications is not integrated into the menu system.

This is no big deal, indeed, provided one is willing to load each needed extension from the terminal by 'sce-load'. In the long run, this is getting tiresome, though. Fortunately, getting LXDE to understand the ondemand-concept is simple, thanks to the already existing mechanisms for Openbox.

Warning about lxappearance

The program 'lxappearance' which is used to customizes the look and feel of the LXDE-desktop and -applications and which can be called from the settings menu does not work. Worse even, it hangs indefinitely and eventually crashes the desktop (on dCore-trusty, 20150516). DO NOT CALL IT before you have tested it! In fact, it would be best to exclude this package as explained above.


The log-off icon in LXPanel closes the graphical deskop and brings one back to the command line. From there it seems impossible to shut down the system by sudo poweroff. One way to force it is to use magic system requests to “Reboot Even If System Utterly Broken”. Notice that 'backup.sh' must be manually invoked beforehand if needed.

Compatibility tweaks

There are several steps necessary in order to make Openbox visible and provide the demanded mechanisms.

Compatibility with FLWM

Wbar, Trayer, setbackground, mouse_config

In case one has followed the instructions for setting up a basic desktop installation, a Wbar window will pop up and possibly Trayer will be running in the background. For the moment, use killall wbar trayer to get rid of them.

dCore sets the desktop background on FLWM through '~/.setbackground', configures the mouse through '~/.mouse_config' and runs any shell script under '~/.X.d/', among others the starter script for Wbar. These scripts are unnecessary as LXDE provides the functionality itself.

Wrap all these up scripts with the following if-clause so that they do not get executed unless FLWM is used.

if [ $(cat /etc/sysconfig/desktop) = flwm ] 
        <original script>

If one wants to start a terminal by default then the following change in '~/.xinitrc' will work in both situations.

#xterm &
/etc/alternatives/x-terminal-emulator &

Boot-code desktop

Change the boot-code to desktop=openbox and re-boot once so as to have Openbox set up the necessary configuration files. The desktop will remain empty but upon right-click, the familiar *Core-menu will show up through which one can reboot.

That boot-code is necessary and will remain in place. Booting into an LXDE-desktop needs to be forced by changing or adding, respectively, the following lines in '~/.xinitrc'.

#"$DESKTOP" 2>/tmp/wm_errors &
startlxde 2>/tmp/wm_errors &


The main menu contains settings for the desktop whose extended section allows for having the menu of the window manager show upon (right-)clicking the desktop. This is the key for making ondemand-applications available through Openbox.

In its standard setting, that menu does not contain much. Its content is defined in the file '~/.config/openbox/lxde-rc.xml'. Search for "<file>" to find the line where the menu-file is included.


Replace that line by the following, including the *Core-menus that have been set up by Openbox.


Take note that the order of these entries matters as far as 'menu.xml' must be the last one!


After selecting Reconfigure Openbox from the Openbox-menu for a first time, it will show a sub-menu for ondemand-applications afterwards. Selecting any one of them will run the respective script under 'ondemand/' in the tce-folder; its default content being a call to ondemand -e for the selected extension.

For that matter it may be useful to reserve one pixel at some border in order to always have the desktop available even when a window is maximized. This can be set through the Openbox configuration manager from the settings menu.

The menu does not show all installed applications; instead, the list of loaded application will show in the main LXDE-menu which will dynamically update.

In principle, it should be possible to have the Openbox-menu also show the full list of applications (cf. an article from the PCLinuxOS magazine) but this is beyond our scope here.


The procedure for loading ondemand-applications may seem a bit round-about; however it is more convenient, indeed, than having to load them from the terminal. Of course, one would wish for a fully automated process like for Openbox itself.

Special cases

Some applications do not work well with the default ondemand-script and complain that “neither freedesktop file nor wireless executable exists”. One notable such case is the wireless extension.

Edit the respective file under 'ondemand/' in the tce-folder and make it follow some working procedure. For the case mentioned, the following does work.

sce-load wireless
cliorx sudo wifi.sh

Menu entries

The names of the ondemand-menu entries are taken from the file names under 'ondemand/' which may be chosen at will.

Exit button

The button for log-out provided by LXDE should be replaced by the exit button by *Core. The LXDE log-out dialogue will remain available through the main LXDE-menu.

  • Right-click on the taskbar and choose to add or remove panel items.
  • Add an application launch bar and edit its content to be the exit-command from the system tools menu.

One probably wants to delete the application launch bar containing the screen-lock and LXDE-exit buttons.


LXDE provides a comfortable tool for switching the keyboard layout by one of its panel items called Keyboard Layout Handler. (It is necessary to de-activate its setting “Keep system layouts” before one can configure additional keyboard layouts.)

Thus there is no need to manually call setxkbmap through a file under '~/.X.d/'. Such a file may be wrapped like above to restrict its action to the FLWM-desktop.

However, the file manager PCmanFM (or rather GTK as mentioned in the forum) needs to be explicitly told about filename encoding. Include the following into '~/.profile'.

export G_FILENAME_ENCODING=@locale

Further settings

Some sporadic notes about useful settings for the LXDE-desktop.


The LXDE-Openbox Guide is a pretty useful reference for many scenarios.

Openbox settings

Since LXDE is based on Openbox, it may be helpful to consider the Openbox guide by urukrama.

Function keys

LXDE intercepts F11 before any application and interprets it as command to maximize and un-decorate the window. It is more common to have this function key interpreted by the application itself.

The key binding can be changed in '~/.config/openbox/lxde-rc.xml'. Unfortunately the respective section comes as quite an unordered muddle which makes XML particularly hard to read. Nevertheless, the following will lay the binding to Ctrl+Shift+F11 instead. (Searching for “ToggleFullscreen” will get you to the right place.)

<keybind key="C-S-F11"><action name="ToggleFullscreen"/></keybind>

Resource monitor, LXTask

The LXDE-panel provides a resource-monitor add-in which is quite useful by itself. Furthermore, its standard action upon clicking is to launch LXTask which give a quite complete over-view of running processes. It is installed through the lxtask package.

Screen settings and external monitor

The built-in 'lxrandr' does not seem to work on all machines. Occasionally, it only proclaims its inability to find information about the monitor. Arandr is an even better substitute which can be imported and loaded without any issues. It installs an entry in the settings menu.

In case that Lxpanel should become invisible due to different monitor sizes, the main menu can still be accessed by pressing Ctrl+Esc.

Menu entries and panel buttons for suspending to RAM or disk

If suspending to RAM or disk works then one may want to make it easily available through a panel button. For that matter, one must first create suitable menu entries after which it is a trivial task of adding them to the application starter containing already the exit button.

First, create the directory '~/.local/share/pixmaps/' and download a green and red variant of the original blue icon file for the exit button into it.

Then create two files ~/.local/share/applications/pm-{suspend,hibernate}.desktop with the following content, respectively. Adapt the path if a different user name applies. If applicable, one may want to use pm-suspend-hybrid instead of simple pm-suspend.

[Desktop Entry]
Exec=sudo pm-suspend
[Desktop Entry]
Exec=sudo pm-hibernate

LXDE should automatically recognize the changes and show the new menu entries. If not so, then lxpanelctl restart will force the panel to re-read its configuration files.

Disabling the scroll wheel switching desktops

Although strictly speaking an issue of Openbox, this quick guide is included here nevertheless. Scrolling on the desktop with either mouse wheel or (inadvertedly) the touchpad is interpreted as a command to switch desktops. This can be changed by commenting out (enclose by <!– and –>) or deleting the following lines from the section <context name=“Desktop”> of '~/.config/openbox/lxde-rc.xml'.

      <mousebind button="Up" action="Click">                             
        <action name="DesktopPrevious"/>
      <mousebind button="Down" action="Click">                     
        <action name="DesktopNext"/>

That same action is still available through Alt+scrolling which some may find better suited. Furthermore that action allows for cycling through the desktops without boundaries.

> Return to the dCore Wiki Welcome page