[Solved] Openbox menu, edit out Desktops submenu, how to?

All questions and problems regarding LXDE components including LXSession, LXAppearance, GPicView, Leafpad, LXTerminal, Xarchiver, LXNM to be discussed here.

For PCManFM questions, please ask in the dedicated forum below.
Lew_Rockwell_fan
Posts: 45
Joined: Wed Aug 07, 2013 4:28 am
Location: Trantor

Re: Openbox menu, edit out Desktops submenu, how to?

Post by Lew_Rockwell_fan »

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.
That's just because I have the font set a little to big to show the whole thing in one go. Wherever in the list it runs out of room, it puts in "more". Here is what it looks like with [more] clicked.
i assume the menu package is not installed on your system
I have "menu 2.1.46", described by Synaptic as a Debian thing.
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.
Seems like good reasoning to me. As a matter of fact, I THINK (can't swear) that is one of the things I've tried. But at any rate I did as you suggest with ~/.config/openbox/menu.xml

Code: Select all

	<!-- This requires the presence of the 'menu' package to work -->
		<menu id="/Debian"/>
		<separator/>
		<!--Next line commented out at suggestion of Drooly-->
		<!--<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>
and rebooted, but as you can see from the screenshot, it made no difference. That surprised me. I actually expected it to remove, not the "Desktops" submenu, but the three openbox items - obconf, reconfigure, and restart. Restart, btw means restart openbox, not reboot. But nothing at all changed as far as I can see. I could try again after copying that over the other menu.xmls, or at least the ones I've found. Gotta run now. Thanks for your help.
Attachments
more.png
(98.4 KiB) Not downloaded yet
seppalta
Posts: 449
Joined: Tue Sep 20, 2011 6:09 am
Location: USA
Contact:

Re: Openbox menu, edit out Desktops submenu, how to?

Post by seppalta »

Have you checked /var/lib/openbox for menus?
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Openbox menu, edit out Desktops submenu, how to?

Post by drooly »

hmmm...
to join efforts with seppalta, we should make clear which menu.xml file you're working on, how many you have on your system, where they are, what they contain and lastly in what order and manner openbox reads them. the last might be found in the openbox wiki, the others you have to find out on your machine.
i don't know if you have a search tool installed? catfish would surely do the trick, or if your familiar with 'find', you can use that. i think searching for *menu.xml would be appropriate, and make sure you start searching from / and not from your home folder.
this is the thorough method; of course you can also get lucky with less effort ;-)

once you know where they are, you start disabling them 1 by 1, logging out and in, see if the menu changes.
i would change the suffix to .bak, renaming them to menu0.xml might not be enough.

thinking: saw your screenshot, there's lots of personal entries in your menu, have you edited only ~/.config/openbox/menu.xml or others as well?

oh and just for the heck of it, what does the "Desktops" submenu actually contain?
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Openbox menu, edit out Desktops submenu, how to?

Post by drooly »

i just booted into my lubuntu install - it's crazy. those xml files are all over the place, sometimes openbox, sometimes lubuntu...

anyhow, the rc.xml files also have configuration options for the right-click menu! there's one in ~/.config/openbox called lubuntu-rc.xml, it says

Code: Select all

 <manageDesktops>yes</manageDesktops>
oh, and it also says:

Code: Select all

You can specify more than one menu file in here and they are all loaded,
       just don't make menu ids clash or, well, it'll be kind of pointless
hmm, scratch beard...
then there's more in /etc/xdg/openbox, there, in rc.xml, it tells openbox to load /var/lib/openbox/debian-menu.xml.
but the weirdest thing, the actual ob-right-click menu (after i checked "show wm menus" in desktop preferences) resembles each of these menu.xml files only about 50%??? duh.

[i personally think lubuntu 13 is good out of the box, but not good for Doing Things Yourself. but you can always log into a plain openbox session, you know? i think it's always there as an option in lightdm]
Lew_Rockwell_fan
Posts: 45
Joined: Wed Aug 07, 2013 4:28 am
Location: Trantor

Re: Openbox menu, edit out Desktops submenu, how to?

Post by Lew_Rockwell_fan »

Thanks a lot, guys. I think I've got it. I tried to post several times earlier today and the firefox tab would go blank after I hit [submit] and nothing ever happened. This happened to me yesterday some too. Could be my internet connection getting flaky.

Anyway, about the line "<manageDesktops>yes</manageDesktops>" in some of the rc.xmls. I thought I'd already posted on that but that must be one of the posts that disappeared. I found some of those. Maybe not all. And changed the "yes" to "no". It didn't seem to have effect at the time, but it could be an additive thing where you have to do A and B before C happens so it could have been essential but insufficient.

Anyway, once again, I ran mate-search-tool recursive on / of the Lubuntu system from another partition and found these:

/var/lib/openbox/debian-menu.xml
/etc/xdg/openbox/menu.xml
/usr/share/lubuntu/openbox/menu.xml
/usr/share/lxde/openbox/menu.xml

I ran it again as root because I knew of 2 it didn't find. Same result. Weird. Anyway, those 4 plus the 2 I already knew about:

~/.config/openbox/menu.xml
/root/.config/openbox/menu.xml

make a total of 6 *menu.xml files.

I edited ~/.config/openbox/menu.xml again because I noticed a couple of redundant entries, and copied it over all the others, renaming it debian-menu.xml in the one case. I'm not sure which one did it but the Desktops submenu is gone, leaving only a double separator line. I may live with that or I may find it and kill it or change it to a single line. I'll tinker some more and if I find anything interesting I'll add the info to this thread. I think next I'll try deleting all but the copies in ~/.config/openbox/ and /root/.config/openbox/.

As for the *rc.xmls I haven't done anything more with them yet but for the record here is the list of what I found with mate-search-tool run as root from another partition:

/root/.config/openbox/lubuntu-rc.xml
/etc/xdg/openbox/rc.xml
/usr/share/lubuntu/openbox/nexus-rc.xml
/usr/share/lubuntu/openbox/rc.xml
/usr/share/lxde/openbox/rc.xml

plus 2 more it didn't find in the same directories as the menu.xmls it couldn't find (I wonder why that is):

~/.config/openbox/rc.xml
~/.config/openbox/lubuntu-rc.xml

and a bunch it did find but I think are probably not relevant:

/usr/share/mime/application/x-sv4crc.xml
/usr/share/mime/application/x-arc.xml
/usr/share/mime/text/x-adasrc.xml
/usr/share/mime/text/x-c++src.xml
/usr/share/mime/text/x-csrc.xml
/usr/share/mime/text/x-dsrc.xml
/usr/share/mime/text/x-objcsrc.xml
/usr/share/mime/text/x-svsrc.xml

So my problem is solved. Screenshot of the menu as it now appears is attached. Drooly, I've come to the same conclusion you have about Lubuntu. It's not as screwed up as Ubuntu is but the next project I start from scratch won't begin there.

Thanks a million, lads.
Attachments
after_copying_over_all_menu.xmls_including_debian-menu.xml.png
(74.42 KiB) Not downloaded yet
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Openbox menu, edit out Desktops submenu, how to?

Post by drooly »

great!
Lew_Rockwell_fan wrote:I tried to post several times earlier today and the firefox tab would go blank after I hit [submit] and nothing ever happened. This happened to me yesterday some too. Could be my internet connection getting flaky.
1. i'm having the same problem with lxde forums. it's the forums, not your internet connection.
Lew_Rockwell_fan
Posts: 45
Joined: Wed Aug 07, 2013 4:28 am
Location: Trantor

Re: [Solved] Openbox menu, edit out Desktops submenu, how to

Post by Lew_Rockwell_fan »

I'll try deleting all but the copies in ~/.config/openbox/ and /root/.config/openbox/.
I just got around to doing that. It works fine. I now have 2 independenty editable openbox menus, one for my normal user and one for root. Not really sure how much point there is in having one for root as I can't think of a circumstance that would make me want to log in as root, rather than just su'ing in a terminal, but it can be done if anyone wants to. More importantly probably, this would imply presumably that all user accounts can each have there own independently editable menu and there only needs to be the one copy in their ~/.config/openbox/. It isn't necessary to copy it over the other menu.xml files. They can just be deleted. I'm nor sure what the lubuntu and/or lxde teams had in mind with all the superflous copies. Maybe to have a base menu that everybody will have and allow different addenda that would be integrated into it depending on the user and the DE being used. I get the same menu, coming from the same file, whether I boot in lubuntu, lxde, or plain openbox. It's simple. I like simple.
Locked