Openbox/Fbpanel, How to set it all up.

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

Openbox/Fbpanel, How to set it all up.

#1 Post by DaveS »

Important.. see KNOWN ISSUES here: http://www.murga-linux.com/puppy/viewto ... 409#533409

Ok, this is what we are aiming for:

Image

Notice transparency of bar backgrounds, window buttons moved to (The correct :) ) left side of the windows, elegant theme, and bug free positioning of taskbar at the top of the screen.

There are some very real reasons to try Openbox/fbpanel. The themeing is gorgeous, it is possible to specify dialogue type windows open mid screen, it is possible to specify screen margins to prevent maximised windows covering launchbars, and a host of other small tweaks, all from a GUI. Fbpanel can be used not only to create a configured taskbar, but also launchbars (as on the left of my screen Unity style), or even much like Wbar, with rounded corners, and transparent backgrounds.. The launch icons have a nice animation when clicked too. The menu also has a millisecond or two delay built in, which makes them hugely easier to navigate than JWM.
AND, Firefox 4/5, Seamonkey 2.1/Opera DON'T exhibit the F11 bug.

The launchbars are just text files like in JWM, so cost next to nothing in resources.

Here is an fbpanel configured to look like Wbar. Please bear in mind this is just an fbpanel, a tiny text file:

Image



Installing
This tutorial will cover Spup and Lucid. Other derivatives should also be fine, there is nothing exotic here.
If you are using Lucid, you are in luck as everything you need is installed.
For Spup you will need to install Openbox via the package manager, Obconf, which is the configuration GUI for Openbox, fbpanel, and Pupclockset. They are below.
After installation, you will have three menu entries, all under the Desktop heading: Fbpanel Configuration, Fbpanel refresh, and Open Box Window Manager Config.
Openbox configuration is simple and straightforward from the GUI. Fbpanel is also until you want to do more exotic configuring. The configuration documents for fbpanel are here http://fbpanel.sourceforge.net/docs.html, but they are a bit confusing so I will try to make it simple here. It is no more difficult than JWM once you know how it works, may even be a little simpler.
Attachments
PupClockset-1.2.pet
(11.24 KiB) Downloaded 1636 times
Obconf.pet
(53.39 KiB) Downloaded 1665 times
Last edited by DaveS on Sun 12 Jun 2011, 07:11, edited 13 times in total.
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#2 Post by DaveS »

OK, so you have it installed. How do you run it. In Lucid, dead simple, you select menu>desktop settings>WM switcher, switch between windowmanagers, and you are in.
For others, it is also pretty simple. You exit your current windowmanager by using the key combination ctrl+alt+Backspace, (also known as the 'three finger salute'). This drops you out of your GUI desktop and to the linux prompt. At the prompt, just type this code

Code: Select all

xwin openbox
That should then load the Openbox window manager for you, along with fbpanel. The setting is 'sticky' so will remain between boots.
To reverse the process and go back to JWM:

Code: Select all

ctrl+alt+Backspace xwin JWM
Now you will be in Openbox as a window manager, with fbpanel as a taskbar. In Spup, the taskbar will be at the top of the screen as that is how I like it, and how I built the .pet, but it is only a few clicks to change it via the GUI configuration tool. Have a play around with the two configuration tools and see what you can do.
NoteFor ALL distros: If you cant see the clock because the font colour does not work with your background, change it via the pupclockset utility. Look for the fbpanel tabs.

Image

OK, now we hit a complication for Spup users... no menu icons. Pbpanel should update this on install but it seems buggy, so you must do it by hand. Fbpanel looks for its icons in /var/local/icons, which AIN'T where Puppy puts them, so you must symlink them. Open a rox file manager window to /var/local/icons, and another pointing to /usr/local/lib/X11/mini-icons. In this window, do 'select all' (cntrl + A) and drag and drop all the icons into /var/local/icons, select 'link absolute' from the pop-up, and you are done.
Close out rox and go to menu>Desktop>fbpanel refresh menu and tray. Ta Da... menu icons :) There will be some missing. If you want, you must track them down and symlink them to /var/local/icons also. Some of the missing ones will be in /usr/share/pixmaps, some are harder to find.



While on the subject of icons, fbpanel likes its launcher icons to be in /usr/share/fbpanel/images, so before you start to configure the launchers, copy any icons you might want to use into there in readiness.

Important Edit.... mrd has made available a new configutation GUI that offers 8 launchers, which may well be all you need. Grab it from here
http://www.murga-linux.com/puppy/viewto ... 478#538478

Thanks mrd, great work....

Using the fbpanel configuration GUI, you will see there is only an option to load a total of four launchers. Dont know why, just an arbitrary figure that can be over ridden, but it is probably better to create a whole new launcher panel somewhere else on the screen. This is where we must get our hands dirty :)

It is important to understand that fbpanel uses 'tray' configuration files just like JWM. They are stored in /root/.config/fbpanel. Note, .config is a hidden directory, so you must have rox set to show hidden files to find it.
There is a default configuration, called of course, default. This is the file that the GUI configures, and you CANNOT edit it by hand to give you anything outside of the pre-configured format, like adding an extra launcher, your changes will just be over ridden at boot. Changes made by the GUI are persistant. This file sets the menu, trays, desktops etc.
Now, you CAN make a default profile that you can edit by hand and which will not be overwritten if you especially want to. Maybe six launchers is enough for you, but four is not. This is what you would do:
Copy the default file but give it some other name, say, custom. You can now edit this file by hand (more on this later), but the problem is to make fbpanel load this profile instead of the default file.
Fbpanel is loaded at boot by the hidden file /root/.xinitrc. Right click on this file and select 'open as text'.
The line that loads fbpanel is around line number 154 and just has this snippet of code:

Code: Select all

fbpanel &
To make it load your custom profile, just change this line to:

Code: Select all

fbpanel -p custom &
Restart x, and your custom profile will be in use.
Note you cannot edit this panel via the GUI, you must edit it by hand.

But probably, like me, you will want a panel you can edit quickly via the GUI AND a separate launchbar. No problem, fbpanel allows the use of more than one panel, so we must create a new launcher by hand, and find a way to load it. That comes next :)
Last edited by DaveS on Tue 28 Jun 2011, 07:30, edited 12 times in total.
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#3 Post by DaveS »

Now I know some of you hate launchbars. well, if that is you, go to the bottom of this post for something extra just for you :)

OK, so how to build and run the second panel as a launchbar..... I have given a lot of thought as to how to present this, and come to the conclusion that it would be incomplete to do it without full description of what to edit and how, but I know some folks like to just jump straight in. To make that possible, I have created a .pet with the finished launcher, launch script, and icons that you can just install on your system, and edit as you wish. It includes a few of Puppys major apps like Abiword, Seamonkey, Gnumeric etc, and put it at the bottom of this post.
Just for fun, I gave Rox the Thunar icon :) I set the launcher to load on the left edge of the screen, centre, so as not to interfere with drive icons or the present taskbar.
Once installed, either re-start x from the menu, or go to /root/startup/ and click on load_launchbar.
You cannot edit this via GUI, but must do so using Geany. The file is in /root/.config/fbpanel/launcher. The structure should be immediately clear. Dont forget any icons you use must be in /usr/share/fbpanel/images, and note icons do not have the extension type included, so for spread48.png, you would just use spread48.

Image

Details of the configuration file can be found her: http://fbpanel.sourceforge.net/docs.html#config It looks quite daunting, but is actually pretty simple when you get into it.
Open your launchbar file in geany (/root/.config/fbpanel/launcher) and it should start to become clearer. The top section, called the Global section in the documention, sets where the launcher will load and how it will look. Its just a text file, nothing too complicated.
The section which defines what the launchbar will actually do is called the Plugin section, because each parameter begins with the word 'plugin'
Again, it is pretty simple to follow what is happening. The 'space' plugin specifies how much distance there is between each icon, and can also be used at the start of the plugin section to specify how far from the end of the bar the first icon is placed.
The bar does not autosize as in JWM, so if you add more icons, you must also increase the Width plugin. The number specified here is a percentage of the total edge of the screen where the bar is situated, so '50' would mean half the size of the screen edge total.
The Align parameter (plugin) requires a bit of explanation. In the documentation it states legal values are left, right, center. This parameter relates to the position of the bar along the screen edge, so it looks like there is no way to set a bar placed on one of the vertical screen edges anywhere but CENTER. But this is not true. The left, right parameters still work, they just kina become up or down! Experiment :)
Use the Margin parameter to set how far from your specified corner the bar loads. You might need this if, like me, you have the taskbar at the top of the screen and the launchbar running down from the top left edge. Without the margin parameter, the launchbar would overlap the taskbar.

Loading the Launchbar
So far I have been unable to find any single way to load fbpanel with multiple profiles. What I do is allow the main taskbar to load via the default system in Puppy using .xinitrc, and load the launchbar via a little script located on /root/startup. If you installed the launcher.pet from here, that script will already be present, but if not, you must create it by hand. It is just a simple line of text:

Code: Select all

fbpanel -p launcher &
where 'launcher' is the name of the profile you created. Edit to suit your own system. Dont forget to set the text file as executable, then add it to /root/startup.
If anyone knows a better way, I would be glad to hear.

OK, for those who dont like launchbars and everybody else too, Openbox has another trick. It has a right click menu if you right click on a blank bit of desktop. Now normally, this would give you yet another version of Puppy's main menu, but rather than that redundancy, why not configure it as a quick launcher?
I have done this for you, and this is how it looks:

Image

First, if it exists, back up your original openbox root menu file so you can reverse the process if you want. Back up /root/.config/openbox/menu.xml (if it exists) as the .pet will overwrite this.

After installation, a new menu.xml file will be installed in /root/.config/openbox/menu.xml. The item on the new rightclick menu called menu.xml will take you right to it and load it into geany for you to edit as you want. I have added comments throughout so you can see exactly how to do it.
Just install the launchermenu.pet below and re-start X, and you will have it. Each time you edit something you will have to restart X to make your changes available. Enjoy :)
Attachments
launchermenu.pet
(792 Bytes) Downloaded 1581 times
launcher.pet
(34.06 KiB) Downloaded 1557 times
Last edited by DaveS on Mon 30 May 2011, 16:03, edited 10 times in total.
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#4 Post by DaveS »

KEYBINDINGS
Keybindings can be thought of as macros run by pressing a keyboard key, or combination of keys, such as Alt + F4, the universal combination to close an active window, but they can also be used to run scripts, launch programs, and control such things as speaker volume and screen brightness.
To activate them, you have to do two things, first find the keycode of the key you want to use, then put that code in a place the windowmanager (openbox) can access it.
OK, here is an example. We are going to make the Windows key, which is present on just about every keyboard these days load the default browser. First we have to figure the keycode. Open a terminal and type

Code: Select all

xev
A box will pop up with square in it. Forget this box, what we are interested in is the terminal output running in the background. Hit the 'windows' key. A bunch of text will appear in the terminal screen looking something like this:

Code: Select all

KeyRelease event, serial 36, synthetic NO, window 0x1e00001,
    root 0x7e, subw 0x0, time 29920856, (168,-7), root:(900,313),
    state 0x0, keycode 115 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
The number we are looking for is the keycode, whic in this case reads 'keycode 115'.
OK, so this is our keycode. Next we have to convert that to a hexadecimal number. Now I am sure a five year old could do this in his head, but, as ever, I resort to the web for help. Go Here http://www.statman.info/conversions/hexadecimal.html for hex converter. Using it, you will see the hex number is 73. To tell Openbox this is a hex number, we must put 0x in front of it, so the keycode Openbox understands is

Code: Select all

0x73
Note the leading character is a zero, not an oh.

This is the syntax Openbox understands:

Code: Select all

  <keybind key="KEY-COMBINATION">
    ...ACTIONS...
  </keybind>
So for our launcher we need

Code: Select all

            <keybind key="0x73">
      <action name="Execute">
        <command>defaultbrowser</command>
      </action>
    </keybind>
This snippet of code goes into /root/config/openbox/rc.xml into the section that starts with the keyboard header, <keyboard>
Once done and saved, re-start X and you default browser should load from the Windows key. You can also specify a normal command like string, so say you have a file in /root/ that is called spreadsheet.gnumeric, your command line might read

Code: Select all

<command>gnumeric /root/spreadsheet.gnumeric</command>
This would load Gnumeric with the spreadsheet file open.
You can be really creative with keybindings if you want. More info here: http://openbox.org/wiki/Help:Bindings#Syntax

To save having to re-invent the wheel, here are the keybindings to get the Fn key controls for volume up/down and toggle on and off and default browser key working on most laptops

Code: Select all

        <keybind key="0xb2">
      <action name="Execute">
        <command>defaultbrowser</command>
      </action>
    </keybind>
        <keybind key="0xa0">
      <action name="Execute">
        <command>amixer sset Master toggle</command>
      </action>
    </keybind>
            <keybind key="0xb0">
      <action name="Execute">
        <command>amixer sset Master 1+,1+</command>
      </action>
    </keybind>
            <keybind key="0xae">
      <action name="Execute">
        <command>amixer sset Master 1-,1-</command>
      </action>
    </keybind>
OK, all done now except for
One more thing
Openbox understands compositing, so you can have transparent windows etc. courtesy of xcompmgr, which is standard in pretty much all Puppys. Just load it using this little script in your startup file to get a great drop shadow effect to your windows pretty much for free :)

Code: Select all

xcompmgr -c
Image

Enjoy openbox/fbpanel. It has the potential to give Puppy a bang up to date desktop.......

IMPORTANT.... see KNOWN ISSUES here: http://www.murga-linux.com/puppy/viewto ... 409#533409
Last edited by DaveS on Sun 12 Jun 2011, 07:13, edited 8 times in total.
Spup Frugal HD and USB
Root forever!

User avatar
lithpr
Posts: 86
Joined: Thu 10 Mar 2011, 06:33

#5 Post by lithpr »

Awesome tutorial! I had no idea fbpanel could be used as a launcher like that. Very slick! Can it do the whole "hide panel" thing? Can you use large icons, lets say 32x32 or 48x48? I don't have fbpanel installed on this machine, so i can't check on my own.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#6 Post by Béèm »

Nice work DaveS.

Regarding your issue of prematurely unhide of the tray I subscribed to the fbpanel mailing list. Apparently the only way to ask for help.
This was several days ago, but I haven't got an answer and in fact I don't see much activity in this mailing list.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#7 Post by DaveS »

lithpr wrote:Awesome tutorial! I had no idea fbpanel could be used as a launcher like that. Very slick! Can it do the whole "hide panel" thing? Can you use large icons, lets say 32x32 or 48x48? I don't have fbpanel installed on this machine, so i can't check on my own.
You set the icon size yourself by specifying the bar width, so you can have pretty much anything you want. Yes, autohide is also an option.
Spup Frugal HD and USB
Root forever!

stu90

#8 Post by stu90 »

Convert to openbox, you will be using Tint2 next :)

A nice set of tutorials DaveS 8)
cheers.

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#9 Post by DaveS »

stu90 wrote:Convert to openbox, you will be using Tint2 next :)

A nice set of tutorials DaveS 8)
cheers.
Thanks Stu.. it is a bit wordy though, sadly unavoidable........ Tried to break it up with some graphics, but its a lot to get through.....
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#10 Post by DaveS »

stu90 wrote:Convert to openbox, you will be using Tint2 next :)

A nice set of tutorials DaveS 8)
cheers.
Working on tint2 now Stu... thanks for the .pet :)
Spup Frugal HD and USB
Root forever!

stu90

#11 Post by stu90 »

DaveS wrote:
stu90 wrote:Convert to openbox, you will be using Tint2 next :)

A nice set of tutorials DaveS 8)
cheers.
Working on tint2 now Stu... thanks for the .pet :)
Hi DaveS - i think that might be an older .pet i have tint2-0.11.pet here - it contains a few extras though, so if you want just a tint2 .pet let me know.
gtk-engines (for gtk themes like clearlooks)
scrot (terminal screen shot)
9menu (simple standalone custom menu maker)
tint2
tint2conf
tint2wizard.py (requires python)

http://www.mediafire.com/file/4kngj6gvv ... 2_0.11.pet

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#12 Post by nooby »

Dave that was a good one. Have to set it up some day like that and test how it feels to use it.

The F11 bug that is that?
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#13 Post by DaveS »

nooby wrote:Dave that was a good one. Have to set it up some day like that and test how it feels to use it.

The F11 bug that is that?
F11 bug reported here nooby http://www.murga-linux.com/puppy/viewtopic.php?t=68174
Spup Frugal HD and USB
Root forever!

stu90

#14 Post by stu90 »

Not sure if DaveS has already posted about this?
Fbpanel has another configuration GUI that is not in the Puppy menus - to access it hold down the Ctrl key and Right mouse button click on a clear area of the the Fbpanel.

Image

SimpleWater
Posts: 94
Joined: Tue 19 Apr 2011, 11:53

#15 Post by SimpleWater »

Can i get some help? I seem to be having difficulties. I followed the instructions carefully but my custom profile does not stay put on re-start. So when i re-start X and as a well as fresh boot, my profile is loaded for a brief moment., but then it switches to the default. Executing the script will enable it and make it stay, but why can't i have it on boot? I believe it has the same effect if i put in .xinitrc

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#16 Post by DaveS »

SimpleWater wrote:Can i get some help? I seem to be having difficulties. I followed the instructions carefully but my custom profile does not stay put on re-start. So when i re-start X and as a well as fresh boot, my profile is loaded for a brief moment., but then it switches to the default. Executing the script will enable it and make it stay, but why can't i have it on boot? I believe it has the same effect if i put in .xinitrc
OK, lets get into it. Which Puppy are you running? Which profile do you mean, fbpanel? Are you loading a default profile + a launcher profile, or just a default type profile for a system tray at the top or bottom of your screen?
The fault is being caused by a double load event, we just have to track it down...............
Spup Frugal HD and USB
Root forever!

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#17 Post by 01micko »

Really nice tut DaveS :)

I just installed your fbpanel pet and openbox from Salix in my spup-121.02 and it looks real nice.. need to ditch the lupu start icon tho! :lol:

I made a more generic wmswitcher which will work in most recent pups. Attached. (It handles kde4 too)
Attachments
wmsw.jpg
(34.21 KiB) Downloaded 16733 times
wmswitcher-0.17.pet
(15.66 KiB) Downloaded 1202 times
Puppy Linux Blog - contact me for access

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#18 Post by DaveS »

01micko wrote:Really nice tut DaveS :)

I just installed your fbpanel pet and openbox from Salix in my spup-121.02 and it looks real nice.. need to ditch the lupu start icon tho! :lol:

I made a more generic wmswitcher which will work in most recent pups. Attached. (It handles kde4 too)
Sweet....... Will give it a try.
Spup Frugal HD and USB
Root forever!

SimpleWater
Posts: 94
Joined: Tue 19 Apr 2011, 11:53

#19 Post by SimpleWater »

DaveS wrote: OK, lets get into it. Which Puppy are you running? Which profile do you mean, fbpanel? Are you loading a default profile + a launcher profile, or just a default type profile for a system tray at the top or bottom of your screen?
The fault is being caused by a double load event, we just have to track it down...............
Lucid puppy 5.2.5 on full HD. Fbpanel profile named "launchbar". Default profile + launcher profile. Was i supposed to delete the default profile?

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#20 Post by DaveS »

SimpleWater wrote:
DaveS wrote: OK, lets get into it. Which Puppy are you running? Which profile do you mean, fbpanel? Are you loading a default profile + a launcher profile, or just a default type profile for a system tray at the top or bottom of your screen?
The fault is being caused by a double load event, we just have to track it down...............
Lucid puppy 5.2.5 on full HD. Fbpanel profile named "launchbar". Default profile + launcher profile. Was i supposed to delete the default profile?
OK, here is the problem: for some strange reason, Lucid runs 'fixmenus' at boot. It is running this AFTER your fbpanel is loaded, and basically closing it and re-loading just the default. The simplest way to fix this is to go in to /root/startup, right click on the file called 'run_fixmenus', select 'properties ' from the pop-up menu, and uncheck the three boxes under the exec heading. This will fix it for you :) It is also simple to reverse should you ever want to.
Spup Frugal HD and USB
Root forever!

Post Reply