Xfce4, LXDE, and Openbox

What I need is performance, eye candy is optional.

My primary desktop environment is Xfce, as it is more lightweight than GNOME, KDE, or Cinnamon (Mate is out of my choice), yet it has more goodies (plugins) than LXDE. But due to my 4-year-old laptop, I found that LXDE has better performance than Xfce significantly. I can run multiple heavy applications at the same time, especially Firefox and Chromium. Xfce performance drops when I run both applications simultaneously. Switching between applications is slower. If running with Skype at the same time, and doing some development testing, the performance drops drastically.

LXDE is even more lightweight than Xfce. That is why I used LXDE. The only drawback of LXDE is that it does not allow me to zoom the screen with Alt+Mouse Scroll. This is a crucial feature I need as a lecturer. In order to gain a better speed, I also have to sacrifice the wallpaper auto changing as in Xfce. Furthermore, configuring the LXDE is a little troublesome. Since LXDE is using Openbox as window manager, a lot of configurations depend on the Openbox.

Openbox configuration

To configure the LXDE Openbox, we can use the obconf to configure. It is actually editing the ~/.config/openbox/lxde-rc.xml.

obconf also works on Openbox (window manager only). The corresponding file is ~/.config/openbox/rc.xml.

Hotkey configuration

LXDE hotkeys are depending on the Openbox too. We can use the obkey to configure the hotkeys. It is also editing the ~/.config/openbox/lxde-rc.xml or rc.xml.

Openbox right-click context menu

LXDE has its own panel (lxpanel). It allows to show (mostly) all the applications in the menu. However, if we right-click Openbox desktop area, the context menu does not show the installed applications. The application menu in the Openbox is actually written in the ~/.config/openbox/menu.xml. The skeleton file contains the hard coded applications.

There are several ways to show the menu items dynamically based on the installed applications. I personally use openbox-xdgmenu by adding something like this to the menu.xml,

<menu execute="openbox-xdgmenu /etc/xdg/menus/lxde-applications.menu" id="desktop-app-menu" label="Applications"/>

menu.xml is also used by Openbox without running the LXDE. That means, if a user login with Openbox window manager instead of LXDE, it will use the same menu.xml.

However, this can be changed by editing the lxde-rc.xml (LXDE) or rc.xml (Openbox window manager only) to load specific menu XML file. As a result, we are allowed to have different menu.xml files, one for LXDE and one for Openbox (window manager only).

Autostart

Autostart is quite complicated. If using LXDE, Xfce, or Openbox, the application desktop files in the ~/.config/autostart will be launched once login. They can also be disabled.

However, LXDE also allows autostart through ~/.config/lxsession/LXDE/autostart, where the LXDE is the default profile name. The autostart file is not exactly a shell script, but we can add the commands in this autostart file.

Though LXDE is based on Openbox, it does not use ~/.config/openbox/autostart file. If we login with Openbox window manager only, then ~/.config/openbox/autostart will be sourced (called) instead. This autostart file is just a shell script. As a result, we can use control structure like if-else. In order to run a batch of commands immediately, we can use the “&” to run the commands in the background.

There is another thing worth to know. If our display manager is LXDM or LightDM, it will source the ~/.xprofile. However, if we write our commands in the .xprofile, (I think) the commands will called before the DE is totally loaded. Therefore, the command like “compton” will not affect the Openbox. (Compton is an X window compositor, so that the Openbox will become compositing window manager.)

Openbox applications

Since Openbox is just a window manager, if we login with Openbox window manager only, there is no panel, wallpaper, volume control, etc. Therefore, we have to install the packages by our own. Besides that, Openbox does not handle graphical logout. However, we can install oblogout and add it to the Openbox menu.

I personally use the tint2 as the panel, feh for the wallpaper for both Openbox and LxDE (since I don’t use PCManFM), volumeicon for controlling the volume, compton to composite the window, and xscreensaver for screen saver. tint2 has the battery indicator and date time indicator. So, this is how my Openbox look.

Openbox with Tint2
Openbox with Tint2

 

From Ubuntu to Xubuntu on HP Mini

Yes, again. HP Mini 1000 series, small screen, lightweight, RAM is not big. I like Ubuntu Desktop Edition, though there is Ubuntu Netbook Remix, it is not my favourite. Because I use the netbook just like a desktop, got a lot of developers’ tools, GIMP, etc.

Ubuntu, using GNOME as the desktop environment. I like GNOME because I like GTK+. I like GTK+ because I like C programming. Then, I read an article about Xfce, which is more lightweight thant GNOME. Which is also using GTK+. So I tried it.

No need to reinstall Xubuntu, just install xubuntu-desktop package from Ubuntu repositories, then you can taste the new desktop environment.

Everything runs well. Good, nice, really faster. Nautilus is replaced by Thunar, though Nautilus is still there, I can still run Nautilus. But Thunar is the default file manager. One can replace other default application by right click a certain file type, then choose “Open with other application…”, choose your favourite and set as default. Then, the file type will be associated with the application.

One of the biggest drawbacks is customizing the menu items. Unlike Ubuntu, Xubuntu cannot edit the menu items unless editing the XML files. Another drawback is, if want to add launcher at the panel like GNOME, I need set it manually, because Xfce cannot right click the menu items to add as launcher.

Since I installed gmrun, it is good enough to let me enter the command rather than choosing the items at the menu bar.

There is another drawback which I just found. The default VNC server (vino) cannot works on Xfce. Therefore, needs to use x11vnc from commandline. But, still enjoying it!

Xubuntu