Desktop Entry patches and clarifications
Thiago Macieira
thiago at kde.org
Sun Mar 11 11:25:56 PDT 2007
Vincent Untz wrote:
> + "The %F and %U field codes may only be used as an argument on their
> own."
> I'm not sure about the "on their own". Does it mean that
> Exec=ooffice -math %U
> is invalid? (that's how I understand the current text). I have many
> desktop files here with similar exec lines.
I believe the text meant that the following isn't allowed:
Exec=foo --input=%U
What is the desktop to do in that case if it has two files to open, "bar"
and "baz"? Should it run
foo --input=bar --input=baz
or
foo --input="bar baz"?
> + "The executable program can either be specified with its full path or
> with the name of the executable only."
> If I install a file in /usr/bin/subdir/mybinary, then I can't put only
> "subdir/mybinary" in Exec. I believe the intent is to no have ".."
> and ".", but this is a bit more restrictive.
> (I didn't check if calling execlp with "subdir/mybinary" works, if it
> doesn't then we can safely ignore this comment)
I think here the intent is to say: either you write the absolute path, or
it's the file name (without paths) of the executable to be found in
$PATH.
Running a "relative to PATH" directory+file doesn't work.
$ /usr/bin/multiarch-i386-linux/sdl-config
Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version]
[--cflags] [--libs] [--static-libs]
$ multiarch-i386-linux/sdl-config
bash: multiarch-i386-linux/sdl-config: No such file or directory
I get the same with a C program doing:
execlp("multiarch-i386-linux/sdl-config",
"multiarch-i386-linux/sdl-config", NULL);
Anyways, since this is a weird construct, I hope no one would mind if you
made it clear that it isn't allowed.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20070311/d92413b6/attachment.pgp
More information about the xdg
mailing list