Relative paths in .desktop files

Vincent Untz vuntz at gnome.org
Mon Apr 18 01:56:50 PDT 2011


Hi,

Le lundi 11 avril 2011, à 18:06 +0200, Michael Thayer a écrit :
> Thanks for the answer.  Please find a patch against
> desktop-entry-spec-1.1.xml below.  I hope that that, together with my
> initial posting, makes my intentions slightly clearer.  As I said, I
> would also interested in other approaches to achieve the same thing.

[...]

> --- desktop-entry-spec-1.1.xml	2011-04-11 17:50:02.350865289 +0200
> +++ desktop-entry-spec-1.1.xml.new	2011-04-11 17:57:39.126810018 +0200
> @@ -429,7 +429,10 @@
>  	    <entry>
>            Icon to display in file manager, menus, etc.  If the
>            name is an absolute path, the given file will be
> -          used. If the name is not an absolute path, the algorithm described
> +          used. If it starts with "./" it will be treated as a path
> +          relative to the directory containing the desktop file and
> +          the given file will be used. Otherwise, the algorithm
> +          described
>  	  in the <ulink
>  	  url="http://freedesktop.org/wiki/Standards/icon-theme-spec">Icon
>  	  Theme Specification</ulink> will be used to locate the icon.

I must admit I don't really see which use case we're trying to cover
here. Can you give a concrete example of where you'd have a bundled
application like this?

FWIW, I'd consider ./ to be relative to the path defined in the Path
key (which could be ./ to tell that it's the base directory of the
.desktop file). I think we'd also want to explicitly mention that ../ is
not supported.

Cheers,

Vincent

-- 
Les gens heureux ne sont pas pressés.


More information about the xdg mailing list