Page 1 of 1

Add categories to the LXDE main menu

Posted: Thu Feb 09, 2012 3:06 pm
by chris92
Hello everybody ! (sorry for my bad English I speak French)

I've a little question about the LXDE main menu.

I'd like to know if it's possible to add a category to the "classical" ones (tools, education...)

If it's possible, what should I do to add one ?

Thanks

Chris

Re: Add categories to the LXDE main menu

Posted: Thu Feb 09, 2012 3:18 pm
by Rex Bouwense
Did a quick search and this popped up. I have never used it but I went to the web site and it apparently works.

http://ubuntuforums.org/showthread.php?t=896355

Welcome to the forums.

Re: Add categories to the LXDE main menu

Posted: Fri Feb 10, 2012 7:02 am
by chris92
I tried LXMED. This is a cool tool but I cannot add a category with that :/

Re: Add categories to the LXDE main menu

Posted: Sat Feb 11, 2012 8:18 am
by seppalta
The Applications Categories Menu is at

Code: Select all

/etc/xdg/menus/lxde-applications.menu
.

Re: Add categories to the LXDE main menu

Posted: Sat Feb 11, 2012 3:09 pm
by Rex Bouwense
So that's where it is. I was trying to use the LXTerminal and it kept on telling me that there was no such file. I guess my fat fingers were not hitting the correct keys in the proper order.

Re: Add categories to the LXDE main menu

Posted: Tue Feb 14, 2012 8:33 am
by chris92
Hello everybody !

I've some good news . It works !

I had to add my category in the files :

/etc/Xdg/menus/lxde_applications.menu
/etc/xdg/lubuntu/menus/lxde/lxde_applications.menu

and set the layout on the menu by creating the file

usr/share/desktop_directories/lxde-MenuXXX.directory

to add the programs to the category, I have to set the parameters in the .desktop files in /usr/share/applications/xxx.desktop

Thanks for your help

Re: Add categories to the LXDE main menu

Posted: Sat Feb 25, 2012 2:51 pm
by oMe
Thanks for the info, that was very helpful.

What I found out is that you can copy any xxx.desktop file from /usr/share/applications/ to $HOME/.local/share/applications/ and add a user-specific category to the Categories=... line

In this way I have added a 'Favorites' category and assigned several applications to it.

With the help of the following change, the 'Favorites' then show up as the first tab in the lxlauncher:

Code: Select all

diff -C2 /etc/xdg/menus/lxlauncher-applications.menu{,-sav}
*** /etc/xdg/menus/lxlauncher-applications.menu	2012-02-25 14:20:26.768246471 +0100
--- /etc/xdg/menus/lxlauncher-applications.menu-sav	2012-02-20 23:41:43.176743402 +0100
***************
*** 10,14 ****
  	<Layout>
  		<Merge type="menus"/>
- 		<Menuname>Favorites</Menuname>
  		<Menuname>Internet</Menuname>
  		<Menuname>Work</Menuname>
--- 10,13 ----
***************
*** 18,30 ****
  	</Layout>
  	<Menu>
- 		<Name>Favorites</Name>
- 		<Directory>lxde-favorites.directory</Directory>
- 		<Include>
- 			<And>
- 				<Category>Favorites</Category>
- 			</And>
- 		</Include>
- 	</Menu>
- 	<Menu>
  		<Name>Internet</Name>
  		<Directory>lxde-network.directory</Directory>
--- 17,20 ----
Regards, Oswald

Re: Add categories to the LXDE main menu

Posted: Thu Apr 12, 2012 10:25 am
by spiralciric
Hi,
Can you help me understand this? I wanted to learn how lxlauncher's menu work, so at first I edited just the <Menuname> from Play to Playing and down under <Menu><Name> did the same, restarted lxlauncher, but it still says Play. I then tried something else, added under menuname Office name, and did a copy of one whole <menu></menu>, just changed under <name></name> to Office, but it did not appear after save and restart. I am clueless why nothing is happening. F1?

Re: Add categories to the LXDE main menu

Posted: Sat Apr 14, 2012 5:36 pm
by spiralciric
Solution found.