From Openbox to JWM

Openbox is the hotrod of stacking window managers.  It’s as powerful as the engine you put in it and can look like whatever you want it to, it depends entirely on your configuration and customization.  It doesn’t look like much of anything without your effort.

JWM is more like the Nissan 240sx.  It’s an old, fair looking coupe that runs well and gets the job done, but it can also be customized and modified to run side-by-side the fastest hotrod.  It looks more like a regular car though, no matter what you do.  In the same way, JWM looks like a regular window manager or desktop environment.

I decided to mess around with JWM on a whim after trying it briefly in the past.  Once I browsed through the jwmrc file that stores all of the configuration settings for the environment I realized how beautifully different JWM was from Openbox.

Openbox is a very basic window manager.  By default it offers window decorations, resizing, alt+tabbing, unlimited virtual desktops, keyboard shortcuts, a root menu for launching applications, a root menu for showing open applications across all desktops, and of course control buttons like close, minimize, maximize, shade, etc.  It stores its configurations in three main files: for launching files when logging in, menu.xml for configuring the root application launching menu, and rc.xml for all of the window management, visual, and keyboard configurations.  It does not come with a panel of any sort, a system tray, a dock, window icons, etc.  Most distributions choose to bundle tint2 or other similar, lightweight panel with Openbox to fill that role.

JWM is a window manager that provides one stop configuration for everything.  It is configured via the .jwmrc file stored in your user’s home directory.  Unlike Openbox, JWMs configurations are all found in this one singular file and also include a panel if desired.  JWM has some nifty features that I haven’t seen before as well such as multiple customizable root menus, and customizable panel buttons that can do more or less whatever you want them to.  It’s quite easy to configure into a very familiar, traditional style desktop environment without any additions.

What sold me on JWM over Openbox is the one-stop shop, everything’s in one file.  The focus is also on functionality over appearance, but just by adjusting the colors you can get a very conservative and respectable desktop.

Below are some screenshots as well as the configuration file used to produce that appearance.

Screenshot - 052113 - 14:24:52 Screenshot - 052113 - 14:25:17 Screenshot - 052113 - 14:25:35 Screenshot - 052113 - 14:32:16The following file should be named .jwmrc and be located in /home/USERNAME/

<?xml version="1.0"?>


   <!-- The root menu, if this is undefined you will not get a menu. -->
   <!-- Additional RootMenu attributes: onroot, labeled, label -->
   <RootMenu labeled="true" label="JWM Applications Menu" height="20" onroot="1">
      <Program icon="apps/22/terminal.png" label="Terminal">x-terminal-emulator</Program>
      <Program icon="apps/22/iceweasel.png" label="Web Browser">gnome-www-browser</Program>
      <Program icon="apps/22/file-manager.png" label="File Manager">thunar</Program>
      <Program icon="apps/22/xfce-edit.png" label="Today's Diary">bash /home/mark/bin/</Program>
<!-- #DEBIAN -->
      <Menu icon="places/22/folder.png" label="Applications">
         <Program icon="apps/22/inkscape.png" label="Inkscape">inkscape</Program>
         <Program icon="apps/22/gimp.png" label="Gimp">gimp</Program>    
         <Program icon="apps/22/libreoffice-main.png" label="Libre Office">  
         <Program icon="apps/22/vlc.png" label="VLC">vlc</Program>
      <Menu icon="places/22/folder.png" label="Utilities">
         <Program icon="apps/22/galculator.png" label="Calculator">galculator</Program>
         <Program icon="apps/22/gcolor2.png" label="Color Picker">gcolor2</Program>
         <Program icon="apps/22/synaptic.png" label="Add/Remove Programs">
            gksudo synaptic
         <Program icon="apps/22/logviewer.png" label="JWM Configuration">geany /home/mark/.jwmrc</Program>
         <Program icon="apps/22/wallpaper.png" label="Change Wallpaper">nitrogen /usr/share/backgrounds/</Program>
         <Program icon="apps/22/gnome-screenshot.png" label="Screenshot">xfce4-screenshooter</Program>

      <!-- <Include>/etc/jwm/debian-menu</Include> -->

      <Program icon="actions/22/lock.png" label="Lock">
         xscreensaver-command -activate
      <Program label="Shutdown Menu" icon="actions/22/system-shutdown.png">cb-exit</Program>
      <Restart label="Restart JWM" icon="actions/22/system-restart-panel.png"/>
      <Exit label="Exit JWM" confirm="true" icon="actions/22/system-shutdown.png"/>

   <RootMenu labeled="true" label="Desktop Context Menu" height="20" onroot="3">
         <Program icon="apps/22/logviewer.png" label="JWM Configuration">geany /home/mark/.jwmrc</Program>
         <Program icon="apps/22/wallpaper.png" label="Change Wallpaper">nitrogen /usr/share/backgrounds/</Program>
         <Program icon="apps/22/gnome-screenshot.png" label="Screenshot">xfce4-screenshooter</Program>
         <Menu label="Conky">
             <Program icon="" label="Start Conky">conky</Program>
             <Program icon="" label="Kill Conky">killall conky</Program>
             <Program icon="" label="Edit Conky RC">geany /home/mark/.conkyrc</Program>

   <!-- Additional tray attributes: autohide, width, border, layer, layout -->
   <Tray  x="0" y="-1" height="28" autohide="false">

      <!-- Additional TrayButton attribute: label -->
      <TrayButton icon="places/22/start-here-debian2.png" label="JWM">root:1</TrayButton>

<!--      <TrayButton label="SD">showdesktop</TrayButton> -->
      <TrayButton icon="apps/22/iceweasel.png">exec:x-www-browser</TrayButton>
      <TrayButton icon="apps/22/terminator.png">exec:x-terminal-emulator</TrayButton>
      <TrayButton icon="apps/22/xfce-edit.png">exec:geany</TrayButton>
      <TrayButton icon="apps/22/file-manager.png">exec:thunar</TrayButton>

      <!-- Additional Pager attribute: labeled -->
      <Pager labeled="true"/>

      <TaskList maxwidth="256"/>


      <!-- Additional Swallow attribute: height -->
      <!--       <Swallow name="xload" width="64">
         xload -nolabel -bg black -fg red -hl white
      </Swallow> -->

      <Clock format="%l:%M %p">xclock</Clock>


   <!-- Visual Styles -->



   <!-- Additional TrayStyle attribute: insert -->





   <!-- Virtual Desktops -->
   <!-- Desktop tags can be contained within Desktops for desktop names. -->
   <Desktops width="2" height="2">
      <!-- Default background. Note that a Background tag can be
           contained within a Desktop tag to give a specific background
           for that desktop.
      <Background type="image">/home/mark/images/wallpapers/shared/wallpaper-144268.jpg</Background>

   <!-- Double click speed (in milliseconds) -->

   <!-- Double click delta (in pixels) -->

   <!-- The focus model (sloppy or click) -->

   <!-- The snap mode (none, screen, or border) -->
   <SnapMode distance="10">border</SnapMode>

   <!-- The move mode (outline or opaque) -->

   <!-- The resize mode (outline or opaque) -->

   <StartupCommand>nitrogen --restore</StartupCommand>
   <StartupCommand>bash /home/mark/.dropbox-dist/dropboxd</StartupCommand>

   <!-- Key bindings -->
   <Key key="Up">up</Key>
   <Key key="Down">down</Key>
   <Key key="Right">right</Key>
   <Key key="Left">left</Key>
   <Key key="h">left</Key>
   <Key key="j">down</Key>
   <Key key="k">up</Key>
   <Key key="l">right</Key>
   <Key key="Return">select</Key>
   <Key key="Escape">escape</Key>

   <Key mask="A" key="F2">exec:gmrun</Key>
   <Key mask="A" key="Tab">nextstacked</Key>
   <Key mask="A" key="F4">close</Key>
   <Key mask="A" key="#">desktop#</Key>
   <Key mask="A" key="F1">root:1</Key>
   <Key mask="A" key="F3">window</Key>
   <Key mask="A" key="F10">maximize</Key>
   <Key mask="A" key="Right">rdesktop</Key>
   <Key mask="A" key="Left">ldesktop</Key>
   <Key mask="A" key="Up">udesktop</Key>
   <Key mask="A" key="Down">ddesktop</Key>
   <Key mask="CA" key="d">showdesktop</Key>


1 Comment

Filed under linux, technology

One response to “From Openbox to JWM

  1. Al

    I’ve always shied away from using JWM because, to be honest, I find the default theme to be unbearably ugly. Hideous, in fact. I prefer a bare Openbox desktop with Tint2 – must like you get out of the box with #! or Archbang.
    But you’ve convinced me that perhaps JWM doesn’t have to be as gaudy as it usually seems to be (especially in Puppy Linux); and considering it has a smaller footprint and centralized configuration has convinced me to finally give it a real go!

    Thanks for the post!

Leave a Reply

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