[mpris] DesktopEntry shortcomings

mirsal at mirsal.fr mirsal at mirsal.fr
Thu Dec 23 15:38:24 CET 2010


On Wed, Dec 22, 2010 at 6:29 PM, Conor Curran
<conor.curran at canonical.com> wrote:
> Hey all,

Hey Conor, Hey list !

> I was wondering what the reason was for the DesktopEntry property on the
> root interface to be
> "the basename of an installed .desktop file which complies with the Desktop
> entry specification, with the ".desktop extension stripped".

I have read a bit more on the subject and it appears that stripping
the .desktop extension does not really help indeed.
(for example, GIO needs the extension:
http://library.gnome.org/devel/gio/2.26/gio-Desktop-file-based-GAppInfo.html#g-desktop-app-info-new
)

> Why shouldn't it be the full path to the desktop file including the
> extension ?

About the full path, I believe it is not needed as desktop
environments provide desktop entry lookup facilities which make use of
 cascading mechanisms.

Besides, media players are not necessarily aware of the exact
filesystem location of a relevant desktop entry, and I believe it is
much better to let the desktop environment manage that.

It looks like you are right about the extension, though.

> The reason I ask this is that I found while doing my development that the
> assumption that all desktop file paths are in the same directory is
> incorrect. Take for instance Amarok, on Ubuntu its desktop file lives in
> /usr/share/applications/kde4 while all others I have come across live in the
> parent directory.
> Inorder to allow clients work with the sound menu I need access  to their
> desktop file. Not really quite so sure why I need to jump through these
> hoops (placing the extension on the end of a concatenated path and
> attempting to load from two different locations) each time a client pops up.

I think GIO's GDesktopAppInfo stuff can definitely help you there.


Cheers,

-- 
Mirsal


More information about the mpris mailing list