Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old May 14th, 2005   #1
Stormy Eyes
May the Ubuntu Be With You!
 
Stormy Eyes's Avatar
 
Join Date: Apr 2005
Location: Under the Jolly Roger
Beans: 1,564
Stormy Eyes' Guide to the Openbox Window Manager

Introduction

Metacity, while a fair default, is not the only window manager you can use with GNOME. Openbox is a lightweight, customizable window manager that works either by itself or as a drop-in replacement for Metacity. Its advantages include the ability to switch desktops with the mouse wheel, a built-in, customizable menu that allows stand-alone operation with some GNOME components in order to build a GNOME-like system on low-end gear, and (this is subjective) better looking, cleaner themes that don't depend on resource-intensive pixmaps.

Installation and Basic Usage

If you have the Universe repository, all you have to do to install Openbox is enter a command:

Code:
sudo apt-get install openbox obconf
Once you've installed it, you can replace Metacity with Openbox with a single command entered into GNOME's "Run" prompt, which can be accessed by hitting ALT+F2:

Code:
openbox --replace
Installation and Selection of Themes

Now that you have Openbox running, you'll probably need some themes. I can help you with that, being an Openbox fan. But first, I should tell you how to obtain, install, and select themes.

Once you have downloaded a theme to your home directory, open a terminal and enter the following commands (This example assumes you've downloaded Mistodon to $HOME):

Code:
cd ~/.themes
tar xzvf ~/mistodon.tar.gz
Under GNOME, find "ObConf" in Applications -> Other -> Obconf and select your new theme.

Theme List and Links

The following list names themes I've made available to the public, with screenshots and descriptions. As other users provide links to their themes, I will post them after my list.
  • Mistodon (Screenshot): A clean theme to match the GTK2 theme "Mist".
  • Pandora (Screenshot): Named after a certain overly curious girl from Greek myth, Pandora is brown to match Ubuntu's coloring, and as clean as Mistodon.
  • Martian (Screenshot): Made to match the default "Human" theme for Hoary. I call it Martian because I was reading Heinlein's Stranger in a Strange Land in the john when I realized that Pandora didn't quite match Ubuntu's colors.

Forum member Smoon has his own theme page. It's written in German, but the screenshots provide adequate explanation.

Also, boxwhore.org hosts Openbox themes with screenshots. (No, I didn't pick the name.)

More importantly, the developers/maintainers of Openbox provide documentation at this location. It covers the basic operating principles, though it doesn't offer in-depth coverage on how to theme Openbox. I may provide a section on advanced theming later on.

Since Openbox does not handle setting wallpapers, you have to use external tools. I recommend feh, which is primarily an image viewer but includes "set wallpaper" functionality both in its menu and as a commandline tool.

Fun with Keybindings; or, getting an ALT+Tab that rocks like ninja.

Openbox's default ALT+Tab functionality is a bit limited compared to Metacity, which shows a dialog listing all the open apps on a given workspace similar to Windows. You don't have to settle for Openbox's anemic ALT+Tab. If you're using Openbox, try middle-clicking anywhere on your desktop. You'll see a menu listing each of your workspaces, starting with the first, and each workspace entry will have a submenu displaying the running windows on that workspace, with iconified (minimised) windows in brackets.

It's also possible to bind this menu, which is referred to internally as the "Client List Menu", to any key you like, and then to navigate that menu with your keyboard's arrow keys. Just follow the steps below.

1. Open a terminal and enter the following command:

Code:
gedit ~/.config/openbox/rc.xml
2. Once you've opened up Openbox's config file, scroll down until you see the following text:

Code:
<keybind key="A-Tab">
    <action name="NextWindow"/>
</keybind>
<keybind key="A-S-Tab">
    <action name="PreviousWindow"/>
</keybind>
3. Replace the text shown above with the following text:

Code:
<keybind key="A-Tab">
    <action name="ShowMenu"><menu>client-list-menu</menu></action>
</keybind>
<keybind key="A-S-Tab">
    <action name="ShowMenu"><menu>client-list-menu</menu></action>
</keybind>
4. Save your changes and close the editor.

5. If you're using Openbox as part of GNOME, and Openbox is part of your GNOME session, then typing killall openbox at the terminal should cause GNOME to restart Openbox for you. If GNOME won't play ball, you should be able to click on the Applications menu, select "Run Application", and type "openbox" into the prompt. Or, you could avoid all this by logging out and logging in again. If you're using Openbox on its own, then right-click on the desktop for the main menu, and choose the Reconfigure option. Openbox will reread its config file.

By following the above steps, you've modified the keybindings for ALT+Tab and SHIFT+ALT+Tab to bring up the same client list menu that appears when you middle-click on the desktop. You can navigate it using your arrow keys, and press "Enter" to go to a running app, even if that app is on a different workspace.

More Fun with Keybindings; or, opening apps without reaching for the rodent.

So, are you tired of having to take your hands off the keyboard in order to open a program? I can help you with that too. The principles are the same as when you modified your config, (~/.config/openbox/rc.xml) to give you a sweet ALT+Tab.

Open your config file as explained in "Fun with Keybindings; or, getting an ALT+Tab that rocks like ninja." and do the following:

1. Find the line that reads "<chainQuitKey>C-g</chainQuitKey>". Create a blank line between this keybinding and the next.

2. If you're using GNOME or have gnome-panel running in Openbox, paste the following XML:

Code:
<keybind key="A-F1">
    <action name="execute"><execute>gnome-panel-control --main-menu</execute></action>
</keybind>
<keybind key="A-F2">
    <action name="execute"><execute>gnome-panel-control --run-dialog</execute></action>
</keybind>
The XML shown above uses GNOME's panel to trigger the menu and bring up GNOME's run dialog. It also uses the same keybindings for the menu and run dialog as Metacity, for the purpose of this demonstration. You can change the keybindings to suit your own needs.

If you aren't using GNOME or gnome-panel, but want a "Run Program" dialog, then run sudo apt-get install gmrun from a terminal. Once you've installed gmrun, paste the following XML into the editor at the blank line you created in step 1:

Code:
<keybind key="A-F1">
    <action name="ShowMenu"><menu>root-menu</menu></action>
</keybind>
<keybind key="A-F2">
    <action name="execute"><execute>gmrun</execute></action>
</keybind>
The above code will show you the menu Openbox provides when right-clicking the desktop if it is running as a stand-alone environment. gmrun is an optional package which should be available if you've enabled the Universe repository.

3. Save your changes, close the editor, and restart Openbox.

Even More Fun with Keybindings: Switch to a Specific Desktop

It's possible to configure keybindings in Openbox to allow you to switch to a specific desktop. For the purpose of this demonstration, I'll show you how to use ALT+1 to switch to desktop 1, ALT+2 to switch to desktop 2, etc. Just paste the following code into your ~/.config/openbox/rc.xml file's <keyboard> section, save, and restart Openbox:

Code:
<keybind key="A-1">
    <action name="Desktop"><desktop>1</desktop></action>
</keybind>
<keybind key="A-2">
    <action name="Desktop"><desktop>2</desktop></action>
</keybind>
<keybind key="A-3">
    <action name="Desktop"><desktop>3</desktop></action>
</keybind>
<keybind key="A-4">
    <action name="Desktop"><desktop>4</desktop></action>
</keybind>
__________________
My sole duty is to my own happiness and well-being. I recognize no other.

Last edited by Stormy Eyes; May 21st, 2005 at 12:51 AM.. Reason: Added a keybinding recipe...
Stormy Eyes is offline   Reply With Quote
Old May 14th, 2005   #2
rpgcyco
A Carafe of Ubuntu
 
rpgcyco's Avatar
 
Join Date: Dec 2004
Location: Australia
Beans: 98
Ubuntu 7.04 Feisty Fawn
Re: Openbox Themes

Hey,

When the command openbox --replace is run, is it permanent, or can I logout and then back in again or reboot to go back to Metacity if I wish?

- Rpg Cyco
rpgcyco is offline   Reply With Quote
Old May 14th, 2005   #3
panickedthumb
Cloned
 
panickedthumb's Avatar
 
Join Date: Oct 2004
Location: /home
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to panickedthumb Send a message via AIM to panickedthumb Send a message via MSN to panickedthumb Send a message via Yahoo to panickedthumb Send a message via Skype™ to panickedthumb
Re: Openbox Themes

If you choose to save your session on logout, it will take over on your next login as well. If you DON'T choose to save your session, logging out and back in will bring back metacity
panickedthumb is offline   Reply With Quote
Old May 14th, 2005   #4
Juippisi
Gee! These Aren't Roasted!
 
Join Date: Apr 2005
Location: Lahti, Finland
Beans: 167
Kubuntu 6.10 Edgy
Re: Openbox Themes

Is there a way to get ALT+F<number> to change workspaces? I have readed the Openbox Documentation and edited the rc.xml and others, but it didn't go well. I'm running Openbox by using startx at TTY.

I'd change immediately to Openbox, if I only could get that keybinding to work.

Oh, by the way Stormy Eyes, nice themes. I like especially that Mistodon .

Last edited by Juippisi; May 14th, 2005 at 06:38 AM..
Juippisi is offline   Reply With Quote
Old May 14th, 2005   #5
Stormy Eyes
May the Ubuntu Be With You!
 
Stormy Eyes's Avatar
 
Join Date: Apr 2005
Location: Under the Jolly Roger
Beans: 1,564
Re: Openbox Themes

Quote:
Originally Posted by panickedthumb
If you choose to save your session on logout, it will take over on your next login as well. If you DON'T choose to save your session, logging out and back in will bring back metacity

Also, if you decide you don't like Openbox, you can get Metacity back by clicking on "Run Program" and typing metacity --replace at the prompt.
__________________
My sole duty is to my own happiness and well-being. I recognize no other.
Stormy Eyes is offline   Reply With Quote
Old May 14th, 2005   #6
Stormy Eyes
May the Ubuntu Be With You!
 
Stormy Eyes's Avatar
 
Join Date: Apr 2005
Location: Under the Jolly Roger
Beans: 1,564
Re: Openbox Themes

Quote:
Originally Posted by Juippisi
Is there a way to get ALT+F<number> to change workspaces? I have readed the Openbox Documentation and edited the rc.xml and others, but it didn't go well. I'm running Openbox by using startx at TTY.

I'd change immediately to Openbox, if I only could get that keybinding to work.

Oh, by the way Stormy Eyes, nice themes. I like especially that Mistodon .
Mind posting the keyboard section of your rc.xml? If you do the following in your "Keyboard" section, save the file, and then pick "Reconfigure" from the menu, it should work fine.

<keybind key="A-F1">
<action name="Desktop"><desktop>1</desktop></action>
</keybind>

I'm glad you liked Mistodon. I've added a new theme, "Martian", for those who like Ubuntu's default colors.
__________________
My sole duty is to my own happiness and well-being. I recognize no other.
Stormy Eyes is offline   Reply With Quote
Old May 14th, 2005   #7
Juippisi
Gee! These Aren't Roasted!
 
Join Date: Apr 2005
Location: Lahti, Finland
Beans: 167
Kubuntu 6.10 Edgy
Re: Openbox Themes

Code:
 <keyboard>
  <chainQuitKey>C-g</chainQuitKey>
<keybind key="A-F1">
   <action name="Desktop"><desktop>1</desktop></action>
 </keybind>
  <keybind key="A-F10">
    <action name="MaximizeFull"/>
  </keybind>
  <keybind key="A-F5">
    <action name="UnmaximizeFull"/>
  </keybind>
  <keybind key="A-F12">
    <action name="ToggleShade"/>
  </keybind>
  <keybind key="C-A-Left">
    <action name="DesktopLeft"><wrap>no</wrap></action>
  </keybind>
  <keybind key="C-A-Right">
    <action name="DesktopRight"><wrap>no</wrap></action>
  </keybind>
  <keybind key="C-A-Up">
    <action name="DesktopUp"><wrap>no</wrap></action>
  </keybind>
  <keybind key="C-A-Down">
    <action name="DesktopDown"><wrap>no</wrap></action>
  </keybind>
... and all unnecessary bindings
Pity that it didn't work :\. I have Googled those commands and tried like everything (firstdesktop, GoToDesktop,1 and stuff). I really do like Openbox .

EDIT: I was thinking, that if I use xfce4-panel with openbox, I may not need that feature at all. I must consider, but thanks anyway .

Last edited by Juippisi; May 14th, 2005 at 10:56 AM..
Juippisi is offline   Reply With Quote
Old May 14th, 2005   #8
Stormy Eyes
May the Ubuntu Be With You!
 
Stormy Eyes's Avatar
 
Join Date: Apr 2005
Location: Under the Jolly Roger
Beans: 1,564
Re: Openbox Themes

Quote:
Originally Posted by Juippisi
Pity that it didn't work :\. I have Googled those commands and tried like everything (firstdesktop, GoToDesktop,1 and stuff). I really do like Openbox .
That's unfortunate. I'd recommend filing a bug report.

Quote:
Originally Posted by Juippisi
EDIT: I was thinking, that if I use xfce4-panel with openbox, I may not need that feature at all. I must consider, but thanks anyway .
I've always been able to use CTRL+ALT+Left and CTRL+ALT+Right to switch desktops, along with my mouse wheel. Not that there's anything wrong with using xfce4-panel (hey, you get a clock that way), but have you tried these methods?
__________________
My sole duty is to my own happiness and well-being. I recognize no other.
Stormy Eyes is offline   Reply With Quote
Old May 14th, 2005   #9
Juippisi
Gee! These Aren't Roasted!
 
Join Date: Apr 2005
Location: Lahti, Finland
Beans: 167
Kubuntu 6.10 Edgy
Re: Openbox Themes

Quote:
Originally Posted by Stormy Eyes
I've always been able to use CTRL+ALT+Left and CTRL+ALT+Right to switch desktops, along with my mouse wheel. Not that there's anything wrong with using xfce4-panel (hey, you get a clock that way), but have you tried these methods?
Yes, I don't like that method, it takes too many fingers . Mousescrolling works fine, but my Firefox doesn't leave any space for desktop, so that part is hard.
Well, my temporary solution for this is to use xftaskbar4. With that, I just take cursor on top of taskbar and scroll mouse and it works. Thanks for your bother with my problem, but I think this is ok for me .

And now I'll have to make my own menu for my Openbox and then everything will be just great.
Juippisi is offline   Reply With Quote
Old May 14th, 2005   #10
Stormy Eyes
May the Ubuntu Be With You!
 
Stormy Eyes's Avatar
 
Join Date: Apr 2005
Location: Under the Jolly Roger
Beans: 1,564
Re: Openbox Themes

Quote:
Originally Posted by Juippisi
And now I'll have to make my own menu for my Openbox and then everything will be just great.
Start with the following command.
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/menu.xml
This will give you a copy of the default menu to hack on.
__________________
My sole duty is to my own happiness and well-being. I recognize no other.
Stormy Eyes is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:21 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry