Subject: Re: Desktop files
To: Jeremy C. Reed <firstname.lastname@example.org>
From: Julio M. Merino Vidal <email@example.com>
Date: 01/27/2005 20:11:10
On Thu, 2005-01-27 at 09:10 -0800, Jeremy C. Reed wrote:
> On Thu, 27 Jan 2005, Julio M. Merino Vidal wrote:
> > There is usually no need to preprocess the files with SED, because
> > all the existing ones do not even use hardcoded paths to installed
> > files. For binaries, we might want to use full paths, but then we'd
> > have to go and fix other .desktop files for consistency. For icons
> > it's even unacceptable to use absolute paths to them because they
> > should be themeable.
> I think it may be good to use full paths to the binaries.
> As for other desktop files, maybe they could be patched and use some
> variable to point to the WRKSRC version (instead of defaulting to
My current desktop.mk implementation supports both things. It throws
the file to sed to replace all the variables listed in DESKTOP_SUBST
(which includes only PREFIX for now), so any occurrence of @PREFIX@
in the file gets replaced. (I.e., easy to use full paths.)
WRT defaulting to FILESDIR, the implementation lets you specify a
source path specific to each file, just like the rc.d framework does.
But if you meant automatically fixing .desktop files in distfiles,
that's possible and not difficult to do. All we need is a SUBST_*
construction using '*.desktop */*.desktop' or something like that
as the SUBST_FILES entry to properly replace Exec lines.
However... I'm not sure we want to go this route of using absolute
paths where they are not expected (I see no file in my GNOME
installation that uses absolute paths). See below.
> Full paths could be good when using pkgviews and someone is testing
> multiple versions -- then again maybe the menu entries wouldn't work
> correctly and the user would not easily know which is which. And also I
> don't know, how we would have the share/applications/ be shared between
> pkgviews packages to even take advantage of this.
pkgviews is a problem here, not solved by using full paths. Any program
needing to access the menu entries should look in share/applications
relative to its view, so it doesn't matter if the .desktop files use
absolute paths: the .desktop file could still be pointing to the program
currently linked to the view.
Julio M. Merino Vidal <firstname.lastname@example.org>
The NetBSD Project - http://www.NetBSD.org/