Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 16 Apr 2014, 12:08
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Openbox/Fbpanel, How to set it all up.
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 5 [72 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Author Message
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Thu 26 May 2011, 11:08    Post subject:  Openbox/Fbpanel, How to set it all up.  

Important.. see KNOWN ISSUES here: http://www.murga-linux.com/puppy/viewtopic.php?p=533409#533409

Ok, this is what we are aiming for:



Notice transparency of bar backgrounds, window buttons moved to (The correct Smile ) 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:





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.
PupClockset-1.2.pet
Description 
pet

 Download 
Filename  PupClockset-1.2.pet 
Filesize  11.24 KB 
Downloaded  658 Time(s) 
Obconf.pet
Description 
pet

 Download 
Filename  Obconf.pet 
Filesize  53.39 KB 
Downloaded  715 Time(s) 
fbpanel.pet
Description 
pet

 Download 
Filename  fbpanel.pet 
Filesize  279.36 KB 
Downloaded  926 Time(s) 

_________________
Spup Frugal HD and USB
Root forever!

Last edited by DaveS on Sun 12 Jun 2011, 03:11; edited 13 times in total
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Thu 26 May 2011, 11:09    Post subject:  

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:
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:
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.



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 Smile 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/viewtopic.php?p=538478#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 Smile

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:
fbpanel &

To make it load your custom profile, just change this line to:
Code:
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 Smile

_________________
Spup Frugal HD and USB
Root forever!

Last edited by DaveS on Tue 28 Jun 2011, 03:30; edited 12 times in total
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Thu 26 May 2011, 11:09    Post subject:  

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 Smile

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 Smile 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.



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 Smile
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:
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:



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 Smile
launchermenu.pet
Description 
pet

 Download 
Filename  launchermenu.pet 
Filesize  792 Bytes 
Downloaded  618 Time(s) 
launcher.pet
Description 
pet

 Download 
Filename  launcher.pet 
Filesize  34.06 KB 
Downloaded  635 Time(s) 

_________________
Spup Frugal HD and USB
Root forever!

Last edited by DaveS on Mon 30 May 2011, 12:03; edited 10 times in total
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Thu 26 May 2011, 15:15    Post subject:  

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:
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:
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:
0x73

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

This is the syntax Openbox understands:

Code:
  <keybind key="KEY-COMBINATION">
    ...ACTIONS...
  </keybind>


So for our launcher we need
Code:
            <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:
<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:

        <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 Smile

Code:
xcompmgr -c




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/viewtopic.php?p=533409#533409

_________________
Spup Frugal HD and USB
Root forever!

Last edited by DaveS on Sun 12 Jun 2011, 03:13; edited 8 times in total
Back to top
View user's profile Send private message 
lithpr


Joined: 10 Mar 2011
Posts: 186

PostPosted: Fri 27 May 2011, 08:30    Post subject:  

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.
Back to top
View user's profile Send private message 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Fri 27 May 2011, 09:45    Post subject:  

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).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Fri 27 May 2011, 12:12    Post subject:  

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!
Back to top
View user's profile Send private message 
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Mon 30 May 2011, 13:06    Post subject:  

Convert to openbox, you will be using Tint2 next Smile

A nice set of tutorials DaveS Cool
cheers.
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Mon 30 May 2011, 13:09    Post subject:  

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

A nice set of tutorials DaveS Cool
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!
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Tue 31 May 2011, 11:45    Post subject:  

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

A nice set of tutorials DaveS Cool
cheers.


Working on tint2 now Stu... thanks for the .pet Smile

_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Tue 31 May 2011, 13:17    Post subject:  

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

A nice set of tutorials DaveS Cool
cheers.


Working on tint2 now Stu... thanks for the .pet Smile


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/4kngj6gvvjjmpu7/tint2_0.11.pet
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10511
Location: SwedenEurope

PostPosted: Thu 02 Jun 2011, 04:30    Post subject:  

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
Back to top
View user's profile Send private message 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Thu 02 Jun 2011, 04:36    Post subject:  

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!
Back to top
View user's profile Send private message 
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Fri 03 Jun 2011, 09:06    Post subject:  

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.

Back to top
View user's profile Send private message 
SimpleWater

Joined: 19 Apr 2011
Posts: 95

PostPosted: Fri 10 Jun 2011, 21:44    Post subject:  

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
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 5 [72 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1151s ][ Queries: 13 (0.0054s) ][ GZIP on ]