Tutorial -How to edit Openbox window manager menus

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

Tutorial -How to edit Openbox window manager menus

#1 Post by don570 »

I found by trial and error how to translate an Openbox popup launch menu.
The official website has some info but this tutorial gives the basic
info along with some pictures.


I am trying to change the launch menus that Openbox provides
(with a right click on the desktop). I want them to show labels in
foreign languages such as Spanish,French and German.
This is important when making a foreign language menu system for
Lucid Puppy 5.2 which uses the Openbox window manager by default.

There are two liabilities.

1) When a new application is installed on your Puppy
then you will be forced to hand-edit the menu XML file
to add this new application. This isn't hard to do as I will show
at the end of tutorial but it is irritating.

2) The start menu (the tray button at bottom left of screen) remains the original.
That means that this is not the menu system that is being changed.
It is the desktop popup launch menu that is changed.


Instructions:

Open the openbox preference file

Code: Select all

geany  /root/.config/openbox/rc.xml
and change 'menu.xml' to 'menu2.xml'.
Save the file.

Image

Now open the folder /root/.config/openbox/
and make a copy of the file 'menu.xml'
You rename it to 'menu2.xml'.

The terminal commands to do this are

Code: Select all

cd /root/.config/openbox/
cp -T menu.xml menu2.xml
...but I like to use Rox-Filer to do file management.

You can now edit the labels inside the menu2.xml file safely.
For example try changing the word 'Desktop' to the
Spanish word 'Escritorio' using a text editor.

Image

Warning!! It is the Label that you must change not the ID.

A simple refresh of the Openbox menu is all that is needed to see the result.

Image
Image

If you install a new program (for example 'ptiming'),
you must manually add this detail to the 'menu2.xml' file at the appropriate place.
The execute instruction ('ptiming' in the example) is important!!

Code: Select all

<item label="pTiming event timer system">
<action name="Execute"><execute>ptiming</execute></action>
</item>
The result is the application 'pTiming' now appears
on the popup menu ( after a refresh) . (see image)

Image


Here's a page with tips for Openbox
http://ubuntuforums.org/archive/index.php/t-852420.html
______________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

tips for using openbox

#2 Post by don570 »

Alt-Tab switches the front application

Window key - F1 Go to Desktop 1

Window key - F2 Go to Desktop 2

Window key - d Toggles the Desktop

Middle mouse click on the window top to force it to bottom of heap

Middle mouse click on maximize icon (in upper right of window)
to make it grow vertically

Rox Filer has some shortcuts as well, such as
middle mouse click on folder to open it in a new window
(leaving the old window alone)

Double click in some empty space in Rox window to make it
bigger.

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#3 Post by Bert »

Hi Don,

I went through probably the same trial and error :wink: and succeeded in making the Dutch openbox right-click menu persistent :)
Wish I had found your above Tutorial earlier, would have saved a lot of time and frustration...

Do you know how to do the same for the menu (lower left corner of the desktop)?
I can change the entries manually to Dutch, but did not succeed in making my changes persistent.

This is what I tried so far:

- Replacing /root/.config/fbpanel/default
- replacing /root/.config/openbox/menu.xml
- replacing /usr/sbin/pfbpanel
- changing line 169 in xinitrc from

Code: Select all

fbpanel &
to

Code: Select all

fbpanel -p nl-default &
(idea DaveS)
- disable fixmenus executable (idea DaveS)

I am running in circles, possibly because of my limited skills, but all I want is to arrive at a Dutch Lucid Puppy!

Either there's a menu master source I cannot pfind, or an overriding puppy script.

Thanks!
Attachments
right-click-menu-dutch.png
(57.25 KiB) Downloaded 821 times
menu-entries not localized.png
(64.46 KiB) Downloaded 786 times
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

stu90

#4 Post by stu90 »

Hi Bert,
If you have your right click menu localized you could set that as the fbpanel menu instead?
http://www.murga-linux.com/puppy/viewto ... 864#542864

User avatar
Bert
Posts: 1103
Joined: Fri 30 Jun 2006, 20:09

#5 Post by Bert »

Hi stu90,

That worked! Thank you very much.

Don's method for the right-click menu works well. I noticed that it doesn't suffice to just copy a ready made - in my case dutch - menu2.xml into .config/openbox. It has to be edited a little and saved again and then it all works like Don describes.

Two things about your trick:

- the menu no longer has icons.
- the menu-icon itself is a smaller version than the original. See the attachment. In that screenshot I set the "show menu"-option back to "true", just for the screenshot. Both menus are usable in that strange situation :lol:

Anyway , your method solves a big problem! (the inability to completely and persistently add localization to the fbpanel menu)

I think I will have a good look at your tint2 How-to. I'm a bit fed up with fbpanel for the moment :wink:

Thanks again,
Bert
Attachments
menu.png
(18.98 KiB) Downloaded 1432 times
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]

Post Reply