OpenBox Installation and Customization

Hello colleagues, today I bring you a simple guide on how to install and configure Openbox. For many it is against known, but it never hurts to have it at hand.

Note: As I have said before, this guide will be focused on ArchLinux which is the distribution I am using. Some packages may change their name.

First and foremost we are going to install a few things that we will need. This guide will be focused on the installation of OpenBox and not the base system.

We begin:

sudo pacman -S openbox obconf obmenu oblogout tint2 xcompmgr

open box: It is the WindowsManager to install.
obconf: It is the OpenBox configuration wizard, it will be quite useful.
Obmenu: It is a gui to configure the Openbox Menu. If not, we can do it by hand.
oblogout: By default, OpenBox does not bring more than the «Close Session» to shut down, this will be our best option.
tint2: OpenBox does not have a panel where you can see the open windows and the applications on the tray. This is my favorite.
xcompmgr: As its name implies, it is a manager of compositions. Shadows, transparencies, etc.

Once installed, copy the OpenBox configuration files to our home (~ /)

If the folder does not exist, just do:

mkdir ~/.config/openbox/

And later:

cp /etc/xdg/openbox/{menu.xml,autostart,rc.xml} ~/.config/openbox/{menu.xml,autostart,rc.xml}

You have to be clear about what each of these files is for.

menu.xml : It is the file that configures the OpenBox Menu (right click on desktop). From there you can launch applications or scripts, for example.

rc.xml : It is the main configuration file of OpenBox, from it the actions of the keys, the visual aspect of the same, among other things, are configured.

autostart: As its name indicates, from here applications that we define at the beginning of the session will be launched. Like for example conky or tint2.

To launch it we have two options. Add it to ~ / .xinitrc for Slim or from some other Session Manager like KDM or GDM.

Editing ~ / .xinitrc (Slim), we add the line:

exec openbox-session

We save and close.

Since KDM is 'automatic' and no need to add any lines.

With the new Arch installation, it should be remembered that daemons are no longer used in rc.conf but are launched via systemctl.

systemctl enable kdm.service o systemctl enable slim.service

It is done. We already have the files copied, and we can also launch it with Slim or KDM (or GDM, etc). Right now, if we enter OpenBox, we will only see the mouse pointer, and the gray background.

Let's start with the basic settings.

OpenBox menu

Optionally, we can create the OpenBox menu with MenuMaker. The latter, what it does is make a reading of all the programs installed in our system and add them to our menu.

sudo pacman -S menumaker

And then just create it in the following way.

mmaker OpenBox3 -f -t (Here you must put the terminal emulator chosen by you)

In my case it was:

mmaker OpenBox3 -f -t rxvt

It is worth clarifying that the option '-f' is to overwrite the menu.xml that we copied before.

If not, there is always the option to do it by hand or with the Obmenu gui. To do it by hand, we simply open the file

menu.xml with nano or leafpad and Edit.

The syntax of it is quite simple.

<*item label="NetBeans"*> <*action name="Execute"*>
<*execute*>netbeans<*/execute*>
<*/action*> <*/item*>

Note: It goes without saying that the ** do not go.

In the first line, the name of the program is located, in the following the command to be executed.

If not, the other option is Obmenu. It is very simple and I do not think it is necessary to explain much.

Well, we've come a long way.

Now it only remains to customize it.

GTK themes.

To handle GTK themes, I like to use lxappearance since OpenBox doesn't have any of these tools out of the box. GTK themes can be downloaded from different websites such as deviantart.com and gnome-look.org.

We install with:

sudo pacman -S lxappearance

The GTK themes, we must unzip them in the Themes folder of our Home (~ / .themes /).

That's a screenshot of my already customized Lxappearance with a theme.

Icons

These can also be downloaded from DeviantArt, from Gnome-Look or from the AUR, with the same Lxappearance we can set them. These should be placed in /usr/share/icons/

Wallpapers

I personally use Nitrogen to manage the Wallpapers. We proceed to install it:

sudo pacman -S nitrogen

So that the wallpaper is defined in each login, then we will add a command to the OpenBox autostart.

Mouse cursor.

From LxAppearance itself we can configure the mouse pointer. Also from the aforementioned websites we can download pointer themes, or from the ArchLinux AUR.

Startup applications: AutoStart.

Personally, I don't like to load the Openbox autostart much, I have the feeling that the less things open, the faster the environment starts.

Here we will add some applications such as Conky, xcompmgr and others.

Among others, some example lines could be:

nitrogen --restore & << Esta linea indica que Nitrogen repone el wallpaper al inicio.

If we have many lines, do not forget the & at the end of each of them.

conky & << Auto inicia Conky.

Here is an example of my autostart:

http://paste.desdelinux.net/4562

Key binding.

The configuration of the keys has a fairly simple scheme: It is in ~/.config/openbox/rc.xml in the Keybinds section.

<*keybind key="Alt-F2"*>
<*action namoe="Execute"*>
<*command*>gmrun<*/command*>
<*/action*>
<*/keybind*>

Note: The ** do not go.-

In the first line, there is the series of keys to use, in the second the name of the action and in the third line, the action itself.

When in doubt, and to make things easier, I leave my key configuration, where GmRun is already configured as an application launcher, the multimedia keys, and the keys to control the brightness on the screen, among many others.

http://paste.desdelinux.net/4563

Panel

Like I said before, I personally prefer Tint2. I find it very light and aesthetic.

We add it to the OpenBox autostart through:

tint2 &

There are many configurations of it. Meanwhile I leave you the one I use. Thanks to ~ leodelacruz on DeviantArt.

http://paste.desdelinux.net/4564

They should copy it and save it as tint2rc in ~/.config/tint2/

Transparencies and Shadows.

I really like the simplicity of xcompmgr. That is why I recommend it. Everyone can configure it as they like best.
We add it to autostart with

xcompmgr &

File manager.

Here everyone can (And as at any time in this guide) use what they like the most or convenient. I like the simplicity of pcmanfm.

We install it with:

sudo pacman -S pcmanfm

Exit, Restart or Shutdown

Last but not least is the shutdown. As I said before, OpenBox only brings the "Close session" by default.

We solve it with Oblogout.

We can add it to the OpenBox menu, or from our preferred launcher.

And well, for now that's all .. Each one is the owner of doing things according to their desire and / or tastes .. I hope it will be useful ..

Once finished, it might look like this:

Note: In the picture: PcManFm, LxAppearance, Urxvt, Tint2, Conky

Greetings.

Ivan!


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   KZKG ^ Gaara said

    Excellent post friend, really yes ... and not only that, well written, without problems with labels, in short, a great pleasure to review posts like this 🙂

    regards

  2.   auroszx said

    Very good post, something repeated on the Web but it never hurts 🙂

    PS: In the xcompmgr section, I don't know what "names" are xD Don't take it the wrong way 😛

    1.    KZKG ^ Gaara said

      Hey! come on, it's a good post, don't be a troll HAHA

      1.    chinoloco said

        Hi guys, I'm new to the forum and to linux. As I can request help with this tutorial, it is seen that when people read it they already understand it, so I need help.
        Thank you!

    2.    Leper_Ivan said

      Repaired; D

  3.   Leper_Ivan said

    Hahahaha, I commented on it at the beginning of the post .. It is quite seen, but it never hurts, and there are some contributions that I think are worth reviewing .. Thank you very much for the comments. And thanks Gaara for the compliment, hahaha .. = D

    I'm going to see if I can repair the shadows 😛

  4.   Josh said

    The post is very good, I have always wanted to try openbox now that the new arch iso comes out, I will try it. Thank you

  5.   elip89 said

    Excellent post Iván very good for those who want their Arch with Openbox or for those who simply want to try it for the first time 🙂

    regards

  6.   luweeds (@luweeds) said

    Arch + Openbox + lxterminal + tint2 + dmenu + volumeicon + conky That is my distro par excellence, there are those who add wbar, in any case the performance is very good. Thanks for the post! A very practical and light configuration: lxterminal, I definitely encourage you to try it. I greet everyone!

  7.   said

    I save it in PDF, such a detailed guide never hurts.

    I use Crunchbang, which is certainly the same and the truth is that you do not need Gnome, or KDE or things like that! as light as all that and you can have docks, shortcuts or menu always present, comfortable and light the truth, I don't know how people don't use it anymore.

    Here I leave my look that is between light, simplistic and «pretty».

    http://i.imgur.com/OLq7A.png

  8.   Aaron Mendo said

    Thanks for the post I am using fluxbox it is very similar.

    Greetings.

  9.   makubex uchiha said

    excellent tutorial friend xD it is seen that openbox has a good design xD

  10.   Leper_Ivan said

    Thank you all for appreciating this contribution = D

  11.   rots87 said

    Well, I stay with kde hahaha grax for the bearing when I cheer up

  12.   davidlg said

    Hello very good, I would add a few things:
    Obkey to add keyboard shortcuts
    Pipemenus for recent documents and folders, and I think there is tb to generate the menu of the programs but for this I don't remember

  13.   Leper_Ivan said

    Obkey at least in my case, it got me confusing for the keys issue and it didn't always work. Then each one is the owner of using the tool that suits him best.

  14.   sirMvM said

    As they said above, very well written and explained
    Congratulations

  15.   Claudio said

    Excellent post! I've been testing Arch + openbox in a virtualbox for a while now and this helps me a lot to improve its appearance!

    Thank you !.

  16.   ever said

    Excellent post. A few months ago I put together the same thing, and thanks to the excellent Archlinux wiki I discovered several of the programs you mention. As a detail, it is good to recommend the tintwizard application to trust the tint2 bar.
    What if I have a problem, maybe someone can help me ... I can change the icons that appear in pcmanfm, even if I change them in lxappearance, they do not change ... and I have no choice but to use the horrible icons by default. If anyone knows let me know. Greetings to all

    1.    Leper_Ivan said

      It would not know well why it is. If lxappearance does not change, you should check if it creates the configuration file correctly in ~ / .config / gtk-3.0 / settings.ini

  17.   elendilnarsil said

    Ahhhhh !! Openbox !!!!!

  18.   Alberto said

    Very good, I also use openbox with debian on the notebook and very happy.
    One last thing: You could put your conky configuration file .conkyrc. I liked it a lot.

    A greeting.

    1.    Leper_Ivan said

      http://paste.desdelinux.net/4565

      There he is, buddy. If you want the black bar, you can do it in gimp. Or you ask me and I will send it to you. Or we simply change some configuration parameters and it is created from conky.

  19.   crotus said

    Spectacular guide Ivan, is the Openbox bible!

    1.    Leper_Ivan said

      Hahaha, I don't know if it's that bad. Thank you very much for commenting.

  20.   Fernando Gonzalez said

    There was a time when I used crunchbang and it seemed like an excellent distribution, especially because of the minimalism that works with openbox, it was excellent, I recommend it for advanced users or users who want to risk something much more attractive in the developer environment.

  21.   Daniel said

    Very good post friend, you know I would like you to make one the same but for Ubuntu 12.04, I would like to install openbox and configure it the same as you did in archlinux.

    1.    Leper_Ivan said

      It must be the same. At most the package names change. Nothing that an aptitude search doesn't fix.

  22.   mfcollf77 said

    Hello, excuse my ignorance. and this does not apply to fedora 17?

    I have been with FEDORA 3 for 17 days

    I need to know how to change colors to GNOME and create shortcuts on the desktop

    also how to configure the media player in FEDORA 17, there are many but which ones recommend that it have a good sound or something like that surrond as in windows media player.

    And another program other than wine to install windows programs in linux. That alone stops me from moving to linux. since I have an accounting program called quickbook that works on windows

    and if I can install the windows media player 11 in linux because of the sound?

    Is it true that the GNOME desktop is very heavy and slow? What is better, KDE?

    1.    Leper_Ivan said

      It must apply in the same way, only the package names may change. I personally like Amarok. Or MPD with a client. Almost all the layer programs between Linux and Windows software work on the basis of wine. You should install it.

      That depends on each person, and especially on the performance of your pc.

  23.   mfcollf77 said

    When I installed FEDORA 17 I installed updates that they said in a post. and due to power supply problems, it was canceled. and the battery didn't last long. and now when I install wine in the TERMINAL it runs but it sends messages that something was pending and that it has to be installed first and in the end it sends an error message.

    but I gave it update again and it doesn't last long like the first time and it still has problems. Some say that WINE gives problems that virtualization is better but I understand that it takes a lot of resources such as memory and processor

  24.   Claudio said

    Hi, I did not understand how to put configurations at the beginning. Any more extended explanation? For example, I want the transparencies to be from boot (now I configure them after logging in with Compositing) but I did not understand and it is not an unintelligible message xD

    1.    Leper_Ivan said

      You just have to add the command in the autstart that is in ~ / .config / openbox /

      For example:

      xcompmgr &
      conky &
      volumeicon &

      And so, with the command you want to use.

      1.    Claudio said

        Ok I made nano ~ / .config / openbox / and it is empty. Did I do something wrong?

        1.    Leper_Ivan said

          ~ / .config / openbox / autostart, I thought you would notice :)

          1.    Claudio said

            Well hey, I have little problems xDD

            We are talking about it on IRC, thanks for the answers!

  25.   ivan said

    Hello, I would like to know how I can change the white background of PCmanFM for an image as it is done in nautilus, I am using Fedora 16 LXDE on an old computer, I have searched the entire network and I cannot find a solution, I do not know what file to edit, for please help. Thanks in advance and sorry for the inconvenience. Cheers

    1.    Leper_Ivan said

      I think you cannot change the background of PcManFm ..

  26.   ivan said

    OK thanks. In your opinion, do you think it is convenient to change PCmanFM to Nautilus in LXDE?
    because I really like nautilus but I am not sure if I change it and if it will run fine in LXDE? Regards.

    1.    Leper_Ivan said

      I would not particularly use Nautilus in LXDE, but each with its own theme. Running will run ...

  27.   serfravirs said

    Openbox is very good, I installed it on my notebook and I am happy as a worm, I have always liked the minimalism of this window manager (although I also like Gnome a lot, which is the one I have on my PC).
    One more option to install together with Openbox is Synapse, you forget about the applications menu and it does many other things, I met it in Manjaro Openbox along with other things that I shot XD.
    By the way, I also use Arch Linux on both of my machines.

  28.   let's see said

    : / a bit cumbersome, made me want to try openbox anyway, thanks.

  29.   Ivan said

    Mola!

  30.   linuxero said

    Because when I put pacman it downloads the game pacman

  31.   Paambisito said

    Openbox uses the C language?

    1.    Sir Markus said

      Virtual Box occupies the C ++ language with spreader on x86