Openbox tweaks and tricks – no {dbus,ck2,elogind,dm} no user services needed

Although this was created with Obarun/Arch based distros in mind it works pretty universally for nearly all distro that have openbox available (nearly all except for Adelie that is).  About building and installing obmenu-generator there is an older article here.

Originally published in the Obarun Forum, so here is a copy:

Openbox tweaks and tricks – no dbus – no ck2 – no user services

Minimalist tricks and treats

To start you need xorg-xinit and openbox installed:

From AUR download, build, and install obmenu-generator

You can use pacopts or cower if you don’t have something else as an AUR helper, ask for help if you want details, especially if you want to install yaourt, the best AUR helper ever created which was taken off AUR for a second time in less than a year.  I wish they would make their minds up!

Once built and installed you can add perl-gtk3 (an optional dependency) for use of gtk3 icons.
edit % sudo $editor /usr/bin/obmenu-generator (it is a script not a binary) and search down for GTK3, the 2nd or 3rd hit says use_gtk3 = 0 change the 0 to 1 so it can use icons from gtk3 which are the prevalent icon systems arch uses now, gtk2 is fading away.

Then on terminal again type % obmenu-generator -p -i and the menu is created. Right click on the screen away from windows and a menu will open up. Down on the advanced options there is a sub menu to edit the menus yourself and make new ones.  The default editor is geany, if you don’t have it installed or like using it, edit ~/.config/obmenu-generator/ and change editor=geany to editor=mousepad   or whatever you like as gui-text-editor.

Now, the black screen or gray screen, it is ugly and hurts your eyes, I know. Easy fix!
Download feh  –>  % sudo pacman -S feh
Also, do you have obarun-install installed in your system? If not, you can just install the themes package, this way, temporarily.  If you installed obarun openbox, xfce, plasma, jwm, you must have the following two items already.  If you installed base you may not have them.  So here is how you get them.  (dark obarun background and obarun pointer theme).

% sudo pacman -Sdd obarun-install-themes
% sudo cp /var/lib/obarun/obarun-install/config/openbox/rootfs/usr/share/wallpapers/obarun-wallpapers.jpg /usr/share/wallpapers/


Since you are at it, if you don’t have the JaezMix mouse pointer theme installed copy it from the install themes.

% sudo cp -r  /var/lib/obarun/obarun-install/config/openbox/rootfs/usr/share/icons/Jeex_Mix  /usr/share/icons/

% sudo pacman -R obarun-install-themes
% feh --bg-fill /usr/share/wallpapers/obarun-wallpapers.jpg

That sets a background for the session.  Here is how you make it permanent:

If you don’t like that one, find any picture you like, save it in some place ~/.Pictures/bg.jpg then

% feh --bg-fill ~/.Pictures/bg.jpg and it will be your background.

So you want it done as soon as you enter openbox

% edit .config/openbox/autostart


feh --bg-fill /usr/share/wallpapers/obarun-wallpapers.jpg &

always end the command line with a &

Alternatively you can use nitrogen if you have a directory full of background pictures to use.
Use this line on autostart so your background will return next session

nitrogen --restore &

There is also a way to have things appear in order and with a delay each:

(sleep 1s && feh --bg-fill /usr/share/wallpapers/obarun-wallpapers.jpg) &
(sleep 2s && lxpanel) &
(sleep 3s && conky -c ~/.conky/Obarun) &
(sleep 4s && lxterminal) &

so it will be 1 2 3 4 with 1s apart.

If you search the forum (same category with this article) for conky you will find my Obarun conky module to copy and modify as you like. I currently use the old conky because they changed lua format and it needs some corrections. From AUR you can also install conky-manager which has many samples of modules to use.

I don’t use a panel anymore, with obmenu-generator my conky and shortcuts/hot-keys I get everything I need with just a clean screen, no clutter.

I can share my openbox rc.xml modification if you like, but take a look first on the default at ~/.config/openbox/rc.xml

I have Ctrl Shift W which opens my browser, Ctrl T for lxterminal (inside lxterminal C Shift T opens a new tab of the terminal). I also use nano for editing everything and I avoid the ctrl keys inside nano to be set on openbox, so if you use hot-keys anywhere else try not to use the same for openbox.

I also use gksu (AUR) instead of consolekit so I can make root tasks open in obmenu-generator with gksu and I have no use for dbus or consolekit (elogind in almost all other distros pretending they are systemd free).

Arch dropped gksu/gksudo due to “security” reasons.  Yes, if anything by-passes systemd’s spider-webs is a security issue, while the live recorder of everything you do with dbus as a little snitch to the recorder is “secure”.  Give us a break you little NSA/IBM puppets.

on obmenu-generator ~/.config/obmenu-generator/

[ ‘label’, ‘command’,  ‘icon’ ]

{item = ['gmrun', 'Run cmd', 'system-run']},
{item = ['gksudo', 'Root Run', 'applications-system']},

The first line is there by default (you need to have gmrun installed) the second I added and I can run anything as root, it asks for user password

 % gksudo lxterminal

will open an lxterminal as root and ask for user password who is in sudo/wheel group

 % gksu lxterminal

will ask for the root password even if user is not in sudo or wheel groups.

 % gksudo geany /etc/pacman.conf will let you edit pacman.conf with geany

Things that you do often you should make into items in the menu.

See why they took gksu away in many distros?  They WANT YOU to depend on their elogind/systemd crappy system just so you can click an icon and start gparted, some pkg-manager gui, to mount and unmount disks, etc.  AND THAT IS SECURE, learning how to do it without their labyrinth is NOT!!!!

Puppets, I tell you, puppets on the payroll!

I can make my openbox look and act just like lxde or xfce4.  I just don’t need or want to!

You can use a file manager to set background, and desktop icons like windows if you want to fool someone you are working on ms-Windows.  I have a background with an ms-like windows logo with the glass broken.
Pcmanfm or spacefm  are common filemanagers used for this purpose, I don’t know if thunar does the same for xfce.

pcmanfm --desktop-on

makes your desktop be the ~/.Desktop folder

pcmanfm --desktop-off

Turns it off again.


You can also test the ability with .xinitrc to just have your favorite terminal starting with xinit, no WM no DE.

Change the line from exec openbox-session to exec sakura for example.

Black background and fixed terminal window. Type openbox-session in the terminal now.  Here is your openbox.  If on another terminal tab you have opened your browser, and a third has an editor gui like geany, they stay on.
Then type openbox –exit and then type jwm if you had this installed already.  You go from openbox to jwm in 1 second, no reason to exit X, and your windows stayed in tact if you didn’t close the terminal tabs that started them.

Now if you really need a fancy panel/bar/tray in your openbox you can try lxpanel.  There may be a couple of things/widgets in the panel that may require dbus functionality, but other than seeing a couple of warning on terminal, lxpanel works fine.
The other alternative is tint2 but needs some reasearch and a few hours of configuring to make it half as functional as lxpanel, and although many people say it is a light choice, it is not that much lighter than lxpanel.

You want to flip from one language/keymap to another while on X?
edit this:   /etc/X11/xorg.conf.d/00-keyboard.conf

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,fr"
        Option "XkbModel" "pc105"
	Option "XkbOptions" "grp:alt_shift_toggle"

Next X start will give you the change between US English and French with Alt-Shift and you can have more than 2 keyboard sets.

Alternatively you can enter two lines into obmenu-generator like this:

   {item => ['setxkbmap fr',            'French',  Flag FR']},
   {item => ['setxkbmap us',            'English',  'Flag US']},

Or simply, on terminal type “setxkbmap cn” and you get Chinese, but you better type setxkbmap us first before switching, so you can roll back the previous command, because once in Chinese you will not be typing latin characters on terminal anymore smile

One thing you may need in a wm is a place that keeps memory of things you were copying.  If you copy something from the browser and want it pasted in the editor and you make a mistake and close the browser before you paste, the copied part is lost.  Clipit is a simple program that keeps this cut/copy/paste memory active between windows.  You can add it to autostart or add it in the panel which gives you an icon like a clipboard and shows the past “n” pieces you copied.


Why do I like running conky?  I like seeing ram and processor use, see how little of resources are taken up just to get terminals and guis running.  All you need really is a terminal that is better than console, and if you can’t remember the names of the programs you want started in terminal a menu like obmenu-generator is all you need.  The rest is all fluff.

Fluff that can take 3-4 times more ram starting up than OB or jwm, or i3, or awesome, bspwm, ..etc.



The article is dedicated to my friend Saleem, who inspired me to write it, and who keeps distrohopping around but keeps coming back to the best, Obarun 🙂  He also inspired me to take a look at Spark-Linux, an eye opener, where he is also mentioned.



7 thoughts on “Openbox tweaks and tricks – no {dbus,ck2,elogind,dm} no user services needed

  1. Nice tuto. You may eventually get me running OB again, Fun! (Last time for me was on pre-systemd ArchBang, some 10 years ago!)

    Particularly wise from you to mention this:
    Or simply, on terminal type “setxkbmap cn” and you get Chinese, but you better type setxkbmap us first before switching, so you can roll back the previous command, because once in Chinese you will not be typing latin characters on terminal anymore

    Not following this advise, one would indeed get in deep shit!

    The dedication to Saleem is a nice touch too. 🙂


  2. Very nicely and clearly written “how to” for openbox , easy to follow and yes for sure can be adopted for any distribution. Openbox was my first love ! Back in 2013 I installed archbang once but since I never liked tint2 so I started modifying that openbox with fbpanel and many other things and this process took me months , my that openbox installation is still surviving and working perfectly. I do distrohop for “testing and tasting” but never quit arch linux , I am always looking for something “unique” that is how I discovered Spark . But now im doing wmhopping , my new love ! Again something unique is what keeps me busy testing new windows managers but mostly I like i3,bspwm and ratpoison.
    And dedicating this article to me makes me grateful and humble at the same time . fungalnet is a kind hearted and caring human being and friend , I have learned so much from him as he is always there to help me.


  3. Pingback: Links 30/1/2021: Wine 6.1, LibreOffice New Generation | Techrights

  4. Pingback: ● NEWS ● [Old] # ☞ #Openbox tweaks and tricks – no {dbus,ck2,elogin… | Dr. Roy Schestowitz (罗伊)

  5. Is there a dbus-free desktop notification system, similar to dbus-based dunst, which is often used with small window managers?


If your comment is considered off-topic a new topic will be created with your comment to continue a different discussion. This community is based on open and free communication, meaning we must all respect all in minimizing the exercise of freedom to disrupt such communication. Feel free to post what you think but keep in mind the subject matter discussed. It is just as easy to start a new topic as it is to dilute the content of an existing discussion.

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.