Identifying desktop menu items

Havoc Pennington hp at redhat.com
Thu Apr 24 06:17:27 BST 2003


On Wed, Apr 23, 2003 at 09:08:25PM -0700, John Firebaugh wrote:
> 
> I'm the maintainer of the KDE panel (kicker). I've recently noticed that 
> adding support in KDE for the XDG menu specification has caused a regression 
> in kicker. Specifically, paths to .desktop files (for example, to identify 
> which .desktop file an application launcher button corresponds to) are now 
> being stored in configuration files as absolute paths into the 
> $prefix/share/applications directory. This is undesired, since we want to 
> application launcher button to work even if the prefix changes or a personal 
> copy of the .desktop file is created. My question is, what is the preferred 
> way to store this information? As paths relative to 
> $prefix/share/applications? What are the legacy compatibility implications 
> here? What needs to happen in KDE service type classes to expose this 
> information?
> 

If you want to do launchers as "symlinks", one way would be to do
something like save them as relative filenames and then search for
them in the search path of the .menu file... does that solve the
problem?

I guess another approach would be to add some kind of custom field to
the .desktop files (LauncherID?) but that doesn't make too much sense
to me.

What the GNOME panel does is always create a copy of the desktop file
for launcher buttons (the copy has a random mkstemp-style name).  This
also accomodates user edits to the launcher and avoids breaking the
launcher if an upgrade moves or renames the .desktop file.

It does have a downside obviously, which is that user launchers don't
get any fixes applied to the upstream desktop file.

I'm sure others will have more insight.

Havoc



More information about the kde-core-devel mailing list