Difference between revisions of "Openbox"

From ArchWiki
Jump to: navigation, search
m (Tips & Tricks: Removed pipe-menus in this section. Pipe-menus were already in a previous section.)
(Changed section heading titles & levels and moved sub-sections to improve structure. Text content was not changed.)
Line 10: Line 10:
 
{{i18n_entry|简体中文|Openbox(简体中文)}}
 
{{i18n_entry|简体中文|Openbox(简体中文)}}
 
{{i18n_links_end}}
 
{{i18n_links_end}}
 +
 
Openbox is a lightweight and highly configurable window manager with extensive standards support. Its features are well-documented at the [http://icculus.org/openbox/ official website]. This article will pertain to running Openbox under Arch Linux.
 
Openbox is a lightweight and highly configurable window manager with extensive standards support. Its features are well-documented at the [http://icculus.org/openbox/ official website]. This article will pertain to running Openbox under Arch Linux.
  
 
== Installation ==
 
== Installation ==
 +
 
Openbox is available from the standard repositories:
 
Openbox is available from the standard repositories:
 
  # pacman -S openbox
 
  # pacman -S openbox
Line 28: Line 30:
 
{{Filename|menu.xml}} controls the Openbox application menu that appears when you click on your desktop.  The default items are pretty sparse, but it's very easy to modify the menu structure to suit your needs.  See the menu section below for more details, or visit the [http://icculus.org/openbox/ Openbox website].
 
{{Filename|menu.xml}} controls the Openbox application menu that appears when you click on your desktop.  The default items are pretty sparse, but it's very easy to modify the menu structure to suit your needs.  See the menu section below for more details, or visit the [http://icculus.org/openbox/ Openbox website].
  
== Getting Started ==
+
== Stand-alone window manager ==
  
 
To run Openbox on its own, simply add the following to the bottom of {{Filename|~/.xinitrc}}:
 
To run Openbox on its own, simply add the following to the bottom of {{Filename|~/.xinitrc}}:
Line 36: Line 38:
 
  mv ~/.config/autostart ~/.config/autostart-bak
 
  mv ~/.config/autostart ~/.config/autostart-bak
  
=== Using Openbox with GNOME ===
+
== Window manager for Desktop Environments ==
  
 +
=== GNOME ===
 
==== GNOME 2.26 ====
 
==== GNOME 2.26 ====
 
 
'''''Follow the next guide for GNOME 2.24. If it fails try this:'''''
 
'''''Follow the next guide for GNOME 2.24. If it fails try this:'''''
  
Line 80: Line 82:
 
  $ xinit /usr/bin/openbox-gnome-session
 
  $ xinit /usr/bin/openbox-gnome-session
  
=== Using Openbox with KDE ===
+
=== KDE ===
 
# If you use KDM, select the "KDE/Openbox" login option
 
# If you use KDM, select the "KDE/Openbox" login option
 
# If you use startx, add {{Codeline|exec openbox-kde-session}} to {{Filename|~/.xinitrc}}
 
# If you use startx, add {{Codeline|exec openbox-kde-session}} to {{Filename|~/.xinitrc}}
Line 86: Line 88:
 
  $ xinit /usr/bin/openbox-kde-session
 
  $ xinit /usr/bin/openbox-kde-session
  
=== Using Openbox with Xfce4 ===
+
=== Xfce4 ===
 
Log into a normal Xfce4 session. From your terminal of choice, do:
 
Log into a normal Xfce4 session. From your terminal of choice, do:
 
  $ killall xfwm4 ; openbox & exit
 
  $ killall xfwm4 ; openbox & exit
Line 122: Line 124:
 
(When terminating Xfdesktop, the above issue with the virtual desktops is no longer a problem.)
 
(When terminating Xfdesktop, the above issue with the virtual desktops is no longer a problem.)
  
== Configuration ==
+
== Preferences ==
  
=== Preferences ===
 
 
Currently, there are two options for configuring the core Openbox preferences; manually edit the {{Filename|rc.xml}}, or use the ObConf tool.
 
Currently, there are two options for configuring the core Openbox preferences; manually edit the {{Filename|rc.xml}}, or use the ObConf tool.
  
==== Setting Preferences Manually ====
+
=== Manual configuration ===
  
 
To configure Openbox manually, simply edit {{Filename|~/.config/openbox/rc.xml}} with your favorite text editor. The config file provides plenty of comments throughout, and [http://icculus.org/openbox/index.php/Help:Contents full documentation] is available at the official website.
 
To configure Openbox manually, simply edit {{Filename|~/.config/openbox/rc.xml}} with your favorite text editor. The config file provides plenty of comments throughout, and [http://icculus.org/openbox/index.php/Help:Contents full documentation] is available at the official website.
  
==== Setting Preferences with ObConf ====
+
=== ObConf ===
  
 
[http://icculus.org/openbox/index.php/ObConf:About ObConf] is GUI-based Openbox configuration tool, which can be used to set most preferences including themes, virtual desktops, window properties and desktop margins.
 
[http://icculus.org/openbox/index.php/ObConf:About ObConf] is GUI-based Openbox configuration tool, which can be used to set most preferences including themes, virtual desktops, window properties and desktop margins.
Line 140: Line 141:
 
{{Note | ObConf cannot be used to configure keyboard shortcuts and some other advanced features.  For these modifications, you must edit {{Filename|rc.xml}} manually (see above). Other option is [http://code.google.com/p/obkey/ ObKey] application (available in [[AUR]]).}}
 
{{Note | ObConf cannot be used to configure keyboard shortcuts and some other advanced features.  For these modifications, you must edit {{Filename|rc.xml}} manually (see above). Other option is [http://code.google.com/p/obkey/ ObKey] application (available in [[AUR]]).}}
  
=== Menu Management ===
+
=== Application configuration ===
 +
 
 +
Openbox features per-application settings, allowing you to define rules for your programs. For example, you can:
 +
* load your web browser on a certain desktop
 +
* load your terminal without a window border
 +
* load your torrent client at a certain position on your screen
 +
 
 +
These are defined in {{Filename|~/.config/openbox/rc.xml}}. As you might expect, the instructions are well-documented within the file itself. Full details can also be found here: http://icculus.org/openbox/index.php/Help:Applications
 +
 
 +
== Menus ==
  
 
The default Openbox menu includes a variety of applications to get you started, but you'll probably want to customize this at some point. There are a number of ways to do so:
 
The default Openbox menu includes a variety of applications to get you started, but you'll probably want to customize this at some point. There are a number of ways to do so:
  
==== Manually ====
+
=== Manual configuration ===
 +
 
 
Similar to the {{Filename|rc.xml}} file, you can edit {{Filename|~/.config/openbox/menu.xml}} with your favourite text editor. Although many of the settings are self-explanatory, [http://icculus.org/openbox/index.php/Help:Menus full documentation] is available.
 
Similar to the {{Filename|rc.xml}} file, you can edit {{Filename|~/.config/openbox/menu.xml}} with your favourite text editor. Although many of the settings are self-explanatory, [http://icculus.org/openbox/index.php/Help:Menus full documentation] is available.
  
==== MenuMaker ====
+
=== MenuMaker ===
 +
 
 
[http://menumaker.sourceforge.net/ MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Openbox.  MenuMaker will search your computer for executable programs and create an XML menu based on the results.  It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if the user desires.
 
[http://menumaker.sourceforge.net/ MenuMaker] is a powerful tool that creates XML-based menus for a variety of Window Managers, including Openbox.  MenuMaker will search your computer for executable programs and create an XML menu based on the results.  It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if the user desires.
  
Line 164: Line 176:
 
This will give you a pretty thorough menu.  Now you can modify the menu.xml by hand, or simply regenerate the list whenever you install new software.
 
This will give you a pretty thorough menu.  Now you can modify the menu.xml by hand, or simply regenerate the list whenever you install new software.
  
==== Obmenu ====
+
=== Obmenu ===
 +
 
 
Obmenu is a GUI-based menu editor for Openbox.  For those who don't enjoy editing XML source code, this is probably the best option for you.
 
Obmenu is a GUI-based menu editor for Openbox.  For those who don't enjoy editing XML source code, this is probably the best option for you.
  
Line 172: Line 185:
 
Once installed, simply run {{Codeline|obmenu}} and add or remove the desired applications.
 
Once installed, simply run {{Codeline|obmenu}} and add or remove the desired applications.
  
===== obm-xdg =====
+
==== Obm-xdg ====
 +
 
 
<tt>obm-xdg</tt> is a command-line tool that comes with Obmenu. It can generate a categorized sub-menu of installed GTK/GNOME applications.
 
<tt>obm-xdg</tt> is a command-line tool that comes with Obmenu. It can generate a categorized sub-menu of installed GTK/GNOME applications.
  
Line 182: Line 196:
 
{{Note | If you do not have GNOME installed, then you need to install '''gnome-menus''' package for obm-xdg to work.}}
 
{{Note | If you do not have GNOME installed, then you need to install '''gnome-menus''' package for obm-xdg to work.}}
  
===== Pipe Menus =====
+
=== Python based xdg menu script ===
Openbox (and other WMs like WindowMaker and PekWM) allow you to write scripts that dynamically build menus on the fly.  Some examples are system monitors, media player controls, and weather forecasts.  Many examples can be found on the openbox [http://icculus.org/openbox/index.php/Openbox:Pipemenus site].
+
 
+
Xyne has also created a file browser and brisbin33 has one for scanning for / connecting to wireless hot spots (requires netcfg).  The relevant forum posts for these utilities are [http://bbs.archlinux.org/viewtopic.php?id=77197&p=1 here] and [http://bbs.archlinux.org/viewtopic.php?id=78290 here]
+
  
===== Python based xdg menu script =====
 
 
This script can be found in Fedora's Openbox package. You will only have to put the script somewhere and add a menu entry.
 
This script can be found in Fedora's Openbox package. You will only have to put the script somewhere and add a menu entry.
  
Line 199: Line 209:
  
 
Save the file, and run: {{Codeline|openbox --reconfigure}}.
 
Save the file, and run: {{Codeline|openbox --reconfigure}}.
=== Startup Programs ===
+
 
 +
=== Pipe menus ===
 +
 
 +
Openbox (and other WMs like WindowMaker and PekWM) allow you to write scripts that dynamically build menus on the fly.  Some examples are system monitors, media player controls, and weather forecasts.  Many examples can be found on the openbox [http://icculus.org/openbox/index.php/Openbox:Pipemenus site].
 +
 
 +
Xyne has also created a file browser and brisbin33 has one for scanning for / connecting to wireless hot spots (requires netcfg).  The relevant forum posts for these utilities are [http://bbs.archlinux.org/viewtopic.php?id=77197&p=1 here] and [http://bbs.archlinux.org/viewtopic.php?id=78290 here]
 +
 
 +
== Startup programs ==
 +
 
 
Openbox features support for running programs at startup.  This is provided by the "openbox-session" command.
 
Openbox features support for running programs at startup.  This is provided by the "openbox-session" command.
  
Line 208: Line 226:
 
Startup programs are managed in {{Filename|~/.config/openbox/autostart.sh}}.  Full instructions and best practices for how to do this are available at the [http://icculus.org/openbox/index.php/Help:Autostart Openbox website].
 
Startup programs are managed in {{Filename|~/.config/openbox/autostart.sh}}.  Full instructions and best practices for how to do this are available at the [http://icculus.org/openbox/index.php/Help:Autostart Openbox website].
  
=== Per-application settings ===
+
== Themes and appearance ==
Openbox features per-application settings, allowing you to define rules for your programs. For example, you can:
+
* load your web browser on a certain desktop
+
* load your terminal without a window border
+
* load your torrent client at a certain position on your screen
+
 
+
These are defined in {{Filename|~/.config/openbox/rc.xml}}. As you might expect, the instructions are well-documented within the file itself. Full details can also be found here: http://icculus.org/openbox/index.php/Help:Applications
+
  
=== Theming and Appearance ===
 
 
With the exception of the Openbox Themes topic, the following section is intended for users who have configured Openbox to run as a standalone desktop, without the assistance of GNOME, KDE or Xfce.
 
With the exception of the Openbox Themes topic, the following section is intended for users who have configured Openbox to run as a standalone desktop, without the assistance of GNOME, KDE or Xfce.
  
==== Openbox Themes ====
+
=== Openbox themes ===
 +
 
 
Openbox themes control the appearance of window borders, including the titlebar and titlebar buttons. They also determine the appearance of the application menu and on-screen display (OSD).   
 
Openbox themes control the appearance of window borders, including the titlebar and titlebar buttons. They also determine the appearance of the application menu and on-screen display (OSD).   
  
Line 240: Line 252:
 
For a GUI theme editor, take a look at [http://xyne.archlinux.ca/info/obtheme ObTheme].
 
For a GUI theme editor, take a look at [http://xyne.archlinux.ca/info/obtheme ObTheme].
  
==== Desktop Wallpaper ====
+
=== GTK Themes ===
  
Openbox itself does not include a way to change the wallpaper. This can be done easily with programs like [[Feh]] or [[Nitrogen]].  Other options include ImageMagick, hsetroot and xsetbg.
+
==== GTK2/GTK+ ====
  
==== GTK Themes ====
 
====== GTK2/GTK+ ======
 
 
GTK+ themes can be managed easily with the '''[[LXDE | lxappearance]]''', '''gtk-chtheme''', or '''switch2''' utilities. To install, run:
 
GTK+ themes can be managed easily with the '''[[LXDE | lxappearance]]''', '''gtk-chtheme''', or '''switch2''' utilities. To install, run:
 
  # pacman -S lxappearance
 
  # pacman -S lxappearance
Line 255: Line 265:
 
Now you can simply run {{Codeline|lxappearance}}, {{Codeline|gtk-chtheme}} or {{Codeline|switch2}} to set the desired theme.
 
Now you can simply run {{Codeline|lxappearance}}, {{Codeline|gtk-chtheme}} or {{Codeline|switch2}} to set the desired theme.
  
====== GTK1 ======
+
==== GTK1 ====
 
For legacy GTK1 themes, install the '''gtk-theme-switch''' package:
 
For legacy GTK1 themes, install the '''gtk-theme-switch''' package:
 
  # pacman -S gtk-theme-switch
 
  # pacman -S gtk-theme-switch
 
Then run {{Codeline|switch}} to select a desired theme.
 
Then run {{Codeline|switch}} to select a desired theme.
  
==== GTK Fonts ====
+
==== GTK fonts ====
===== Manually edit the config file =====
+
 
If you want to change the type and size of your fonts, add the following to {{Filename|~/.gtkrc.mine}}:
+
To manually change the type and size of your fonts, add the following to {{Filename|~/.gtkrc.mine}}:
 
  style "user-font"
 
  style "user-font"
 
  {
 
  {
Line 279: Line 289:
  
 
Both {{Codeline|font_name}} and {{Codeline|gtk-font-name}} fields are required for backwards compatibility.
 
Both {{Codeline|font_name}} and {{Codeline|gtk-font-name}} fields are required for backwards compatibility.
===== Use GUI tools =====
+
 
You can use '''gtk-chtheme''' or '''lxappearance''' to set GTK font settings. Please refer to the above section.
+
You can also use '''gtk-chtheme''' or '''lxappearance''' to set GTK font settings. Please refer to the above section.
  
 
==== GTK Icons ====
 
==== GTK Icons ====
 +
 
First, extract the desired icon theme to <tt>/usr/share/icons</tt> (system-wide access) or <tt>~/.icons</tt> (local user access), then:
 
First, extract the desired icon theme to <tt>/usr/share/icons</tt> (system-wide access) or <tt>~/.icons</tt> (local user access), then:
===== Manually edit the config file =====
+
 
 
Add the following to {{Filename|~/.gtkrc.mine}}:  
 
Add the following to {{Filename|~/.gtkrc.mine}}:  
 
  gtk-icon-theme-name = "[name-of-icon-theme]"
 
  gtk-icon-theme-name = "[name-of-icon-theme]"
Line 298: Line 309:
 
  include "/home/username/.gtkrc.mine"
 
  include "/home/username/.gtkrc.mine"
 
  # -- THEME AUTO-WRITTEN DO NOT EDIT
 
  # -- THEME AUTO-WRITTEN DO NOT EDIT
===== Use GUI tools =====
+
 
 
You can use '''lxappearance''' to choose GTK icon themes. Please refer to the above section.
 
You can use '''lxappearance''' to choose GTK icon themes. Please refer to the above section.
  
==== Mouse cursor themes ====
+
=== Mouse cursors ===
 +
 
 
Extract the desired Xcursor theme to either <tt>/usr/share/icons</tt> (system-wide access) or <tt>~/.icons</tt> (local user access). There are also a limited amount of themes available in the community repository that can be installed using pacman.
 
Extract the desired Xcursor theme to either <tt>/usr/share/icons</tt> (system-wide access) or <tt>~/.icons</tt> (local user access). There are also a limited amount of themes available in the community repository that can be installed using pacman.
  
Line 311: Line 323:
 
  Xcursor.size: [size]
 
  Xcursor.size: [size]
  
==== Desktop Icons ====
+
=== Desktop icons ===
 
Openbox does not provide a means to display icons on the desktop.  PcmanFM, [http://rox.sourceforge.net ROX], [http://idesk.sourceforge.net iDesk], or even Nautilus (and the gnome-settings-daemon) can provide this function.  
 
Openbox does not provide a means to display icons on the desktop.  PcmanFM, [http://rox.sourceforge.net ROX], [http://idesk.sourceforge.net iDesk], or even Nautilus (and the gnome-settings-daemon) can provide this function.  
  
 
ROX and PCmanFM have the additional advantage of being lightweight file managers.
 
ROX and PCmanFM have the additional advantage of being lightweight file managers.
  
== Tips & Tricks ==
+
=== Desktop wallpaper ===
  
=== Recommended Programs ===
+
Openbox itself does not include a way to change the wallpaper. This can be done easily with programs like [[Feh]] or [[Nitrogen]].  Other options include ImageMagick, hsetroot and xsetbg.
 +
 
 +
== Recommended programs ==
  
 
There is list of [[Lightweight Software]] at Arch's wiki, most of them nicely fits with Openbox.
 
There is list of [[Lightweight Software]] at Arch's wiki, most of them nicely fits with Openbox.
  
==== Login Managers ====
+
=== Login managers ===
 +
 
 
[http://slim.berlios.de/ SLiM] provides a lightweight and elegant graphical login solution for standalone Openbox configurations.  Refer to Arch's [[SLiM]] wiki for detailed instructions.
 
[http://slim.berlios.de/ SLiM] provides a lightweight and elegant graphical login solution for standalone Openbox configurations.  Refer to Arch's [[SLiM]] wiki for detailed instructions.
  
 
[http://qingy.sourceforge.net/ Qingy] is ultralight and very configurable graphical login. It support login to both console and X Windows sessions. It uses [http://www.directfb.org DirectFB], therefore it does not start X Windows unless you choose X Windows session. See article about [[Qingy]] at Arch's wiki.
 
[http://qingy.sourceforge.net/ Qingy] is ultralight and very configurable graphical login. It support login to both console and X Windows sessions. It uses [http://www.directfb.org DirectFB], therefore it does not start X Windows unless you choose X Windows session. See article about [[Qingy]] at Arch's wiki.
  
==== Composite Desktop ====
+
=== Composite desktop ===
 +
 
 
[[Xcompmgr]] is a lightweight composite manager capable of rendering drop shadows, fading and simple window transparency within Openbox and other window managers.
 
[[Xcompmgr]] is a lightweight composite manager capable of rendering drop shadows, fading and simple window transparency within Openbox and other window managers.
  
 
[http://aur.archlinux.org/packages.php?ID=30042 Cairo Comp Mgr] is an alternative.
 
[http://aur.archlinux.org/packages.php?ID=30042 Cairo Comp Mgr] is an alternative.
  
==== Transparency ====
+
=== Panels, trays, and pagers ===
By using the program transset-df, it is virtually the same as [[transset]], (available by: pacman -S transset-df) you can enable transparancy of windows on the fly. For instance by editing the following in {{Filename|~/.config/openbox/rc.xml}} you can have your middle mouse scroll enable and disable transparency by scrolling down and up on the scroll button, respectively, while over the title bar (it is in the <mouse> section):
+
 
    <context name="Titlebar">
+
There are quite a lot of utilities available that provide a panel (taskbar), system tray, and pager to Openbox. The most common are:
      <mousebind button="Left" action="Press">
+
 
        <action name="Focus"/>
+
==== Panels ====
        <action name="Raise"/>
+
* [http://wiki.archlinux.org/index.php/PyPanel PyPanel]
      </mousebind>
+
* [http://nsf.110mb.com/bmpanel/ bmpanel]
      <mousebind button="Left" action="Drag">
+
* [http://code.google.com/p/tint2/ Tint2]
        <action name="Move"/>
+
* [http://www.gnomefiles.org/app.php/LXPanel LXPanel]
      </mousebind>
+
* [http://fbpanel.sourceforge.net fbpanel]
      <mousebind button="Left" action="DoubleClick">
+
* [http://perlpanel.org/ PerlPanel]
        <action name="ToggleMaximizeFull"/>
+
* [http://www.chatjunkies.org/fspanel/ fspanel]
      </mousebind>
+
* [http://www.xfce.org/projects/xfce4-panel/ xfce4-panel]
      <mousebind button="Middle" action="Press">
+
* [http://developer.gnome.org/arch/gnome/corecomponents/panel/ gnome-panel]
      <action name="Lower"/>
+
* [http://code.google.com/p/avant-window-navigator/ avant-window-navigator]
        <action name="FocusToBottom"/>
+
* [http://developer.berlios.de/projects/cairo-dock/ cairo-dock]
        <action name="Unfocus"/>
+
* [http://code.google.com/p/wbar/ wbar]
      </mousebind>
+
 
      <mousebind button="Up" action="Click">
+
==== Trays ====
        <action name= "Execute" >
+
* [http://stalonetray.sourceforge.net/ Stalonetray]
        <execute>transset-df -p .2 --inc  </execute>
+
* [http://download.gna.org/fvwm-crystal/trayer/1.0/ Trayer]
        </action>
+
 
      </mousebind>
+
==== Pagers ====
      <mousebind button="Down" action="Click">
+
* [http://projects.l3ib.org/trac/visibility Visibility]
        <action name= "Execute" >
+
* [http://bbtools.sourceforge.net/ bbpager]
        <execute>transset-df -p .2 --dec </execute>
+
* [http://aur.archlinux.org/packages.php?ID=970 netwmpager]
        </action>
+
* [http://useperl.ru/ipager/index.en.html IPager]
      </mousebind>
+
 
      <mousebind button="Right" action="Press">
+
Make your choice and add it to your startup file.
        <action name="Focus"/>
+
 
        <action name="Raise"/>
+
=== File managers ===
        <action name="ShowMenu">
+
 
          <menu>client-menu</menu>
+
There are many possibilities, but the most popular lightweight file managers are:
        </action>
+
* [http://thunar.xfce.org Thunar]. Thunar supports auto-mount features and other plugins.
      </mousebind>
+
# pacman -S thunar
    </context>
+
Thunar may be started in daemon mode for tighter desktop integration. For instance, inserting a USB pendrive will invoke a Thunar window to popup, with the drive contents listed in the window.
As of now, it only appears to work when no other actions are taken.
+
 
 +
To start Thunar in daemon mode, edit {{Filename|~/.config/openbox/autostart.sh}} and add:
 +
thunar --daemon &
 +
 
 +
* [http://rox.sourceforge.net ROX] (ROX provides desktop icons)
 +
# pacman -S rox
 +
* [http://pcmanfm.sourceforge.net PCMan] (pcmanfm also provides desktop icons)
 +
# pacman -S pcmanfm
 +
For even lighter options, consider [http://www.obsession.se/gentoo/ Gentoo] or [http://emelfm.sourceforge.net/ emelFM], both of which use the familiar 'Midnight Commander' two pane layout (these two require Gtk 1.2.x).
 +
 
 +
Of course, you can also use GNOME's Nautilus.  Although slower than the above solutions, it has the additional advantage of VFS support (e.g. remote SSH, FTP and Samba connections)
 +
 
 +
=== Application launchers ===
 +
 
 +
==== dmenu ====
  
==== Application Launchers ====
 
===== dmenu =====
 
 
Set-up dmenu as described in the [[dmenu]] wiki article.  Then, add the following entry to the <keyboard> section {{Filename|~/.config/openbox/rc.xml}} to enable a shortcut to launch dmenu:
 
Set-up dmenu as described in the [[dmenu]] wiki article.  Then, add the following entry to the <keyboard> section {{Filename|~/.config/openbox/rc.xml}} to enable a shortcut to launch dmenu:
 
     <keybind key="W-space">
 
     <keybind key="W-space">
Line 379: Line 407:
 
     </keybind>
 
     </keybind>
  
===== Gmrun =====
+
==== Gmrun ====
 +
 
 
[http://sourceforge.net/projects/gmrun gmrun] provides an excellent Run dialog box, similar to the Alt+F2 features found in Gnome and KDE:
 
[http://sourceforge.net/projects/gmrun gmrun] provides an excellent Run dialog box, similar to the Alt+F2 features found in Gnome and KDE:
 
  # pacman -S gmrun
 
  # pacman -S gmrun
Line 387: Line 416:
 
  </keybind>
 
  </keybind>
  
===== Bashrun =====
+
==== Bashrun ====
 +
 
 
[http://bashrun.sourceforge.net bashrun] provides a different, barebones approach to a run dialog, using a specialized bash session within a small xterm window. It is available in the community repository and can be launched through the Alt+F2 style approach mentioned previously. To make bashrun act more like a traditional run dialog, add the following entry to the <applications> section {{Filename|~/.config/openbox/rc.xml}}:
 
[http://bashrun.sourceforge.net bashrun] provides a different, barebones approach to a run dialog, using a specialized bash session within a small xterm window. It is available in the community repository and can be launched through the Alt+F2 style approach mentioned previously. To make bashrun act more like a traditional run dialog, add the following entry to the <applications> section {{Filename|~/.config/openbox/rc.xml}}:
 
     <application name="bashrun">
 
     <application name="bashrun">
Line 397: Line 427:
 
     </application>
 
     </application>
  
===== Launchy =====
+
==== Launchy ====
 +
 
 
[http://www.launchy.net/ Launchy] is a less minimalistic approach; it is skinnable and offers more functionality such as a calculator, checking the weather, etc. Originally for Windows, similar to Gnome Do.
 
[http://www.launchy.net/ Launchy] is a less minimalistic approach; it is skinnable and offers more functionality such as a calculator, checking the weather, etc. Originally for Windows, similar to Gnome Do.
 
  # pacman -S launchy
 
  # pacman -S launchy
 
It is launched by Ctrl+Space key combination.
 
It is launched by Ctrl+Space key combination.
  
===== LXPanel =====
+
==== LXPanel ====
 +
 
 
[http://www.gnomefiles.org/app.php/LXPanel LXPanel] If LXPanel is used as a taskbar manager, the run utility from the LXPanel menu can be executed with {{Codeline|"lxpanelctl run"}}.
 
[http://www.gnomefiles.org/app.php/LXPanel LXPanel] If LXPanel is used as a taskbar manager, the run utility from the LXPanel menu can be executed with {{Codeline|"lxpanelctl run"}}.
  
===== gnome-panel =====
+
==== gnome-panel ====
 +
 
 
The gnome-panel run dialog can be executed with  
 
The gnome-panel run dialog can be executed with  
 
  gnome-panel-control --run-dialog
 
  gnome-panel-control --run-dialog
  
==== File managers ====
+
=== Clipboard managers ===
  
There are many possibilities, but the most popular lightweight file managers are:
 
* [http://thunar.xfce.org Thunar]. Thunar supports auto-mount features and other plugins.
 
# pacman -S thunar
 
Thunar may be started in daemon mode for tighter desktop integration. For instance, inserting a USB pendrive will invoke a Thunar window to popup, with the drive contents listed in the window.
 
 
To start Thunar in daemon mode, edit {{Filename|~/.config/openbox/autostart.sh}} and add:
 
thunar --daemon &
 
 
* [http://rox.sourceforge.net ROX] (ROX provides desktop icons)
 
# pacman -S rox
 
* [http://pcmanfm.sourceforge.net PCMan] (pcmanfm also provides desktop icons)
 
# pacman -S pcmanfm
 
For even lighter options, consider [http://www.obsession.se/gentoo/ Gentoo] or [http://emelfm.sourceforge.net/ emelFM], both of which use the familiar 'Midnight Commander' two pane layout (these two require Gtk 1.2.x).
 
 
Of course, you can also use GNOME's Nautilus.  Although slower than the above solutions, it has the additional advantage of VFS support (e.g. remote SSH, FTP and Samba connections).
 
 
==== Clipboard Managers and copy/paste====
 
 
You may wish to install a clipboard manager for feature rich copy/paste ability. '''xfce4-clipman-plugin, parcellite,''' or '''glipper-old''' may be installed via pacman. Add your choice to autostart.sh. From the terminal, Ctrl+Insert as copy and Shift+Insert as paste generally works as well. You may also copy from terminal with Ctrl+Shift+C, and paste with mouse middle click.
 
You may wish to install a clipboard manager for feature rich copy/paste ability. '''xfce4-clipman-plugin, parcellite,''' or '''glipper-old''' may be installed via pacman. Add your choice to autostart.sh. From the terminal, Ctrl+Insert as copy and Shift+Insert as paste generally works as well. You may also copy from terminal with Ctrl+Shift+C, and paste with mouse middle click.
==== Panels, Trays, and Pagers ====
 
  
There are quite a lot of utilities available that provide a panel (taskbar), system tray, and pager to Openbox. The most common are:
+
=== RSS-Reader ===
 +
* [http://primo-nordica.net/dezza/fasterfeeder.py FasterFeeder RSS Reader for Openbox]
  
'''Panels'''
+
== Tips and tricks ==
* [http://wiki.archlinux.org/index.php/PyPanel PyPanel]
+
* [http://nsf.110mb.com/bmpanel/ bmpanel]
+
* [http://code.google.com/p/tint2/ Tint2]
+
* [http://www.gnomefiles.org/app.php/LXPanel LXPanel]
+
* [http://fbpanel.sourceforge.net fbpanel]
+
* [http://perlpanel.org/ PerlPanel]
+
* [http://www.chatjunkies.org/fspanel/ fspanel]
+
* [http://www.xfce.org/projects/xfce4-panel/ xfce4-panel]
+
* [http://developer.gnome.org/arch/gnome/corecomponents/panel/ gnome-panel]
+
* [http://code.google.com/p/avant-window-navigator/ avant-window-navigator]
+
* [http://developer.berlios.de/projects/cairo-dock/ cairo-dock]
+
* [http://code.google.com/p/wbar/ wbar]
+
  
'''Trays'''
+
=== Copy and paste ===
* [http://stalonetray.sourceforge.net/ Stalonetray]
+
* [http://download.gna.org/fvwm-crystal/trayer/1.0/ Trayer]
+
  
'''Pagers'''
+
From the terminal, Ctrl+Insert as copy and Shift+Insert as paste generally works as well. You may also copy from terminal with Ctrl+Shift+C, and paste with mouse middle click.
* [http://projects.l3ib.org/trac/visibility Visibility]
+
* [http://bbtools.sourceforge.net/ bbpager]
+
* [http://aur.archlinux.org/packages.php?ID=970 netwmpager]
+
* [http://useperl.ru/ipager/index.en.html IPager]
+
  
Make your choice and add it to your startup file.
+
=== Transparency ===
  
'''RSS-Reader'''
+
By using the program transset-df, it is virtually the same as [[transset]], (available by: pacman -S transset-df) you can enable transparancy of windows on the fly. For instance by editing the following in {{Filename|~/.config/openbox/rc.xml}} you can have your middle mouse scroll enable and disable transparency by scrolling down and up on the scroll button, respectively, while over the title bar (it is in the <mouse> section):
* [http://primo-nordica.net/dezza/fasterfeeder.py FasterFeeder RSS Reader for Openbox]
+
    <context name="Titlebar">
 +
      <mousebind button="Left" action="Press">
 +
        <action name="Focus"/>
 +
        <action name="Raise"/>
 +
      </mousebind>
 +
      <mousebind button="Left" action="Drag">
 +
        <action name="Move"/>
 +
      </mousebind>
 +
      <mousebind button="Left" action="DoubleClick">
 +
        <action name="ToggleMaximizeFull"/>
 +
      </mousebind>
 +
      <mousebind button="Middle" action="Press">
 +
      <action name="Lower"/>
 +
        <action name="FocusToBottom"/>
 +
        <action name="Unfocus"/>
 +
      </mousebind>
 +
      <mousebind button="Up" action="Click">
 +
        <action name= "Execute" >
 +
        <execute>transset-df -p .2 --inc  </execute>
 +
        </action>
 +
      </mousebind>
 +
      <mousebind button="Down" action="Click">
 +
        <action name= "Execute" >
 +
        <execute>transset-df -p .2 --dec </execute>
 +
        </action>
 +
      </mousebind>
 +
      <mousebind button="Right" action="Press">
 +
        <action name="Focus"/>
 +
        <action name="Raise"/>
 +
        <action name="ShowMenu">
 +
          <menu>client-menu</menu>
 +
        </action>
 +
      </mousebind>
 +
    </context>
 +
As of now, it only appears to work when no other actions are taken.
  
=== Get xprop values for per-app settings quickly ===
+
=== Xprop values for applications ===
 
If you use per-application settings frequently, you might find this bash alias handy:
 
If you use per-application settings frequently, you might find this bash alias handy:
  
Line 474: Line 506:
 
  WM_CLASS(STRING) = "NAME", "CLASS"
 
  WM_CLASS(STRING) = "NAME", "CLASS"
  
=== Firefox/Gran Paradiso application rules ===  
+
==== Xprop for Firefox ====
 +
 
 
For whatever reason, Firefox and its open source equivalents will ignore application rules (e.g. <desktop>) unless {{Codeline|class&#61;"Firefox*"}} is used, regardless of what xprop reports as the actual WM_CLASS values.
 
For whatever reason, Firefox and its open source equivalents will ignore application rules (e.g. <desktop>) unless {{Codeline|class&#61;"Firefox*"}} is used, regardless of what xprop reports as the actual WM_CLASS values.
  
 
=== Linking the menu to a command ===
 
=== Linking the menu to a command ===
 +
 
Some people would want to link the Openbox main menu, or any other, to a command. This is useful for creating a menu button in a panel, for example. Although Openbox doesn't support this, a very simple script, xdotool, can simulate a keypress by running a command. Xdotool is [http://aur.archlinux.org/packages.php?do_Details=1&ID=14789&O=0&L=0&C=0&K=xdotool&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd available on AUR]. To use it, simply add the following code to the <keyboard> section of your {{Filename|rc.xml}}:
 
Some people would want to link the Openbox main menu, or any other, to a command. This is useful for creating a menu button in a panel, for example. Although Openbox doesn't support this, a very simple script, xdotool, can simulate a keypress by running a command. Xdotool is [http://aur.archlinux.org/packages.php?do_Details=1&ID=14789&O=0&L=0&C=0&K=xdotool&SB=n&SO=a&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd available on AUR]. To use it, simply add the following code to the <keyboard> section of your {{Filename|rc.xml}}:
 
     <keybind key="A-C-q">
 
     <keybind key="A-C-q">
Line 488: Line 522:
 
Of course, you can change the shortcut to your liking.
 
Of course, you can change the shortcut to your liking.
  
=== Urxvt in the background ===  
+
=== Urxvt in the background ===
 +
 
 
With Openbox, running a terminal as desktop background is easy. You won't need '''devilspie''' here.
 
With Openbox, running a terminal as desktop background is easy. You won't need '''devilspie''' here.
  
Line 513: Line 548:
 
The ''magic'' comes from the {{Codeline|<layer>below</layer>}} line, which place the application under all others. Here Urxvt is displayed on all desktops, change it to your convenience.
 
The ''magic'' comes from the {{Codeline|<layer>below</layer>}} line, which place the application under all others. Here Urxvt is displayed on all desktops, change it to your convenience.
  
== Additional Resources ==
+
== Resources ==
 +
 
 
* [http://icculus.org/openbox/ Openbox Website] &ndash; The official website
 
* [http://icculus.org/openbox/ Openbox Website] &ndash; The official website
 
* [http://planetob.openmonkey.com/ Planet Openbox] &ndash; Openbox news portal
 
* [http://planetob.openmonkey.com/ Planet Openbox] &ndash; Openbox news portal
 
* [http://www.box-look.org/ Box-Look.org] &ndash; A good resource for themes and related artwork
 
* [http://www.box-look.org/ Box-Look.org] &ndash; A good resource for themes and related artwork
 
<!-- vim: set ft=Wikipedia: -->
 
<!-- vim: set ft=Wikipedia: -->

Revision as of 04:24, 30 November 2009

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

Openbox is a lightweight and highly configurable window manager with extensive standards support. Its features are well-documented at the official website. This article will pertain to running Openbox under Arch Linux.

Installation

Openbox is available from the standard repositories:

# pacman -S openbox

Once installed, pacman will direct you to copy the default Template:Filename and Template:Filename configuration files to ~/.config/openbox/, for example:

Note: Do this as a regular user, not as root.
$ mkdir -p ~/.config/openbox/
$ cp /etc/xdg/openbox/rc.xml ~/.config/openbox/rc.xml
$ cp /etc/xdg/openbox/menu.xml ~/.config/openbox/menu.xml

Template:Filename is the core configuration file for Openbox. It is used to manage keyboard shortcuts, themes, virtual desktops and other features.

Template:Filename controls the Openbox application menu that appears when you click on your desktop. The default items are pretty sparse, but it's very easy to modify the menu structure to suit your needs. See the menu section below for more details, or visit the Openbox website.

Stand-alone window manager

To run Openbox on its own, simply add the following to the bottom of Template:Filename:

exec openbox-session

If you have used another window manager before, such as Xfce, and Openbox wont start after logging out of X, try moving the autostart folder:

mv ~/.config/autostart ~/.config/autostart-bak

Window manager for Desktop Environments

GNOME

GNOME 2.26

Follow the next guide for GNOME 2.24. If it fails try this:

If after installing openbox and trying to log into the 'Gnome/openbox' session but it always fails then you can do the following as one way to achieve running openbox as your window manager every time you log into the 'Gnome' session from your login manager (xdm, gdm, kdm, entrance, slim, etc.)

  1. Log into your Gnome only session (which would still be using metacity as its window manager) if you aren't already.
  2. Install openbox if you have not done so already
  3. Explore your menus to System → Preferences → Startup Applications (possibly named 'Session' for older versions of Gnome)
  4. Open Startup Application, select '+ Add' and enter the text as seen in the box below whilst omitting the text behind the #.
  5. Now hit the 'Add' button for that data entry window and make sure the checkbox beside your new entry is selected.
  6. Thus log out of your gnome session and log back in and you should be running openbox as your window manager.
  7. Enjoy!
Name:    Openbox Windox Manager          # Can be changed
Command: openbox --replace               # Text should not be removed from this line, but possibly added to it
Comment: Replaces metacity with openbox  # Can be changed

This creates an entry in a startup list which is executed by gnome everytime that particular user's gnome-session is started.

GNOME 2.24

First, create Template:Filename containing the following:

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=OpenBox
Exec=openbox
NoDisplay=true
# name of loadable control center module
X-GNOME-WMSettingsModule=openbox
# name we put on the WM spec check window
X-GNOME-WMName=OpenBox

Then, in gconf, set /desktop/gnome/session/required_components/windowmanager to openbox:

$ gconftool-2 -s -t string /desktop/gnome/session/required_components/windowmanager openbox

Finally, choose the GNOME session in the GDM sessions menu.

GNOME 2.22 and previous

  1. If you use GDM, select the "GNOME/Openbox" login option
  2. If you use startx, add Template:Codeline to Template:Filename
  3. From the shell:
$ xinit /usr/bin/openbox-gnome-session

KDE

  1. If you use KDM, select the "KDE/Openbox" login option
  2. If you use startx, add Template:Codeline to Template:Filename
  3. From the shell:
$ xinit /usr/bin/openbox-kde-session

Xfce4

Log into a normal Xfce4 session. From your terminal of choice, do:

$ killall xfwm4 ; openbox & exit

This will kill xfwm4, run Openbox, and close the terminal.

Log out, making sure to check the "Save session for future logins" checkbox. On next login, Xfce4 will use Openbox as its WM. To be able to exit the session using xfce4-session, open your file Template:Filename (if it isn't there, copy it from Template:Filename).

Look for the entry:

 <item label="Exit Openbox">
   <action name="Exit">
     <prompt>yes</prompt>
   </action>
 </item>

and change it to:

 <item label="Exit Openbox">
   <action name="Execute">
     <prompt>yes</prompt>
    <command>xfce4-session-logout</command>
   </action>
 </item>

Otherwise, using the "Exit" entry of the root-menu will cause Openbox to terminate its execution, leaving you without a window manager.

If you have an issue changing between virtual desktops with the mouse wheel skipping over virtual desktops, open your Template:Filename file and move the mouse binds with actions "DesktopPrevious" and "DesktopNext" from the context "Desktop" to the context "Root" (you may need to define the Root context).

If you want to use the Openbox root-menu instead of Xfce's, you may terminate Xfdesktop by running the following command in a terminal:

$ xfdesktop --quit

However, Xfdesktop manages the wallpaper and desktop icons, requiring you to use other utilities, such as ROX, for these functions.

(When terminating Xfdesktop, the above issue with the virtual desktops is no longer a problem.)

Preferences

Currently, there are two options for configuring the core Openbox preferences; manually edit the Template:Filename, or use the ObConf tool.

Manual configuration

To configure Openbox manually, simply edit Template:Filename with your favorite text editor. The config file provides plenty of comments throughout, and full documentation is available at the official website.

ObConf

ObConf is GUI-based Openbox configuration tool, which can be used to set most preferences including themes, virtual desktops, window properties and desktop margins.

To install ObConf, run:

# pacman -S obconf
Note: ObConf cannot be used to configure keyboard shortcuts and some other advanced features. For these modifications, you must edit Template:Filename manually (see above). Other option is ObKey application (available in AUR).

Application configuration

Openbox features per-application settings, allowing you to define rules for your programs. For example, you can:

  • load your web browser on a certain desktop
  • load your terminal without a window border
  • load your torrent client at a certain position on your screen

These are defined in Template:Filename. As you might expect, the instructions are well-documented within the file itself. Full details can also be found here: http://icculus.org/openbox/index.php/Help:Applications

Menus

The default Openbox menu includes a variety of applications to get you started, but you'll probably want to customize this at some point. There are a number of ways to do so:

Manual configuration

Similar to the Template:Filename file, you can edit Template:Filename with your favourite text editor. Although many of the settings are self-explanatory, full documentation is available.

MenuMaker

MenuMaker is a powerful tool that creates XML-based menus for a variety of Window Managers, including Openbox. MenuMaker will search your computer for executable programs and create an XML menu based on the results. It can be configured to exclude Legacy X, GNOME, KDE, or Xfce applications if the user desires.

MenuMaker is available in the community repository:

# pacman -S menumaker

Once installed, you can generate a complete menu by running:

$ mmaker -v OpenBox3

By default, MenuMaker will not overwrite an existing menu.xml. To do so, run it with the -f (force) argument:

$ mmaker -vf OpenBox3

To see a full list of options, run Template:Codeline.

This will give you a pretty thorough menu. Now you can modify the menu.xml by hand, or simply regenerate the list whenever you install new software.

Obmenu

Obmenu is a GUI-based menu editor for Openbox. For those who don't enjoy editing XML source code, this is probably the best option for you.

It is available in the community repository:

# pacman -S obmenu

Once installed, simply run Template:Codeline and add or remove the desired applications.

Obm-xdg

obm-xdg is a command-line tool that comes with Obmenu. It can generate a categorized sub-menu of installed GTK/GNOME applications.

To use obm-xdg, add the following line to Template:Filename:

<menu execute="obm-xdg" id="xdg-menu" label="xdg"/>

Then run Template:Codeline to refresh the Openbox menu. You should now see a sub-menu labeled xdg in your menu.

Note: If you do not have GNOME installed, then you need to install gnome-menus package for obm-xdg to work.

Python based xdg menu script

This script can be found in Fedora's Openbox package. You will only have to put the script somewhere and add a menu entry.

Here is my paste: http://pastebin.com/f2f827625 And here is the head: http://cvs.fedoraproject.org/viewvc/devel/openbox/xdg-menu?view=markup

Download the one you like (maybe you'll prefer the head version of course). You can put the file anywhere, I used ~/Documents/build/xdg-menu (just modify the menu entry later according to YOUR filename/path.)

Then open your menu.xml with your favourite text editor and add the following entry where you want the new menu (of course, you can modify the label however you want):

<menu id="apps-menu" label="xdgmenu" execute="python /home/shiki/Documents/build/xdg-menu"/>

Save the file, and run: Template:Codeline.

Pipe menus

Openbox (and other WMs like WindowMaker and PekWM) allow you to write scripts that dynamically build menus on the fly. Some examples are system monitors, media player controls, and weather forecasts. Many examples can be found on the openbox site.

Xyne has also created a file browser and brisbin33 has one for scanning for / connecting to wireless hot spots (requires netcfg). The relevant forum posts for these utilities are here and here

Startup programs

Openbox features support for running programs at startup. This is provided by the "openbox-session" command.

There are two ways to enable autostart:

  1. If you use startx/xinit to log into your X session, edit Template:Filename and change the line that executes openbox to execute openbox-session instead.
  2. If you log in with GDM/KDM, then select the Openbox session and it will automatically use autostart.

Startup programs are managed in Template:Filename. Full instructions and best practices for how to do this are available at the Openbox website.

Themes and appearance

With the exception of the Openbox Themes topic, the following section is intended for users who have configured Openbox to run as a standalone desktop, without the assistance of GNOME, KDE or Xfce.

Openbox themes

Openbox themes control the appearance of window borders, including the titlebar and titlebar buttons. They also determine the appearance of the application menu and on-screen display (OSD).

Additional themes are available from the standard repositories:

# pacman -S openbox-themes

This package is by no means definitive. You can download more themes at websites such as:

Downloaded themes should be extracted to ~/.themes and can be installed or selected with the ObConf tool.

Creating new themes is fairly easy and again well-documented.

For a GUI theme editor, take a look at ObTheme.

GTK Themes

GTK2/GTK+

GTK+ themes can be managed easily with the lxappearance, gtk-chtheme, or switch2 utilities. To install, run:

# pacman -S lxappearance

and/or

# pacman -S gtk-chtheme

and/or

# pacman -S gtk-theme-switch2

Now you can simply run Template:Codeline, Template:Codeline or Template:Codeline to set the desired theme.

GTK1

For legacy GTK1 themes, install the gtk-theme-switch package:

# pacman -S gtk-theme-switch

Then run Template:Codeline to select a desired theme.

GTK fonts

To manually change the type and size of your fonts, add the following to Template:Filename:

style "user-font"
{
font_name = "[font-name] [size]"
}
widget_class "*" style "user-font"
gtk-font-name = "[font-name] [size]"

where Template:Codeline is the desired font and point size. For example:

style "user-font"
{
font_name = "DejaVu Sans 8"
}
widget_class "*" style "user-font"
gtk-font-name = "DejaVu Sans 8"

Both Template:Codeline and Template:Codeline fields are required for backwards compatibility.

You can also use gtk-chtheme or lxappearance to set GTK font settings. Please refer to the above section.

GTK Icons

First, extract the desired icon theme to /usr/share/icons (system-wide access) or ~/.icons (local user access), then:

Add the following to Template:Filename:

gtk-icon-theme-name = "[name-of-icon-theme]"

where Template:Codeline is the name of the icon theme directory. For example:

gtk-icon-theme-name = "Tango"

Ensure Template:Filename is configured to parse Template:Filename:

# ~/.gtkrc-2.0
# -- THEME AUTO-WRITTEN DO NOT EDIT
include "/usr/share/themes/Rezlooks-Gilouche/gtk-2.0/gtkrc"
include "/home/username/.gtkrc.mine"
# -- THEME AUTO-WRITTEN DO NOT EDIT

You can use lxappearance to choose GTK icon themes. Please refer to the above section.

Mouse cursors

Extract the desired Xcursor theme to either /usr/share/icons (system-wide access) or ~/.icons (local user access). There are also a limited amount of themes available in the community repository that can be installed using pacman.

Add this to Template:Filename:

Xcursor.theme:   [name-of-cursor-theme]

where Template:Codeline is the name of the cursor theme directory. For example:

Xcursor.theme:	Vanilla-DMZ-AA

To change the size:

Xcursor.size: [size]

Desktop icons

Openbox does not provide a means to display icons on the desktop. PcmanFM, ROX, iDesk, or even Nautilus (and the gnome-settings-daemon) can provide this function.

ROX and PCmanFM have the additional advantage of being lightweight file managers.

Desktop wallpaper

Openbox itself does not include a way to change the wallpaper. This can be done easily with programs like Feh or Nitrogen. Other options include ImageMagick, hsetroot and xsetbg.

Recommended programs

There is list of Lightweight Software at Arch's wiki, most of them nicely fits with Openbox.

Login managers

SLiM provides a lightweight and elegant graphical login solution for standalone Openbox configurations. Refer to Arch's SLiM wiki for detailed instructions.

Qingy is ultralight and very configurable graphical login. It support login to both console and X Windows sessions. It uses DirectFB, therefore it does not start X Windows unless you choose X Windows session. See article about Qingy at Arch's wiki.

Composite desktop

Xcompmgr is a lightweight composite manager capable of rendering drop shadows, fading and simple window transparency within Openbox and other window managers.

Cairo Comp Mgr is an alternative.

Panels, trays, and pagers

There are quite a lot of utilities available that provide a panel (taskbar), system tray, and pager to Openbox. The most common are:

Panels

Trays

Pagers

Make your choice and add it to your startup file.

File managers

There are many possibilities, but the most popular lightweight file managers are:

  • Thunar. Thunar supports auto-mount features and other plugins.
# pacman -S thunar

Thunar may be started in daemon mode for tighter desktop integration. For instance, inserting a USB pendrive will invoke a Thunar window to popup, with the drive contents listed in the window.

To start Thunar in daemon mode, edit Template:Filename and add:

thunar --daemon &
  • ROX (ROX provides desktop icons)
# pacman -S rox
  • PCMan (pcmanfm also provides desktop icons)
# pacman -S pcmanfm

For even lighter options, consider Gentoo or emelFM, both of which use the familiar 'Midnight Commander' two pane layout (these two require Gtk 1.2.x).

Of course, you can also use GNOME's Nautilus. Although slower than the above solutions, it has the additional advantage of VFS support (e.g. remote SSH, FTP and Samba connections)

Application launchers

dmenu

Set-up dmenu as described in the dmenu wiki article. Then, add the following entry to the <keyboard> section Template:Filename to enable a shortcut to launch dmenu:

   <keybind key="W-space">
     <action name="Execute">
       <execute>dmenu_run</execute>
     </action>
   </keybind>

Gmrun

gmrun provides an excellent Run dialog box, similar to the Alt+F2 features found in Gnome and KDE:

# pacman -S gmrun

Add the following entry to the <keyboard> section Template:Filename to enable Alt+F2 functionality:

<keybind key="A-F2">
<action name="execute"><execute>gmrun</execute></action>
</keybind>

Bashrun

bashrun provides a different, barebones approach to a run dialog, using a specialized bash session within a small xterm window. It is available in the community repository and can be launched through the Alt+F2 style approach mentioned previously. To make bashrun act more like a traditional run dialog, add the following entry to the <applications> section Template:Filename:

   <application name="bashrun">
     <desktop>all</desktop>
     <decor>no</decor>  # switch to yes if you prefer a bordered window
     <focus>yes</focus>
     <skip_pager>yes</skip_pager>
     <layer>above</layer>
   </application>

Launchy

Launchy is a less minimalistic approach; it is skinnable and offers more functionality such as a calculator, checking the weather, etc. Originally for Windows, similar to Gnome Do.

# pacman -S launchy

It is launched by Ctrl+Space key combination.

LXPanel

LXPanel If LXPanel is used as a taskbar manager, the run utility from the LXPanel menu can be executed with Template:Codeline.

gnome-panel

The gnome-panel run dialog can be executed with

gnome-panel-control --run-dialog

Clipboard managers

You may wish to install a clipboard manager for feature rich copy/paste ability. xfce4-clipman-plugin, parcellite, or glipper-old may be installed via pacman. Add your choice to autostart.sh. From the terminal, Ctrl+Insert as copy and Shift+Insert as paste generally works as well. You may also copy from terminal with Ctrl+Shift+C, and paste with mouse middle click.

RSS-Reader

Tips and tricks

Copy and paste

From the terminal, Ctrl+Insert as copy and Shift+Insert as paste generally works as well. You may also copy from terminal with Ctrl+Shift+C, and paste with mouse middle click.

Transparency

By using the program transset-df, it is virtually the same as transset, (available by: pacman -S transset-df) you can enable transparancy of windows on the fly. For instance by editing the following in Template:Filename you can have your middle mouse scroll enable and disable transparency by scrolling down and up on the scroll button, respectively, while over the title bar (it is in the <mouse> section):

    <context name="Titlebar">
     <mousebind button="Left" action="Press">
       <action name="Focus"/>
       <action name="Raise"/>
     </mousebind>
     <mousebind button="Left" action="Drag">
       <action name="Move"/>
     </mousebind>
     <mousebind button="Left" action="DoubleClick">
       <action name="ToggleMaximizeFull"/>
     </mousebind>
     <mousebind button="Middle" action="Press">
     	<action name="Lower"/> 
       <action name="FocusToBottom"/>
       <action name="Unfocus"/>
     </mousebind>
     <mousebind button="Up" action="Click">
       <action name= "Execute" >
       <execute>transset-df -p .2 --inc  </execute>
       </action>
     </mousebind>
     <mousebind button="Down" action="Click">
       <action name= "Execute" >
       <execute>transset-df -p .2 --dec </execute>
       </action>
     </mousebind>
     <mousebind button="Right" action="Press">
       <action name="Focus"/>
       <action name="Raise"/>
       <action name="ShowMenu">
         <menu>client-menu</menu>
       </action>
     </mousebind>
   </context>

As of now, it only appears to work when no other actions are taken.

Xprop values for applications

If you use per-application settings frequently, you might find this bash alias handy:

alias xp='xprop | grep "WM_WINDOW_ROLE\|WM_CLASS" && echo "WM_CLASS(STRING) = \"NAME\", \"CLASS\""'

To use, run Template:Codeline and click on the running program that you'd like to define with per-app settings. The result will display only the info that Openbox requires, namely the WM_WINDOW_ROLE and WM_CLASS (name and class) values:

[thayer@dublin:~] $ xp
WM_WINDOW_ROLE(STRING) = "roster"
WM_CLASS(STRING) = "gajim.py", "Gajim.py"
WM_CLASS(STRING) = "NAME", "CLASS"

Xprop for Firefox

For whatever reason, Firefox and its open source equivalents will ignore application rules (e.g. <desktop>) unless Template:Codeline is used, regardless of what xprop reports as the actual WM_CLASS values.

Linking the menu to a command

Some people would want to link the Openbox main menu, or any other, to a command. This is useful for creating a menu button in a panel, for example. Although Openbox doesn't support this, a very simple script, xdotool, can simulate a keypress by running a command. Xdotool is available on AUR. To use it, simply add the following code to the <keyboard> section of your Template:Filename:

    <keybind key="A-C-q">
      <action name="ShowMenu">
        <menu>root-menu</menu>
      </action>
    </keybind>

Restart/reconfigure Openbox. You can now magically summon your menu at your cursor position by running the following command:

# xdotool key ctrl+alt+q

Of course, you can change the shortcut to your liking.

Urxvt in the background

With Openbox, running a terminal as desktop background is easy. You won't need devilspie here.

First you must enable transparency, open your Template:Filename file (if it doesn't exist yet, create it in your home folder).

URxvt*transparent:true
URxvt*scrollBar:false
URxvt*geometry:124x24    #I don't use the whole screen, if you want a full screen term don't bother with this and see below.
URxvt*borderLess:true
URxvt*foreground:Black   #Font color. My wallpaper is White, you may wish to change this to White.

Then edit your Template:Filename file:

<application name="urxvt">
  <decor>no</decor>
  <focus>yes</focus>
  <position>
    <x>center</x>
    <y>20</y>
  </position>
  <layer>below</layer>
  <desktop>all</desktop>
  <maximized>true</maximized> #Only if you want a full size terminal.
</application>

The magic comes from the Template:Codeline line, which place the application under all others. Here Urxvt is displayed on all desktops, change it to your convenience.

Resources