Desktop Entry Standard: Path key

Brian J. Tarricone bjt23 at cornell.edu
Thu Jun 26 10:53:45 PDT 2008


David Faure wrote:
> http://bugs.kde.org/show_bug.cgi?id=164068 brings me to posting this mail here.
> 
> As far as I can see there is no support for expanding environment variables in the desktop entry standard?
> This is a problem for the "roaming user" feature: a user should be able to use software that creates
> config files and desktop files, and then move his home somewhere else and the software should keep working.
> Is there a solution for this problem (especially for desktop files) in other environments at the moment?
> 
> In KDE we support Key[$e]=$HOME/Documents  where the $e modifier means "expand env vars".
> This works fine in kconfig files, but for the Path key of desktop files, this is a violation of the desktop
> entry standard; more precisely it doesn't work in other environments.
> 
> Assuming a more complete specification of this [$e] thing (I'd have to ask our KConfig guys),
> is this a solution that would seem acceptable for the Desktop Entry Standard?
> 
> In KDE 3 we would simply use env vars and expand env vars in the Path key, without requiring [$e],
> but that was even more broken and non-interoperable, and we decided to be more strict about
> this stuff in KDE 4, so nowadays [$e] is required for this behavior.

I'd definitely be interested in adding something like this to Xfce's 
menu implementation, among other things.  It seems people (well, non-KDE 
people) around here have been pretty resistant to the Key[x] modifier 
type thing for some reason, though.

Personally I'd be happy with just saying that we should expand all env 
vars always in keys where it makes sense, but obviously there are 
backwards-compat issues with this (even though most people probably 
won't have '$' symbols in their filenames).

	-brian


More information about the xdg mailing list