Configure LXDE/Openbox

Configure >

Auto-start apps

copy the autostart file to the home dir like this

and edit it

add the app command as a line preceded by '@'
e.g. the line needed for Xfce4-power-manager to start up with every log-in would be:

obviously, if you edit the file in /etc/xdg/lxsession/ it will be set globally for all users. And note that anything in the /etc/xdg/ autostart that's not in the home autostart will be run, e.g. the screensaver.

There're another two ways to go about it...
1. add .desktop files for apps into ~/.config/autostart
2. run: lxsession-edit - a gui for autostarting by check/uncheck (Desktop Session Settings on the Menu).


The LXDE file manager does not sort directories/files alphabetically?
look in ~/.config/pcmanfm/LXDE/pcmanfm.conf and change sort_by value to 2
for detailed list, change view_mode to 4?

I would use Thunar any way, if a gui file browser is required, with its very adaptable custom right-click menu actions (see my Thunar page).

The one problem with prefering Thunar, however, is that PCmanFM in LXDE controls the desktop, i.e. the desktop is a folder, so that it can hold shortcuts. So when you open a folder shortcut from the desktop it opens in PCmanFM (unless you make a .desktop file with a `Thunar /dir/` command). If you change things about so that Thunar has the desktop, the right-click menu normal for clicking on folders shows when you click on the desktop which is not optimum, especially if you have a ton of commands on it.

Desktop Background

Right click on the desktop > Desktop Preferences and choose an image. If you've checked the box, "Show menus provided by windows managers when desktop is clicked" in Advanced, you can get back to the Wallpaper dialogue with Alt-F2 (run) pcmanfm --desktop-pref

or make a .desktop file in ~/.local.share/applications, with
(LXDE in Jessie now has a menu entry for Desktop preferences)

Or, add it to the OpenBox menu (along with Customise Appearance {lxappearance}, Window Management {obconf} etc) which pops up with right-click on desktop (or at extreme edge of screen when a window is maximised) - once you have told PCmanfm to use the OB menu, "Show menus provided by windows managers.." - See below for setting up the OB menu.

Without LXDE and pcmanfm installed, just openbox, you'll need to set up the desktop bg with feh or similar - see my page plain openbox.


openbox-themes (installed on the LXDE page) will give a lot of themes to choose from
here's some more and here

how to install? easy as unpack the zipped file and place the resulting directory into ~/.themes (create it if it's not there). And you'll find it in Obconf > themes

-themes will only change window borders, not areas inside windows like buttons, which widgets do.

In LXAppearance you have widgets, color chooser, cursor, icon themes (need install)
Window borders and fonts do the same as in Obconf... it's a tad confusing, there's no central config editor to do it all in one go!
Obconf does what Openbox needs to do, window borders. Lxappearance does what lxde wants to do, buttons and fields.

To enable better-looking widgets you need gtk2-engines installed..
and install the engines with the themes that you want e.g.

Mouse cursor themes


To make Qt apps follow your Gtk theme (including qpdfview, luckybackup, midori, scribus and many more, because it's a pain if they are brightly lit on a dark themed desktop), you need to put an Export line in your ~/.profile file...

First install this package which will enable Qt to merge themes:

then run this command,
then log out of openbox and log back in.


Gtk3 is here and quite a few programs use it for their interface, so now you need to install some gtk3 engines - or gtk-3 themes from the web.

Install any (e.g. gtk3-engines-xfce) and copy the your-theme/gtk-3.0 folder from /usr/share/themes/your-theme to ~/.themes
Rename the theme if you still want to have the original to revert to (in /usr/share/) and either select it in the lxappearance dialogue, or enter its name in the ~/.config/gtk-3.0 config file. Then see below about setting colours.

So now gtk2 themes work with gtk2 apps, and gtk3 themes with gtk3 apps.... The problem is if you select a gtk2 theme which doesn't look happy in gtk3 apps :( And if all apps are heading for gtk-3, help! GTK3 css is quite complex. audacious has gone gtk-3 and will revert to gtk-2 and soon will port to Qt.

gtk-2.0 themes have a "gtkrc" file with all its settings and can be copied to ~/.themes/theme-name/gtk-2.0 and edited there.
gtk-3.0 themes have a "gtk.css " file that goes in ~/.themes/theme-name/gtk-3.0

There is no GUI that can give us total control of our gtk-3 themes, so we have to edit the css files by hand. What a load of work, just so we get our desktop colours right! And how will PC learners cope with that? I hope there will be a GUI in the future.


The LXAppearance colors don't enable too much control - for example, scroll bars get painted with the highlight color. So I used gnome-color-chooser, copied its config dir over from a backup, ran it and just clicked apply -and got back to my normal colours.
The files holding the colour settings are ~/.gtkrc-2.0-gnome-color-chooser and ~/.gnome-color-chooser/config.xml

For KDE app's, adjust the appearance settings with KDE's "System Settings" Remember to save your new KDE colour scheme as a profile, so you don't lose all your changes later on by some strange KDE reset to default!

Gnome-color-chooser has no affect on Gtk-3 apps eg. Gnome mplayer, zenity dialogues, audacious, handbrake...

I got a little tired of my root user applications in their near-white colour theme, so I tweaked root's colours with Gnome-color-chooser too. But to make it easier than starting from scratch, I first saved my normal user's colour theme, with the necessary extension .gnomecc.

Then I ran GnomeCC as root with
opened the saved theme file and then made changes to Default normal (foregrd/backgrd) and Entry fields normal (foregrd/backgrd), to make the theme a little lighter than normal user's. Saved that as well to a theme file and clicked Apply.

thunar as normal user  thunar as root user

Above: my thunar, 1. as normal user and 2. as root user

So that's....
Gnome color chooser for GTK-2 apps
KDE settings for KDE apps
css file hacking for GTK-3 apps

and there's one more, which you can learn about on my xterm page, the Xresources file for xterm, urxvt, xpdf
...make that two more, the terminal text colours can be set using the bashrc file

Lately (from 2021), I think that GCC is out-dated or unmaintained. So these days I just use a dark GTK theme.

GTK-3 css hacking

I installed the xfce gtk-3 engine and copied a theme that already had a dark appearance - Xfce-dusk - to ~/.themes.
Then I got experimenting with the different colors at top of file - and note that capital letters are not permitted.

Once you make a colour change, save the file, and open a GTK-3 app, such as audacious or g-mplayer.
This got back my colours, something similar to my GTK-2 config, but still it's not perfect - audacious tab text is not altered and also the theme itself needs some work as all the tabs and buttons are practically without any spacing, crowded up.


download from here under src link

Well, it looks full of details, perhaps way too much, and with no preview of any styles applied. Needs development.
To make the python script run I had to remove parts of it! line 27: delete "From Fuse.." , line 2654: delete "Stat)", line 2668: delete whole part referring to Fuse.


LXDE uses Openbox WM and does not support composition natively (of its own) as it is a light-weight system and things like transparency and shadows, fading etc take up resources. Other window managers do that, such as Metacity, XFWM4 or Compiz. The LXTerminal uses seudo-transparency (fake) as it steals the desktop background and displays it in the window and doesn't show other open windows behind it (aha, that's before compton comes in, because it does display proper alpha with this running). That's probably only useful when its kept permanently on the desktop -see below.

For compositing with openbox, look no further than this clever man, Christopher Jeffrey's program called compton, which builds on xcompmgr.

get dependencies for the latest version to install -compton-master:
download the zip file and extract (need unzip)
open terminal in the extracted dir and do

if you want to run checkinstall instead (which will create a deb archive and a simple means to uninstall compton later) you need to select 3 when checkinstall gives options, and change the version number as checkinstall won't succeed if the version no. begins with a character (not a digit).

kill xcompmgr if running, or any other compositor with `killall CompositorName`

and to start compton, run in terminal
where 0.8 is the opacity factor between 0.1 and 1.0, -i is the inactive window opacity, -e is window frame opacity, -m is drop-down and pop-up menus. I prefer 0.8.

the -r 4 -l -4 -t -4 is the shadow position: where -r is the shadow radius, -l is the left offset and -t is the top offset and value is pixels (default is -15)

add the command with most suitable options to the autostart i.e. as above but with an '@' before the line.

Very nice for my openbox desktop! Thank you sir.

man page - Arch page

The Arch page is very helpful as it gives us a config file to use with compton (latest git version: compton-master) which has much more versitality.
Copy it and save to file ~/.config/compton.conf or ~/.compton.conf. Here's my .compton.conf

Edit it to your liking and try it out with `compton` (or else `compton --config file-location` if not in home config).
and add it to the autostart list.


You can have four panels with LXDE. The options are very adequate for setting the geometry and launcher content. A wide panel with small icons will result in a double layer. If you have panels from another LXDE desktop which you'd like to migrate, you can copy the files found in ~/.config/lxpanel/LXDE/panels/ over to the new install, and then you can restart the panels with a command like:
where the -p sets the panel profile (it might work without it)

For those who would like to try something other/more capable than lxpanel, take a look at fbpanel or tint2

Clock format

right-lick on the clock on the panel and set your macros:
%c full time n date, %x date, %X local time 12hr,
%R hour n minute, %H hour, %M minute, %S seconds, %s seconds of the day!
%A wk day, %d day of month,
%m month numeral, %h month name, %g year numeral

e.g. %R:%S %d.%h gets you "23:01:22 11.Oct"

Edit the LXDE menu

The gui menu editors are generally all useless - so a hack is needed like with Xfce.

You can move apps around to other sub-menus quite easily by copying their .desktop file from /usr/share/applications to ~/.local/share/applications and editing their Category. The Menu updates pretty fast.

To omit a program from the menu entirely, open its .desktop file and add the line NoDisplay=true

To launch Gparted from the main menu I had to change the line in its .desktop file from Exec=gparted-pkexec to Exec=gksu gparted with the original exec command my desktop completely froze.

[hint: to escape from a desktop freeze, press Ctrl-Alt-F2 to switch to console 2, then login, and type 'killall openbox' followed by 'startx']

Add/remove menu categories

1. Make a .directory file (which allocates the category name and icon) e.g.

paste this content, or similar, with Shift-insert or middle mouse button:
(you can find icons in your icon set in, e.g. /usr/share/icons/tango/16x16/devices/ )

2. Edit the menu file and add a new category

3. change categories in any .desktop files (see above) so that they are added to the new menu category.

Problem: the "Other" category sits on the main menu with just about every executable on it from /usr/bin.
To solve it, edit the /etc/xdg/menus/ file and remove the "other" entry entirely.

To reorganise the order in which the Categories show on the menu, you need to edit the Layout area at the bottom of the menu file..

my example:

Set Super key for main menu

To make the Super key activate main menu when pressed alone (so that Super key can also be used as modifier key with other keys without activating the main menu)

then use the command

to tell xcape to send a "Ctrl-Esc" keyboard event when Super key is pressed and released within 500ms.

(providing your OB keybind for main menu was Ctrl-Esc)

then add that to autostart with the same command as above, adding '&' at the end

Or, to change the Super key to call up the Openbox menu and enable a right super key to call the main apps menu (see below for menu setup and ob key bindings)

you can set multiple xcape key events like this..

Openbox menu

To use the OB menu (right-click on desktop) make sure "Show menus provided by windows managers..." is checked in Desktop Preferences >Advanced (pcmanfm --desktop-pref)

move the config files for editing

install openbox menu editor "OBmenu", download or apt,

how to configure the OB menu http://urukrama... pipe menus Arch wiki Openbox

my OB menu To include the App menu on the OB menu, add a new Pipe menu with Obmenu, and give it a name and ID, and the following command:

My example OB menu

My menu (right) is rather dark-coloured, which is due to my selected window border theme (Mire_v2_blue).

To use my OB menu first backup your own,

Create a new menu file
and copy the contents of my menu.xml to it. Then Ctrl-X,y, Enter to save it.

right-click on the desktop or far edge of screen and click on Reconfigure. Right click again to see the new menu.

Click on "OpenBox Menu" in "Settings" on the new OB menu to start making changes (install obmenu first). Notes: I added the panel reset command, as each time the PC wakes up from suspend, an extra blank space appears on the top panel..

Under "Files" I have "Config files".. a zenity dialogue pops up with a list of regular files to choose from. This is a script and is easily set to a key bind.

To use yad, which looks nicer than zenity, use this line in the script:
You will also need to install yad (improved zenity)...

Menu Icons

To get icons on your ob menu you need to put <showIcons>yes</showIcons> in the <menu> section near the end of your lxde-rc.xml file.

and then every menu entry in your menu.xml file needs an icon location added (some work), e.g.

copy icons from wherever you can find them in /usr/share/icons/hicolor/48x48/apps/ etc. into somewhere convenient, such as openbox/icons/
this page might help

To add an Dynamic LXDE menu, you need to install openbox-menu, and include a line like this in your menu.xml file:

the menu name can be any menu you have in /etc/xdg/menus (e.g.,

Menu keybinds

By default, the root menu shows only with a right click on the desktop (set in the OB xml file with a mousebind click right). But if you can't see the desktop, how can you get to that menu? You need to have another mousebind, set with the Super key, so that you can call it up any time.

Also, you can set a keybind with the Super and Up keys, in case you can't use the mouse.

The following lines are to set keybinds to launch the OB menus, where
root-menu = main OB menu
menu-primary = my menu with all my main apps
menu-apps = the LXDE apps menu on its own
menu-utility = my utility/system tools menu
client-list-combined-menu shows activity on each desktop, i.e. a task bar


The next lines go in the "mouse" section, to set the mouse clicks to launch the menus when the desktop is hidden..


The next lines go in the "context root" section, to set the mouse clicks to launch the menus when the desktop is not covered over with windows..


Save the file, then reconfigure OB - run 'openbox --reconfigure' or right-click on the desktop and click reconfigure

(note: always duplicate your lxde-rc.xml file while it's working, so that you can rename the duplicate back to lxde-rc.xml when your file gets a syntax error and you can't find what's gone wrong, or can't undo your changes! - but normally you might leave out a closing /keybind or /mousebind that makes OB choke).

Making menus

Here's how to make a menu - and you can have as many as you like...

1. primary apps menu

This menu kind of replaces a launcher panel, giving quick access to the most used apps. my OB menu

make a file
and copy the contents of my menu-primary.xml to it.

Add/remove apps as needed. Note that you will need to check the app execute commands and find/copy the icons to /usr/share/icons/openbox/

add the menu ID to the OB rc.xml file, as well as the keybinds/mousebinds for the menu given above... then right-click on the desktop or far edge of screen and click on Reconfigure.

2. LXDE apps menu

I figured how to get the dynamic apps menu onto an OB menu - just make a file with
obmenu-apps: my OB menu with main apps and copy this content into it:

add the menu ID to the OB rc.xml file, as well as the keybinds/mousebinds, then reconfigure.

3. utility apps menu

I used to have a panel at desktop right covered with utility apps, but it obstructed the page scroll bar all the time so I scrapped it and made a new ob menu that shows with Ctrl-Super-mouse scroll up.

You can use my menu.. first make a file obmenu-utility: my OB menu with utility apps
and copy the contents of my menu-utility.xml to it.

then add the menu ID to the OB rc.xml file, as well as the keybinds/mousebinds, then reconfigure.

Add icons to your heart's content (need to hit reconfigure again to see changes)

Tip: to make submenus sticky,

make these values in rc.xml negative... and if the second value isn't in your file, add it, as old versions didn't have it..


Docky is a very nice app-launcher dock that can be made to look rather like a mac app dock, with icons that kind of jump up when the mouse hovers them. It's available in the repo as, simply, docky.

To remove the docky settings icon that sits on the left, you need to edit the file found in ~/.gconf/ and mak it "false"..

To add apps to the dock you simply open them and then right-click on the icon that appears on Docky and click on Pin to dock.

However this is hard to do for apps that open full-screen and hide Docky completely (such as Tuxtype and others). So to add apps like that or to have full control of Docky, you'll need to edit the content file, but first exiting Docky, and then restarting gconf (logout and back in)..

And "Dock1" is the first dock, etc

Key bindings

Openbox allows you to bind nearly any key combination to a command (openbox, bash or script) and the keybinds are made in an easy to edit xml file. You can edit OB keybinds with graphical help if you like...

Obkey is a python script gui for setting up keybindings - download it here
unpack it, then move it wherever (e.g. ~/.obkey-master)

then simply run it with (specifying the lxde config file)
To set keybindings by hand, which is easy but you need to take care and always double check the syntax is correct,

Once you're done, save the file and then run 'openbox --reconfigure' or right-click on the desktop and click reconfigure.

for setting up brightness control keys, see my page screen brightness

Below are my typical key bindings, which of course will need some alterations to brightness, volume control for different laptops...

more info here
urukrama has blogged about it here and here http://urukrama...

My keybinds

Updated June 2017

These are the shortcut keys you can make with the below key bindings in your rc.xml file:
W= Super key, C= CTRL, S= Shift, A= Alt


keyboard section key bindings..

Be very careful to keep opening and closing "keybind" or "action" or else the whole file will be invalid and openbox will have no functioning keys or menus! Make a copy of the file before making changes, and edit it in geany so that you can undo changes if necessary.

You can use key chains too - see the wiki page.

(Not including the OB menu keybinds -see above)

script for the above keybind to open a file with geany:

mouse section key bindings

(Not including the OB menu mousebinds -see above)

GTK menu accelerators

Enable changing menu accelerators in any GTK window so that you can hover a menu item and press a new (available) key-combo for it...
add a line to your ~/.gtkrc-2.0 file,

Terminal Emulator

lxterminal in half alpha full screen To make Lxterminal open on my desktop no.2, half alpha, and full screen, (with Workspaces set in obconf and lxterminal alpha set with right click in the terminal > Preferences)

I add an application to lxde-rc.xml, at the end of the file,

if "skip_taskbar" is set to "yes" then switching desktop you can't type in the terminal without clicking on it.

save it and reconfigure OB (note that you can remove the "name=" variable if its not working)

To get the terminal sticking to that desktop from startup, just add @lxterminal to autostart (see above).

Other applications

To find the "name", "class", "role", "title" of an app, you can enter something like this command in the terminal and click in the running app window..

Some apps that have info/confirm dialogues may open these maximised too if you have set the app to open maximised, so you can run the xprop command in the secondary widow to see if there's a difference in class.

A work around for a web browser is to have the line:

<application role="browser">

or for other apps.. <application type="normal">

To get an app opening at a particular position, you add this, changing x, y, and desktop or monitor values,

For mpv..

To get an app to open with a particular size, you need to add geometry to whatever controls its launch...
Exec=xf write --geometry=100x50
lxterminal --geometry=?x?
@lxterminal --geometry=?x?

But if you want to open a terminal for a quick task and don't want to switch desktop, what can we do? Get used to the terminal on only one desktop and switch to it with Alt-mouse scroll (which is fast). Or employ another terminal app for opening anywhere.

Lxterminal Shortcuts
Shift-Ctrl T
Shift-Ctrl W
new tab
close tab
move to tab
paste (usually)
clear the terminal

Setting the preferred Terminal Emulator Run
enter lxterminal -e %s (or your choice)

or for Thunar:
and change xterm etc for whatever X-terminal you like.

terminals to try: rxvt-unicode (in repository) about: lilyterm

Setting terminal prompt style and colours - see my bashrc page

Stop the notification daemon

Try this if you don't feel you need to see the many pop-up notifications, like every time you connect to a network or start a video encode:
to restore it again
even knock out knotify (a dependency of nearly any KDE app)
restore it again with

Next page:

Plain Openbox - how to run Openbox without LXDE or a display manager

Home | Content | Site Map | TOP