Adding item to Menus

Please post all general support questions for LXDE here.
Locked
stlubuntu
Posts: 2
Joined: Thu Oct 02, 2008 2:38 am

Adding item to Menus

Post by stlubuntu »

I have found that it is difficult
to get programs to appear in the menu at all
following installation. I know that the
respective program's .desktop file
needs to be in the /usr/share/applications
directory, but after doing that, not all
will appear in the menu like they should as there are
many more .desktop files in my /usr/share/applications
directory, but only a fraction actually appear in my
menu.

I am struggling with why this is happening.
Could it be filename length? Improper
categories in the .desktop file?

Any ideas?

If it makes a difference, I am running the Ubuntulite
implementation of LXDE.

http://ubuntulite.tuxfamily.org

Thanks

(I am sure that PCMan would know the answer.)
PCMan
Posts: 85
Joined: Mon Oct 06, 2008 9:52 am

Re: Adding item to Menus

Post by PCMan »

This is a real headache.
We only listed applications belong to registered freedesktop.org categories.
This can lead to some problems. However, correctly implement the whole spec is very difficult and can hurt the performance since the spec has some severe defects. Please refer to the "wonderful" menu spec on http://freedesktop.org/.
Another option is to use gmenu lib provided by gnome, but the performance will be worse, and the latest version using gio will bring gnome dependencies.
So, it's a nightmare. Sooner or later, we need to rewrite this part.

Be sure to add Categories=... to your desktop files, and make sure that it's a legal registered category listed in the spec.
Custom categories are legal, too, but we don't support it yet.

Besides, you have to beware of the OnlyShowIn and NotShowIn keys in the desktop files. Their use can show or hide the applications from specific desktop environments.
firmit
Posts: 32
Joined: Mon Sep 15, 2008 7:08 pm

Re: Adding item to Menus

Post by firmit »

PCMan wrote:Besides, you have to beware of the OnlyShowIn and NotShowIn keys in the desktop files. Their use can show or hide the applications from specific desktop environments.
This is very true!
OnlyShowIn=Gnome
should read
OnlyShowIn=Gnome, LXDE

There is also some kind of refresh problem. Restarting lxpanel seems to do to the trick.
Feel free to post your file, and I'll try to help.

Also, if you don't want to edit your /usr/share/applications/ desktop.files - you could make a copy of them and place them in ~/.local/share/applications. In that way, you always keep the original in its place.

Regards
firmit
a_wonderer
Posts: 1
Joined: Sun Dec 21, 2008 12:53 am

Re: Adding item to Menus

Post by a_wonderer »

This is a major issue for me. I like the speed of LXDE but I must be able to add menu items.
NTP
Locked