ob   AFTER INSTALLING OPENBOX   ob

LXDE-OPENBOX Guide
Beginner's Guide
After Installing Openbox
Alternatives & Galternative
Wallpaper Changer
Arachnophilia HTML
Araneae HTML Editor
Fbpanel
FastStone Image Editor
Image Magick
9menu
MyStuff Menu
Openbox Menu
Openbox Dock
Openbox Dynamical Menu
Openbox Themes
PhotoFiltre Editor
Poor Mans Radio Player
Terminal Apps
Wbar Dock

SPARKY LINUX OPENBOX START
Openbox distros (and/or LXDE distros) are generally characterized as lightweight, basic, no-frills operating systems designed for old and/or under-powered computers, if you buy into conventional propoganda. My purpose here is to show how a few relatively simple adjustments to the basic install can improve the substance and appearance of a basic ob distro to the level or better than heavyweight Linux distributions. I have chosen a basic Sparky Linux Openbox, my favorite distro, to illustrate. On the right is the desktop of a newly installed Sparky Openbox with date given in the Conky. Here we see a simple no-icon Root Menu, a minimal, menuless lower Tint2 panel and a bland static wallpaper and Conky. Below that is the same system reconfigured both aesthetically and substance-wise. Here we see considerable more color, a complete root menu with many submenus including a complete dynamic applications submenu, icons, a quick launch wmdrawer dock applet programmable for any number of launchers, a wmsystemtray, two more wmapplets and a lower fbpanel complete with another dynamical applications menu and a colorful desk pager that mimics the wallpaper. The wallpaper is not only prettier but rotates to a new picture at whatever rate the user desires. The Conky is prettier and yields more information (except for top 5 processes, which can be easily added) in less space. Finally, the windows theme as demonstrated by the Root Menu is colorful and bright.

SPARKY LINUX OPENBOX AFTER

1. Root Menu

The basic Openbox Root Menu gets a lot of undeserved criticism primarily because it seems to be always presented in distros in a minimal form that does not automatically display a new app, that is, as a static menu. Many distos have tried remedying this apparent deficiency, but always with a cost in simplicity and a loss of some of the advantages of an easily edited up-front static menu. Others add GUI tools to configure the Root Menu, but, in my opinion, these are more clumsy and limited than just directly editing the base files, of which there are only 3: menu.xml, rc.xml and autostart.sh. A computer-wide (all-users) copy of these files is located in /etc/xdg/openbox, and each user has his version in ~/.config/openbox.

<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/           file:///usr/share/openbox/menu.xsd">
         <menu id=" " label=" " >

...

         </menu>
</openbox_menu>
Chart 1. Openbox Menu Template


The skeleton of all openbox menus is shown in Chart 1 above. As you can see a menu consists of 3 parts, top, bottom and entries ("..." in the chart). The only parts in the top and bottom that are ever edited are the menu id and label, with the two restrictions that two menu ids are never the same and for the Root Menu:

   menu id="root-menu" label="Openbox 3".

The important piece here is the "menu id". Once chosen, always be consistent in using that menu id for that menu, and never give two different menus the same menu id.

Candidates for the "..." position (entries) in Chart 1 are normally of 3 types:

   (1) An app or places launch code;
   (2) The launch code for another basic menu;
   (3) The launch code for another menu generated by a computer script (pipemenu).

The template for an app or places launcher along with 2 examples are shown in Chart 2 below:

<item label=" " icon=" ">
<action name="Execute">
<command>
"item-execute"
</command>
</action>
</item>
<item label="geany" icon="geany">
<action name="Execute">
<command>
geany
</command>
</action>
</item>
<item label="downloads" icon="folder_download">
<action name="Execute">
<command>
pcmanfm --new-win "file:~/Downloads"
</command>
</action>
</item>
Chart 2. App and Places Launcher Menu Entry Examples


rc

Menu Section of rc.xml
So adding, removing or editing here requires a label (name), icon (if used) and launch command (item-execute).

The template for adding a basic menu to another menu is as follows:

   <menu id=" " label=" " icon=" " />;
example:
   <menu id="systeminfo" label="System Information" icon="applications-system" />.

So adding, removing or editing here requires a label (name), icon (if used) and menu id. The submenu format is exactly as in Chart 1 with the same name as the menu id and with a .xml suffix. It should be put into ~/.config/openbox. So the "System Information" example just given would be named systeminfo.xml and would have the address ~/.config/openbox/systeminfo.xml. For each static basic submenu put in the Root Menu, two lines, as illustrated by the image on the right for the Root Menu in Sparky-After, need to be entered in ~/.config/openbox/rc.xml.

It is worth noting that static submenus can be put directly into the Root Menu, so, avoiding a second file and putting the 2 lines in rc.xml, at the expense of a larger menu.xml file. To do this, remove the backslash (\) at the end of the menu introduction, follow with the items and finish with </menu>. For the System Information example, this would look like the following (minus displaying the items):

<menu id="systeminfo" label="System Information" icon="applications-system">
<item label=...>
...
</item>
</menu>

The template for adding a computer generated menu (pipemenu) to another menu is as follows:

   <menu id=" " label=" " execute=" " icon=" " />;
example:
   <menu id="desktop-app-menu" label="Applications" execute="openbox-menu" icon="applications-internet" />.

So adding, removing or editing here requires a label (name), icon (if used) and an execute for launching the outside menu generator, which in the example is openbox-menu. Openbox-menu can be installed using synaptic or apt-get:

sudo apt-get install openbox-menu.

It is an application that regularly generates a new (complete) menu based on the .desktop files found on the computer, and so it nicely fills the gap left by the Root Menu not automatically putting new apps on the menu. Openbox-menu can be also used to launch special desktop menus, some of which are usually stored in /etc/xdg/menus in most Debian-based distributions. The open sub-menu labeled "Applications" in the Sparky-After image above is the result of using openbox-menu to launch the lxde-applications.menu by putting the following entry into the Root Menu:

   <menu id="desktop-app-menu" label="Applications" execute="openbox-menu lxde-applications.menu" icon="/usr/share/icons/applications.png" />.

Getting a dynamical general apps menu is a big thing in upgrading the classical static openbox menu. However, it is also nice to be able to easily construct special static submenus. The Sparky-After image above shows a Root Menu with 17 submenus of which 5 are dynamical in nature and 12 are basic menus constructed for my own purposes. The latter would have been hard to do with the menus in distributions with other window managers. Four of the basic submenus have their bodies written directly into the Root Menu as just described, and four of the dynamical ones are generated with pipemenus already installed in Sparky. For more information on menus see Openbox Menu.

2. Panels and Dock

wmappletopen
Wmdrawer Open
My desktop wallpaper is a slide show of nice pictures (See Wallpaper Changer.). Therefore, I try to keep icons, panels, docks, conky, etc at a minimum. The best way to achieve this end is to use the Dock app that comes with openbox and which can be configured by going to the Dock section in Obconf. The openbox dock is invincible except for the applets put on it. I generally use wmdocker applets, which are totally compatible with the Openbox Dock. See Openbox Dock for more information. The key applets to use are wmdrawer, whose size (128x64 pixels maximum) and placement can be configured, and wmsystemtray. To install:

   sudo apt-get install wmdrawer wmsystemtray.

wmapplets
Openbox Dock
Wmdrawer offers a user constructed menu for quick launching favorite apps - any number of apps and any kind of app for which a launch command can be devised. The little wmdrawer penguin icon (see the image on the left) can be positioned just about anywhere. Placing the tool tip on the icon will bring up the menu, configurable to pop-up in any of the 4 possible directions. Moving the tooltip to a menu icon will show the corresponding app's name, and clicking it will launch it. A 128 pixel wide wmdrawer button easily accomodates 4 columns, each allowing icons 32 pixels wide. What could be quicker, and, when closed, occupy so little space? The image on the right shows an open wmdrawer configuration containing 4 columns, each approximately 32 pixels wide and each containing 8 apps and a letter so that "MENU" is spelled out in the bottom row. After installing wmdrawer, you need to put a personal configuration file in your home directory:

   sudo cp /usr/share/doc/wmdrawer/wmdrawerrc.example ~/.wmdrawerrc .

Configuration is very easy. Open .wmdrawerrc in a text editor and configure. The app list is at the bottom and requires 3 fields for each app: "tool tip", "icon image address" and "launch command". You will need to add wmdrawer to Autostart, as is the case for all wmdocker applets.

Wmsystemtray is a system tray that puts items in groups of 4 which can be rotated by clicking the arrows. Thus, the occupied desktop space is never greater than 64x64 pixels. Using a dock system tray frees up the space a tray would normally take on a panel. The other 2 wmdocker applets in the image above are wmcalclock and wmstickynotes.

Because I use wmdrawer and wmsystemtray I only need a panel for its taskbar and desktop pager. The panel that is perfect for this as well as offers other features as a bonus is fbpanel. Fbpanel is lightweight, has a very "clean" appearance including a very nice dynamical menu with a configurable static part for favorites, has a desktop pager that reflects the wallpaper, allows multiple panels simultaneously and allows every kind of app launcher for which a launch command can be written. Holding down the control button and right clicking fbpanel brings up a GUI for configuring everything on it but adding launchers. For that you have to edit the configuration file ~/.config/fbpanel/default. For more on fbpanel, see Fbpanel. To replace Tint2 with Fbpanel:

   sudo apt-get install fbpanel sudo apt-get remove --purge tint2 .

3. Basic Applications

Leafpad is an excellent simple text editor and worth keeping as a backup if you use a text editor often. However, something better endowed is needed if you do a lot of text editing, especially if html files are being edited; so:

   sudo apt-get install geany .

Geany uses about 11 MG space.

To get a text editor that can directly edit root text files, use the newly installed geany (or leafpad) to open as root geany.desktop:

   sudo geany /usr/share/applications/geany.desktop .

As a space saver and to make it easier to read, if ever opened again, first delete all the redundant languages and resave geany.desktop. Do this whenever a .desktop file is open, thus, freeing a fair amount of hard drive space over the long haul. Next, while the file is still open, edit it by replacing exec=geany %f with exec=gksudo geany %f . Save the file as a new file named geany-root.desktop. This puts geany-root in your menus. It can be used to directly open, edit and save text files owned by root. Just right click on a root text file and choose "open with geany-root". Next, do the same thing with pcmanfm.desktop, which may be called "file-manager", or something similar. Now, just "right clicking" on a "root folder" and choosing "open with pcmanfm-root" opens that folder in a window where anything in the folder can be opened, edited and saved with regular tools and in the regular manner.

My image viewer of choice is Mirage, because it is lightweight and includes the first editing tools - cropping, resizing, rotating and saturation adjustment - that everyone uses. In addition Mirage has slide show capabilities and a thumbnail bar. The heavier gpicview only views. So:

   sudo apt-get install mirage sudo apt-get remove --purge gpicview .

Every worth-while Linux distro with the space and power to execute them should have Wine and Java installed. There are simply too many very good wine and java apps to ignore all of them. To install Wine, follow the instructions in Lxlinux Openbox Guide - Wine, and to install Oracle Java JRE, Lxlinux Openbox Guide - Oracle Java. To run Java apps, it should suffice to just install JRE, rather than the bigger JDK.

My complete photo editors of choice are either of two wine apps: PhotoFiltre or Faststone Image Editor.

Although quite heavy (78MB), vlc player is the premier audio-video device available to Linux. See Lxlinux Openbox Guide - Recording Audio for more about vlc. To install vlc:

   sudo apt-get install vlc .

Hakerdefo has provided a terrific lightweight shell script, Poor Mans Radio Player (PMRP), for playing online fm radio. It is programmed with more than 200 stations spred over 20+ categories. The version utilizing vlc, pmrp-vlc, can be downloaded from this website using wget:

   wget http://lxlinux.com/pmrp-vlc.

To install prmp-vlc, just follow the instructions given in the link. Pmrp-vlc has the advantage over prmp of being able to instantly record what's playing by clicking the vlc-record button.

For PDF reading, the lightweight Xournal is a better choice than qpdf, because it is also able to do lightweight editing. So:

   sudo apt-get install xournal sudo apt-get remove --purge qpdf .

Obconf is available to pick general themes for the window manager. Another tool, lxappearance, is available to choose a GTK-theme. Lxappearance, when installed, is generally found in the Settings or Preference categories as "Customize Look and Feel", and the installed themes are listed in the Widget section. Apparently the window manager theme and GTK-theme can be chosen separately, which allows for "wild" combinations, for example, below is an image of a desktop with a Tron-Orange window theme (controls root menu and window borders) and the Brick GTK-theme (controls folder appearance, fbpanel menu +).

themes
Tron-Orange - Brick Combination Theme


For more information about lxappearance, see Lxlinux Openbox Guide - Desktop, and to install:

   sudo apt-get install lxappearance .

There are several simple lightweight useful tools that should be in every Linux distribution, but often are not:

   sudo apt-get install apt-xapian-index arandr clipit grabc inxi simple-scan streamripper udisks wavemon xdotool .

Openbox is a stacking type window manager, as opposed to a tiling window manager, which organizes open windows into mutually non-overlapping frames. There are programs that can be installed and activated to make a stacking window manager into a tiling one. One such, designed primarily with openbox in mind, is pytyle. To install pytyle:

   sudo apt-get install pytyle .

The configuration file is /usr/share/pytyle/pytylerc and ~/.config/pytyle/pytylerc. Read it to see which keybindings control the pytyle settings, for example, alt+a tiles and alt+u untiles. The image "Wmdrawer Open" shown above displays in the top row the 4 pytyle modes mostly used by me. Clicking one will launch that mode. They were set-up using xdotool to press the correct keys; for example, xdotool key "alt+a" would be the command for "tyle start". Sometimes when your desktop is total chaos, it is useful to be able to just click an icon and get an organized chaos! See the images below.
untiled
UNTILED
tiled
TILED