Openbox: Customizing to My Liking

In another post, I mentioned that I love Openbox for its minimal overhead, few dependencies, customizable menu and key-binding, and speed. I use it on my home system and decided to use the same configuration on my new notebook. Here is how I currently configured my system(s).

Disclaimer: The information below is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others.

ObConf:

ObConf is the Openbox configuration tool which easily change themes of menus and windows. I happen to like 1977 Openbox theme available from Box-Look.org or here. $ mv 1977-Grey.obt /tmp $ obconf & ------------------------ Theme -> Install a new theme... -> 1977-Grey Appearance -> Button Order: IMC Appearance -> Active Window Title: Sans 4

Theme:

I use Morning Glory (GTK 2.x theme) available from Gnome-Look.org and customized it for my liking. My customized one is available here. Once downloaded it, un-tar it and move it to the .theme directory. Use lxappearance to select it as the theme. $ tar -xzvf MorningGlory.tar.gz $ mv MorningGlory ~/.themes $ lxappearance & ------------------------ Widget -> MorningGlory

Panel:

I use tint2 for my panel. My titn2rc is available here. $ tar -xzvf tint2.tar.gz $ mkdir ~/.config/tint2 $ mv tint2rc ~/.config/tint2/ $ tint2 & (or put it in autostart.sh)

Conky:

Conky is a fee software system monitor for X11 and is able to monitor system resources like CPU, memory, processes, disk usage, network interfaces, and much more. My conky is very simple and it displays system resources at the bottom of screen, looks much like a panel. My conkyrc file is available here. $ tar -xzvf conkyrc.tar.gz $ mv .conkyrc ~/ $ conky & (or put it in autostart.sh)

Autoscript:

When Openbox is launched with the openbox-session command, the environment script will be executed to set up the environment, and then the autostart script can launch any applications you want to run at startup, such as a panel, setting up a desktop wallpaper, etc... Once Openbox starts, the system-wide default script, located at /etc/xdg/openbox/autostart, will be run. Then the user script at ~/.config/openbox/autostart is run afterward. This is my autostart.

File managers:

I use Thunar; a fast, light-weight and easy-to-use file manager. It is the file manager for Xfce. I started using sunflower. It is available in AUR, so it needs to be built: $ mkdir ~/builds $ mv sunflower.tar.gz ~/builds $ tar -xzvf sunflower.tar.gz $ cd sunflower ------------------------ Check for PKGBUILD and any install files ------------------------ $ makepkg -s # pacman -U sunflower-<version number>-<package revision number>-<architecture>.pkg.tar.xz $ pacman -Qm

Icons:

Icons theme that I use is Faenza 1.2 available from Gnome-look.org. It comes with "zipped" format so I need an unzip program to extract it. $ mkdir icons; mv faenza_icons_by_tiheum-d2v6x24.zip icons/; cd icons $ unzip faenza_icons_by_tiheum-d2v6x24.zip $ ./INSTALL There is an INSTALL script for this so execute it and follow the instruction.

Wallpaper:

On my home system, I use nigrogen to draw wallpapers on my dual-head display, but I like feh for its lightweight and powerful image displaying capabilities. This is how to use it as a desktop wallpaper manager. $ feh --bg-scale /path/to/image.file As an image viewer: $ feh /path/to/image.file To browse images in a specific directory: $ feh -g 320x240 -d -S filename /path/to/directory
  • -g : Forces the images to appear no larger than 320x240
  • -d : Draws the file name
  • -S filename : Sorts teh images by file name
My current wallpaper for Arch Linux is available here.

Terminal:

I use rxvt-unicode (urxvt). It a terminal emurator forked from rxvt and supports unicode. It is highly customizable via ~/.Xdefaults and its complete reference is available from here. My .Xdefaults file is available here.

PS1:

My PS1 is very simple. Since there is only me on this system, I don't need to show the user name. Here is my .bashrc script $ vi ~/.bashrc ------------------------ ID=`id -u` if [[ "${ID}" -eq 0 ]]; then PS1='\]\e[01;35m\]root\]\e[00;31m\]@\h\[\e[00;37m\][\[\e[01;34m\]\w\[\e[00;37m\]]\n\[\e[47m\]\[\e[1;30m\]#\[\033[00m\] ' else PS1='\[\e[00;32m\]\A \[\e[00;91m\]\u\[\e[01;93m\]@\h\[\e[00;37m\][\[\e[01;34m\]\w\[\e[00;37m\]]\n\[\e[47m\]\[\e[1;30m\]$\[\e[00m\] ' fi set -o vi $ vim ~/.bash_profile ------------------------ if [ -f ~/.bashrc ]; then . ~/.bashrc fi

Key Binding:

One of Openbox’s great strengths is that every aspect of the window manager can be configured with keyboard. I'm still experimenting with this feature but here is my rc.xml. At this point, I move the active window with "Super" + l (to left), "Super" + h (to right), "Super" + k (to up), and "Super" + j (to down).

Menu:

My customized menu is here. This menu includes reboot and shutdown. For a regular user to be able run those commands, it needs to be added in the sudoers file:# visudo ------------------------ [user_name] ALL=NOPASSWD: /sbin/shutdown That's all!
-gibb

2 comments

  1. skm

    Nice article. Instructions about how you installed each thing is appreciated.

    I’d like to give it a try, but am not sure exactly which part of my slackware64/kde installation needs to be replaced–that is, what exactly X gives, kde gives, and kwin gives.

    I’m not sure the steps I need to do to get something similar (with panel, etc) working. A blank screen might seem daunting, without the knowledge of which parts I need to install to have icons, backgound wallpaper, etc. What replaces the K menu, if anything?

    Keep the good articles coming! Maybe I cna get a clear enough picture to give it a try.

Leave a Reply to skm Cancel reply

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>