gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Desktop file generated with wrong path ?


From: Niels Grewe
Subject: Re: Desktop file generated with wrong path ?
Date: Fri, 11 Mar 2011 08:10:51 +0000

Am 10.03.2011 um 23:10 schrieb Philippe Roussel:

> Le jeudi 10 mars 2011 à 16:13 -0500, Gregory Casamento a écrit :
>> This is my fault and it's a bug I need to address.   
>> 
>> 
>> The issue was that the .desktop file was being generated prior to my
>> change completely wrong and was absolutely useless in the first place
>> as it was being generated assuming that the .desktop file would live
>> in the .app directory and would use relative paths.  Unfortunately,
>> this is not how GNOME works.   It appears, oddly, that GNOME requires
>> absolute paths to everything, the icon, the executable, etc... 
> 
> Well, almost none of the desktop files on my ubuntu machine have full
> paths for the executable. It's just the name of the executable and this
> executable has to be in the PATH to be found.
> 
> The icon part very often contains only a single name, without an
> extension, like for example 'inkspace'. I guess when Nautilus reads the
> desktop file it searches /usr/share/icons/$MyTheme$/... for an icon of
> the right size named inkspace.svg.

The way Gnome and KDE handle icon lookup it rather complicated. What you are 
supposed to do is apparently the following (quoting the icon theme 
specification [0]):

> So, you're an application author, and want to install application icons so 
> that they work in the KDE and Gnome menus. Minimally you should install a 
> 48x48 icon in the hicolor theme. This means installing a PNG file in 
> $prefix/share/icons/hicolor/48x48/apps. Optionally you can install icons in 
> different sizes. For example, installing a svg icon in 
> $prefix/share/icons/hicolor/scalable/apps means most desktops will have one 
> icon that works for all sizes. You might even want to install icons with a 
> look that matches other well known themes so your application will fit in 
> with some specific desktop environment.

Please note that "$prefix" is nonesense here because they don't seem to know 
their own specifications [1]. You should use the first writable entry from 
$XDG_DATA_DIRS and find the icons subdirectory there. Also the catch is that 
they specify PNG, SVG and XPM as the only valid icon formats…

Cheers,

Niels

[0] http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
[1] In this case, the basedir spec: 
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html


reply via email to

[Prev in Thread] Current Thread [Next in Thread]