Add apps to the main menu and not to the open with list

Please post all general support questions for LXDE here.
Locked
tanoloco
Posts: 4
Joined: Tue Mar 27, 2012 2:29 pm

Add apps to the main menu and not to the open with list

Post by tanoloco »

Hello,

I successfully added a custom folder called 'scripts' onto my main menu, as shown in the screenshot attached called 'main-menu.jpg'.
This add was made by following my own thread at ubuntuforums.org http://ubuntuforums.org/showthread.php?t=1870415 mainly based on an howto I found online http://www.remastersys.com/forums/index ... pic=1686.0

Basically I created some .desktop files into ~./local/share/applications and then I played around with xml files in a couple of places as explained inside the above links.

My problem now is that I've noticed that when I right click on a text file, for example, my contextual-menu shows an 'open with' list fulled with any .desktop file I created in the above path, as shown in my second attachment called 'contextual-menu.jpg'.

This means that if I add my own application called foo.desktop into ~./local/share/applications and follow the above method, then this foo application is correctly added to my main menu but also wrongly added to my 'open with' list inside my contextual menu.

I searched how to remove entries from the 'open with' list, but apparently you have to remove them form ~./local/share/applications !
as written for example here http://forum.lxde.org/viewtopic.php?f=22&t=1748 in the lxde forum.
But I have to have them in this path to list them on my main menu!

So: is there a way to add a custom foo.desktop application inside ~./local/share/applications without adding it to the 'open with' list of the contextual menu too?
Or otherwise is there a way to remove a foo.desktop application from my 'open with' list without removing it from my customized main menu?


I hope I've been clear enough, I know it's a little bit confusing

Thanks in advance :D
Attachments
main-menu.jpg
(103.13 KiB) Not downloaded yet
contextual-menu.jpg
(104.33 KiB) Not downloaded yet
seppalta
Posts: 449
Joined: Tue Sep 20, 2011 6:09 am
Location: USA
Contact:

Re: Add apps to the main menu and not to the open with list

Post by seppalta »

I guess by contextual-menu you mean the openbox right click menu, or are you generating a different contextual-menu? The file to edit the Openbox menu depends upon the distribution (see http://douwil7.100webspace.net/linux/Tuning.html#3 for some cases). The Main Menu is edited with .desktop files put in primarily /usr/share/applications, /usr/local/share/applications and .local/share/applications. (See http://douwil7.100webspace.net/linux/Tuning.html#11.) Lxmed works great for generating .desktop files provided you have a decent java program installed. These two menus are totally independent when built this way.
tanoloco
Posts: 4
Joined: Tue Mar 27, 2012 2:29 pm

Re: Add apps to the main menu and not to the open with list

Post by tanoloco »

Hello and thanks for you tip!
I'm sorry I haven't mentiones I'm using lubuntu oneiric and yes: as shown by the attached image called contextual-menu.jpg, it's not the openbox right click menu :(
The main reason why I'm storing my desktop files into ~/.local/share/applications is that I want to customize only the current user,
I tried lxmed but it doesn't let you create a custom folder into the main menu as I want and as shown in the attached image called main-menu.jpg ..

I'm in a loop :)
seppalta
Posts: 449
Joined: Tue Sep 20, 2011 6:09 am
Location: USA
Contact:

Re: Add apps to the main menu and not to the open with list

Post by seppalta »

The missing link for me is your contextual-menu directories. Where are the configuration files? The openbox-contextual-menu is configured in 3 directories located at /etc/xdg/openbox, /usr/share/...-lxde/openbox and .config/openbox. These function independent of the Main Menu in so far as I can tell. Can you make your contextual-menu directories similarly independent?
Locked