Part 1 of 3: To create a user defined menu.xml
Right click on the LXDE Desktop.
Click Desktop Preferences.
Click the Advanced Tab.
Check the box 'Show menus provided by the window manager when desktop is clicked'.
Click Close.
Right click on the LXDE Desktop.
You should now see the Openbox 'right click menu'.
It is possible to edit this menu once the system has been set up to allow it.
The menu you see originates from /usr/share/lxde/openbox/menu.xml and any editing will be overwritten.
To create a user defined menu.xml
Copy: /usr/share/lxde/openbox/menu.xml
To: ~/.config/openbox/menu.xml
Part 2 of 3: To configure LXDE to obey your edits of menu.xml
Objective: Configure ~/.config/openbox/lxde-rc.xml to point to ~/.config/openbox/menu.xml
Open ~/.config/openbox/lxde-rc.xml in a text editor.
Scroll through the code or use your text editor's 'find' function to locate the following:
<!-- default menu file (or custom one in $HOME/.config/openbox/) -->
Change this: <file>/usr/share/lxde/openbox/menu.xml</file>
To this: <file>/home/user/.config/openbox/menu.xml</file>
Obviously substitute 'user' with your username.
This will direct the system to take notice of your user configurable menu.xml.
Part 3 of 3: To edit the Menu
You can edit menu.xml directly with a text editor, or an easier way is to install the Openbox Menu Editor: obmenu.
For the changes to take effect once the Openbox menu has been edited:
Right click on the LXDE Desktop.
Click 'Reload Config Files'.
Remember 'Reload Config Files' can also be edited out, so be careful.
In the event that you create an unusable menu, you can always delete your user defined menu.xml then repeat the steps above.
ICONS IN THE OPENBOX RIGHT CLICK MENU IN LXDE
Note: If you upgrade to Openbox 3.5.0-2 from Debian SID, it is then possible to have icons in the right click menu.
To do this.
Step 1: Upgrade to Openbox 3.5.0-2. I used Synaptic Package Manager to add the Debian SID repository then 'forced the newer version' of Openbox.
Step 2: Replace all occurances of <menu> with <menu><showIcons>yes</showIcons> in ~/.config/openbox/rc.xml.
Step 3: Add icon locations in ~/.config/openbox/menu.xml as shown in this example menu.xml.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="MENU 1">
<item label="PCMan" icon="/usr/share/icons/Tango/32x32/apps/file-manager.png"><action name="Execute"><command>pcmanfm</command></action></item>
<item label="Geany" icon="/usr/share/icons/hicolor/48x48/apps/geany.png"><action name="Execute"><command>geany</command></action></item>
<item label="Opera" icon="/usr/share/icons/hicolor/48x48/apps/opera-browser.png"><action name="Execute"><command>opera</command></action></item>
<item label="Firefox" icon="/usr/share/icons/hicolor/48x48/apps/iceweasel.png"><action name="Execute"><command>iceweasel</command></action></item>
<item label="Gimp" icon="/usr/share/icons/hicolor/48x48/apps/gimp.png"><action name="Execute"><command>gimp</command></action></item>
<item label="Filezilla" icon="/usr/share/icons/hicolor/48x48/apps/filezilla.png"><action name="Execute"><command>filezilla</command></action></item>
<item label="Xfburn" icon="/usr/share/icons/hicolor/48x48/stock/media/stock_xfburn-burn-cd.png"><action name="Execute"><command>xfburn</command></action></item>
<menu id="root-menu-675733" label=" ">
<item label="Desktop"><action name="Execute"><startupnotify><enabled>yes</enabled></startupnotify><command>pcmanfm --desktop-pref</command></action></item>
<item label="Themes"><action name="Execute"><startupnotify><enabled>yes</enabled></startupnotify><command>obconf</command></action></item>
<item label="Obmenu"><action name="Execute"><execute>obmenu</execute></action></item>
<item label="Reload"><action name="Reconfigure"/></item>
<item label="Exit"><action name="Execute"><command>lxde-logout</command></action></item>
</menu>
</menu>
</openbox_menu>
Kevin Dixon
Fri Jan 20, 2012: Post edited to improve readability = added 'CODE: SELECT ALL' text box.