[Solved] Openbox menu, edit out Desktops submenu, how to?
-
- Posts: 45
- Joined: Wed Aug 07, 2013 4:28 am
- Location: Trantor
[Solved] Openbox menu, edit out Desktops submenu, how to?
I have enabled the Openbox menu and while I can mostly tweak it by editing the menu.xml I can't figure out where the "Desktops" submenu comes from. That word doesn't appear anywhere in the file, nor is there any section that seems like it has anything to do with that, nor any mysterious section with no obvious function that I can plausibly suspect of controlling that. It seems darned peculiar. Why have a menu.xml file that can control all the other parts of the menu but not that? I can't see why it should be sacred. I don't use multiple desktops and I'm very unlikely to ever want to.
This is with a system that began as Lubuntu 13.04, ringtail, 32 bit with a pae kernel. I've lightened it considerably, removed a lot of stuff, and added very little, mainly gedit and wmctrl, and removed almost everything from autostart. In learning to edit menu.xml, I tried editing several of the menu.xml files throughout the system, most of which appear to be dysfunctional traps set by the Lubuntu team, to drive users crazy. (That by the way, is why obmenu doesn't work, if anyone has wondered - it's editing the wrong menu.xml, or maybe I should say it's editing the right one but Lubuntu uses the wrong one). In the course of that, at some point I deleted a menu.xml file that seemed totally borked and another one seemed to gain control. I'm not sure now which one it was I deleted. But the one I'm editing now, and that works, is ~/.config/openbox/menu.xml. I figured on getting it working the way I want before trying to find the corresponding file for root.
I'd appreciate any thoughts on the subject you may have.
This is with a system that began as Lubuntu 13.04, ringtail, 32 bit with a pae kernel. I've lightened it considerably, removed a lot of stuff, and added very little, mainly gedit and wmctrl, and removed almost everything from autostart. In learning to edit menu.xml, I tried editing several of the menu.xml files throughout the system, most of which appear to be dysfunctional traps set by the Lubuntu team, to drive users crazy. (That by the way, is why obmenu doesn't work, if anyone has wondered - it's editing the wrong menu.xml, or maybe I should say it's editing the right one but Lubuntu uses the wrong one). In the course of that, at some point I deleted a menu.xml file that seemed totally borked and another one seemed to gain control. I'm not sure now which one it was I deleted. But the one I'm editing now, and that works, is ~/.config/openbox/menu.xml. I figured on getting it working the way I want before trying to find the corresponding file for root.
I'd appreciate any thoughts on the subject you may have.
Last edited by Lew_Rockwell_fan on Sat Aug 10, 2013 4:18 am, edited 1 time in total.
-
- Posts: 1093
- Joined: Sat Aug 27, 2011 5:44 pm
- Location: Sierra Vista, Arizona USA
- Contact:
Re: Openbox menu, edit out Desktops submenu, how to?
Welcome to the lxde forum. Does this help?
http://lxlinux.com/#3
http://lxlinux.com/#3
Rex
-
- Posts: 45
- Joined: Wed Aug 07, 2013 4:28 am
- Location: Trantor
Re: Openbox menu, edit out Desktops submenu, how to?
Thank you. Do you mean the part about copying the successfully (sorta) edited menu.xml over 2 other copies in other directories? Good thought, but it didn't work. The Desktops submenu is still there. I read that page a day or two ago and checked it again just now and I don't see anything else there obviously relevant that I haven't done. I double checked by searching the page for the word "Desktops" and checked context everywhere it appears. I think this is either coming from some file I haven't found (maybe one of the helpful (ha, ha) extra renamed copies the Lubuntu devs put in) or maybe even hardcoded in. Does anyone else have an openbox menu that DOESN'T have the Desktops menu? If anyone does I'd appreciate the details of your setup, or if you deliberately removed it, how you did so.
-
- Posts: 45
- Joined: Wed Aug 07, 2013 4:28 am
- Location: Trantor
Re: Openbox menu, edit out Desktops submenu, how to?
Thank you, Seppalta. That page also I read a day or two ago in pursuit of this objective but I will go over it again more carefully, under the beneficient influence of a liter or so of coffee and try to spot something I missed.
I've copied my edited ~/.config/openbox/menu.xml over menu.xml files in:
/etc/xdg/openbox/
&
/usr/share/lxde/openbox/
as both of the two pages suggested.
Additionally I've copied it over menu.xml files in:
/usr/share/lubuntu/openbox/
&
/root/.config/openbox/
And of course, I restarted openbox.
Earlier I saved backups of some of the old versions of menu.xml. Now, just to be absurdly careful, I've moved the renamed backups to another partition. In one of those I found language that could be specifying the Desktops menu. My suspicion is that there is yet another copy of this iniquitous file somewhere I haven't found and my menu is being generated from bits of it and bits of the file I edited. Sounds weird but everything else I can think of sounds weirder.
I've copied my edited ~/.config/openbox/menu.xml over menu.xml files in:
/etc/xdg/openbox/
&
/usr/share/lxde/openbox/
as both of the two pages suggested.
Additionally I've copied it over menu.xml files in:
/usr/share/lubuntu/openbox/
&
/root/.config/openbox/
And of course, I restarted openbox.
Earlier I saved backups of some of the old versions of menu.xml. Now, just to be absurdly careful, I've moved the renamed backups to another partition. In one of those I found language that could be specifying the Desktops menu. My suspicion is that there is yet another copy of this iniquitous file somewhere I haven't found and my menu is being generated from bits of it and bits of the file I edited. Sounds weird but everything else I can think of sounds weirder.
Re: Openbox menu, edit out Desktops submenu, how to?
have you looked at rc.xml?
also, i think the files in ~/.config take precedence so it should be sufficient to edit those.
i don't know about the lubuntu specific stuff, i'm just using openjbox. the name of the file might be slightly different. sth like lubuntu-rc.xml...<menu>
<!-- You can specify more than one menu file in here and they are all loaded,...
also, i think the files in ~/.config take precedence so it should be sufficient to edit those.
Re: Openbox menu, edit out Desktops submenu, how to?
Show us an image of your openbox menu opened on your desktop so that we can see what is bothering you. Also, a copy of at least the first and last 10% of your ~/.config/openbox/menu.xml might be useful.
-
- Posts: 45
- Joined: Wed Aug 07, 2013 4:28 am
- Location: Trantor
Re: Openbox menu, edit out Desktops submenu, how to?
@ Drooly
Thanks for the suggestion. Good thought. For a few minutes I thought I'd found the solution there because there was a line in therethat sounded promising so I changed it to "no" in all the *rc.xml files I could find but when I rebooted it had no effect I could find. I still kind of suspect this may be the answer and I just haven't found them all. I will study the rest of these files some more also. I'm not clear on the multiple menus business yet. My impression is they probably mean what I call submenus, which would obviously be relevant. If not, if in fact they mean entirely different menus, accessed finagle knows how, that would be kind of a cool trick anyway, even if it doesn't address this.
@ Seppalta
Thanks. The pic is attached. The board is quite persnickety about attaching text files so I'll put them in the body here.
The abridged menu.xml, first and last 10%:The whole thing, since you said "at least":
Correct me it I'm wrong - it is my understanding that the website you linked to above is yours and I presume the O.B menu shown in the picture is on your own desktop. If so, you have achieved what I'm after, a menu without that particular submenu. So, if the source of my problem isn't immediately apparent, perhaps you could offer a brief description of your setup with a view toward what differences are more likely to be germane. The system in question is one I've been working on, off and on, for perhaps 2 months, changing something, backing it up with remastersys if I didn't break it, changing someting else, and so on. This is maybe the 50th iteration. So I've put some work into it and I'd rather not abandon it and start over, but I'm beginning to wish I'd started with plain debian.
Thanks for the suggestion. Good thought. For a few minutes I thought I'd found the solution there because there was a line in there
Code: Select all
<manageDesktops>yes</manageDesktops>
<!-- show the manage desktops section in the client-list-(combined-)menu -->
@ Seppalta
Thanks. The pic is attached. The board is quite persnickety about attaching text files so I'll put them in the body here.
The abridged menu.xml, first and last 10%:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/ file:///usr/share/openbox/menu.xsd">
<menu id="root-menu" label="Openbox 3">
<!--======================================-->
<item label="df -h">
<action name="Execute">
<command>lxterminal --geometry=67x26 -e /custom/scripts/df_-h.sh</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="galculator">
<action name="Execute">
<command>galculator</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="logout">
<action name="Execute">
<command>lubuntu-logout</command>
<startupnotify>
=============================================
==============================================
Here was approximately 80% of the file, excised from the middle.
=============================================
============================================
<!--======================================-->
<item label="i synaptic">
<action name="Execute">
<command>lxterminal --geometry=67x26 -e /custom/scripts/install_synaptic.sh</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
</menu>
<!-- more submenus and/or menu items -->
<!-- This requires the presence of the 'menu' package to work -->
<menu id="/Debian"/>
<separator/>
<menu id="client-list-menu"/>
<separator/>
<item label="ObConf">
<action name="Execute">
<execute>obconf</execute>
</action>
</item>
<item label="Reconfigure">
<action name="Reconfigure"/>
</item>
<item label="Restart">
<action name="Restart"/>
</item>
<separator/>
</menu>
</openbox_menu>
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/ file:///usr/share/openbox/menu.xsd">
<menu id="root-menu" label="Openbox 3">
<!--======================================-->
<item label="df -h">
<action name="Execute">
<command>lxterminal --geometry=67x26 -e /custom/scripts/df_-h.sh</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="galculator">
<action name="Execute">
<command>galculator</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="logout">
<action name="Execute">
<command>lubuntu-logout</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="lxappearance">
<action name="Execute">
<command>lxappearance</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="purge_All">
<action name="Execute">
<command>lxterminal -e /custom/scripts/purge_All.sh</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="remastersys-gui">
<action name="Execute">
<command>gksu remastersys-gui</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="wmctrl -r :SELECT: -e 0,2,0,1026,820">
<action name="Execute">
<command>wmctrl -r :SELECT: -e 0,2,0,1026,820</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="wmctrl -r :SELECT: -e 0,2,0,1026,775">
<action name="Execute">
<command>wmctrl -r :SELECT: -e 0,2,0,1026,775</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="synaptic-pkexec">
<action name="Execute">
<command>synaptic-pkexec</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="ubiquity --desktop %k gtk_ui">
<action name="Execute">
<command>ubiquity --desktop %k gtk_ui</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="xrandr -s 1152x864">
<action name="Execute">
<command>xrandr -s 1152x864</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="xrandr -s 1920x1080">
<action name="Execute">
<command>xrandr -s 1920x1080</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="xrandr -s 960x600">
<action name="Execute">
<command>xrandr -s 960x600</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--========================================-->
<item label="edit /etc/rc.local">
<action name="Execute">
<command>gksu gedit /etc/rc.local</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--========================================-->
<!--========================================-->
<item label="firefox">
<action name="Execute">
<command>firefox %u
Exec=firefox -new-window
Exec=firefox -private-window</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--========================================-->
<!--========================================-->
<item label="fslint-gui">
<action name="Execute">
<command>fslint-gui</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--========================================-->
<!--========================================-->
<item label="edit /etc/rc.local">
<action name="Execute">
<command>gksu gedit /etc/rc.local</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--========================================-->
<!--========================================-->
<item label="gedit">
<action name="Execute">
<command>gedit %U
Exec=gedit --new-window
Exec=gedit --new-document</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--========================================-->
<!--========================================-->
<item label="synaptic-pkexec">
<action name="Execute">
<command>synaptic-pkexec</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--========================================-->
<!--=======hopefully, next a submenu=======-->
<menu id="install.menu" label="install">
<!--======================================-->
<item label="i firefox">
<action name="Execute">
<command>lxterminal --geometry=67x26 -e /custom/scripts/install_firefox.sh</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="i fsarchiver">
<action name="Execute">
<command>lxterminal -e /custom/scripts/install_fsarchiver.sh</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="i gedit">
<action name="Execute">
<command>lxterminal --geometry=67x26 -e /custom/scripts/install_gedit.sh</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="i gnome-screenshot">
<action name="Execute">
<command>lxterminal -e /custom/scripts/install_gnome-screenshot.sh</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="i gnome-search-tool">
<action name="Execute">
<command>lxterminal -e /custom/scripts/install_gnome-search-tool.sh</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
<!--======================================-->
<item label="i synaptic">
<action name="Execute">
<command>lxterminal --geometry=67x26 -e /custom/scripts/install_synaptic.sh</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<!--======================================-->
</menu>
<!-- more submenus and/or menu items -->
<!-- This requires the presence of the 'menu' package to work -->
<menu id="/Debian"/>
<separator/>
<menu id="client-list-menu"/>
<separator/>
<item label="ObConf">
<action name="Execute">
<execute>obconf</execute>
</action>
</item>
<item label="Reconfigure">
<action name="Reconfigure"/>
</item>
<item label="Restart">
<action name="Restart"/>
</item>
<separator/>
</menu>
</openbox_menu>
Re: Openbox menu, edit out Desktops submenu, how to?
1. your screenshot's menu says "More..." at the bottom. is it possible to do it so that it does not show that, but some extra items instead? because according to your menu.xml there should be more.
2. i assume the menu package is not installed on your system
3. the desktops thing that you want to get rid of comes straight after your custom entries and the (non-existant) debian menu, so it MUST be the client-list-menu.
here's the last bit of your menu.xml:
2. i assume the menu package is not installed on your system
3. the desktops thing that you want to get rid of comes straight after your custom entries and the (non-existant) debian menu, so it MUST be the client-list-menu.
here's the last bit of your menu.xml:
Code: Select all
<!-- This requires the presence of the 'menu' package to work -->
<menu id="/Debian"/>
<separator/>
<!-- <menu id="client-list-menu"/> TRY COMMENTING OUT THIS LINE -->
<separator/>
<item label="ObConf">
<action name="Execute">
<execute>obconf</execute>
</action>
</item>
<item label="Reconfigure">
<action name="Reconfigure"/>
</item>
<item label="Restart">
<action name="Restart"/>
</item>
<separator/>
</menu>
</openbox_menu>
Re: Openbox menu, edit out Desktops submenu, how to?
Interesting. I don't like Lubuntu and do not have a copy of 13.04 lieing around to check out things directly, so you will have to supply information. Are the menu.xml in /etc/xdg/openbox and /usr/share/lxde/openbox (paths appropriately modified for the Lubuntu distribution) exactly the same as the one you sent?
Yes, menu.xml as in http://lxlinux.com/openbox.html is the one that I use in Crunchbang, Debian and Sparky Linux systems, and I think that I had it in a Lubuntu system once upon a time. Rename your menu.xml, for example, menu0.xml, copy and paste mine to any text file, name it menu.xml and put it in ~/.config/openbox to see if Desktops and More still come up. My guess is they will.
Yes, menu.xml as in http://lxlinux.com/openbox.html is the one that I use in Crunchbang, Debian and Sparky Linux systems, and I think that I had it in a Lubuntu system once upon a time. Rename your menu.xml, for example, menu0.xml, copy and paste mine to any text file, name it menu.xml and put it in ~/.config/openbox to see if Desktops and More still come up. My guess is they will.