Plain Openbox

Configure >

Installing OB without a full DE or DM

Some Debian/Arch users can't be bothered with installing a full Desktop Environment, and OB is very functional on its own without one. Of course, with plain OB, there's no desktop to play with - no icons on it (which doesn't bother me) and the background image needs to be displayed another way (e.g. with a fullscreen image display such as with feh).

Prepare OB (migrate from using LXDE)

copy content of lxde-rc.xml in ~/.config/openbox (if you have used LXDE-openbox) to the OB config file, rc.xml
Before you make changes to rc.xml, make a backup so that you can revert to it if the file breaks!

Test the file after any changes, with the reconfigure button on OB menu, or 'openbox --reconfigure' in terminal.
the lxde-logout key-bind won't be needed

Copy content of autostart file in ~/.config/lxsession/LXDE/ to the autostart file in ~/.config/openbox/ -but minus the '@' at line begins, and add '&' at end of lines, where there follows another line, e.g.
If you haven't used OB yet then you'll need to edit rc.xml with key-bindings, mouse bindings, application window positions, etc

(while still using LXDE, you can test your experience with plain OB - just logout, select OpenBox and login)

Migrate to OB from LXDE

Once you've got ready to switch over, particularly, you've set up your openbox config file, autostart and panels,

up to you if you want another panel app, tint2, xfce4-panel -just add it to OB autostart
I don't use lxterminal any more, I enjoy using rxvt-unicode (see my rxvt-unicode page)

if you remove your DM as well (lightdm etc), you will need to login at every boot up and start OB by typing "startx" at the prompt.

OB Start-up

Without a DM you will find yourself at the bash prompt after booting up. Then you have to enter 'startx' to start up OB - 'startx' calls the OB session by looking up the ~/.xinitrc file, which has the line

But the problem with this line is that suspend will not be triggered by a close/open of laptop lid. So if you need that function, you must use:

or you can start-up OB with a direct command, e.g. in a script,
which could be faster than using "startx" -

for ease, you can make a script in /usr/bin/ named "xs", make it executable. so that you can type just "xs" at the prompt (after login)
(or put the xinit command in there - but it will by-pass the .xinitrc file and so suspend with lid-close will not function)

If you want to test that the start up works without a DM, just rename your DM executable file, e.g.
and you can rename it back if things don't work out! But start-up should work flawlessly.

OB Logout

To exit OB (i.e. logout), there's an exit button on the OB menu -add it if it's not there, run obmenu
> add new item, select 'exit', save, reconfigure OB.

The LXDE logout button will do nothing if it's there (can be removed).

Exiting to the tty again you'll have to type "startx" (or your "xs"), "sudo reboot" or "sudo shutdown -h now" (also `sudo halt' and `sudo poweroff') For the latter two, you can make a bash alias for each - which means you simply enter the alias in a terminal when you've finished work (see my bashrc page).

You can make the shutdown/reboot commands not ask for password, if you modify the sudoers file
-you could give this power to a group instead e.g. %admin ALL=NOPASSWD: ...... and add your user to that group,
That way you can use OB keybinds with them, or with a confirmation dialogue... (I don't ever use hybernate, but it's there in /usr/sbin/ too)

I tried out some methods using zenity dialogues with shutdown/reboot/standby/logout selection, but it just didn't work the same as LXDE logout.

Then I figured out yad. Yad totally outshines zenity in this use, because, whereas zenity outputs only two values from a question dialogue, 0 and 1, yad can set a value to each button -and you can have as many buttons as you like.

So for my logout dialogue I have..
Simple and it does exactly what's needed.

And one just for the sleep button, or any key-bind - to confirm you want to suspend the PC...

Logout entry on menus

You can execute the script from the Logout launcher icon on the top panel - just find the desktop icon in .local/share/applications and change the Exec line to read:
How about the entry on the Main menu? At the momet it reports that logout is not set. So open the panel
and look for the logout command near top of the file, under 'Plugin { type = menu' and change 'command=logout' to
then run
Make an entry on the OB menu with this too, i.e. "Power Off" with command sh ~/scripts/poweroff
And make another entry on the OB menu, "Sleep" with command sudo pm-suspend

Mounting drives with pmount

Auto-mounting inserted media was no longer, after removing lightdm, pcmanfm, thunar and thunar-volman! But now it's just a case of manually mouting usb devices after inserting them -which in Ranger can be mapped to a few keys. Also, one can use pmount which enables a normal user to mount disks (if not present in fstab), see man page

-this will mount the device in a dir "500" in /media -with no label specified, the device will mount in /media/device-name (sdb1)
-this unmounts the device

can use options like
man page

Auto mounting solutions

In simple installs without a display manager, drives do not mount when hot-plugged. I tested with Thunar, thunar volume manager, gvfs and udiskie and I still needed lxpolkit and lightdm installed in order to automount a usb stick without permissions problems.

1. Udiskie udiskie/wiki/Usage
Udiskie does not depend on Thunar/thunar volume manager to operate.

Then, make a rule to allow automounting without super user privileges:
see unix.stackexchange

add this content:

Then, you must create the storage group and add any users who you want able to automount drives.

add udiskie to your autostart file with

where the -2 states to use udisks2, -t flag starts the tray, -A would prevent automounting -then you could click on the tray.

To have devices mounted in /media, not /media/username, another rule is needed (from Arch wiki)

2. Udevil - couldn't install on testing

install dependencies:

download and install the .deb from here (click on the version number e.g. 0.4.4, then the deb, then "View raw")

then enable kernel polling as per instructions on the page above:
and start devmon with
then plug in a USB drive

permanent polling: add this line to /etc/rc.local, before "exit 0"

also add 'devmon &' to autostart as udevil cannot mount anything without it running

OB and GTK colours

GTK colors go hay-wire after switching from LXDE, because OB does not look at the ~/.config/lxsession/LXDE/desktop.conf file, set by lxappearance. It looks at the ~/.gtkrc-2.0 and ~/.config/gtk-3.0/settings.ini files.

So what I do is I copy the GTK colors line from the LXDE file and insert it into these.

(Note: the entry for the gtk-3.0 file has `gtk-color-scheme' whereas the LXDE desktop.conf file had `sGtk/ColorScheme' -so need to change it) and then I stop OB with killall openbox and login again. Lxappearance is such a pain to use setting the GTk colors, so we are better off without it (once you have a color entry, the hardest part).

If you have clicked on Apply in lxappearance and loose your previous colours to something horrible, then open Gnome-color-chooser (if you used it) and hit Apply.

My GTK color entry in settings.ini file is like so (all one line):

GTK accels

Somehow I lost the line from my ~/.gtkrc.2.0 file which enables changing the window menu shortcut keys by hovering on them and typing a new key combo,

If you got down here and succeeded in configuring "plain openbox" well done - enjoy it!

Next page:

Bash config - configure how the bash prompt looks, bash aliae

Home | Content | Site Map | TOP