[New] Desktop Preferred Applications Specification
Brian J. Tarricone
bjt23 at cornell.edu
Mon Jun 8 01:31:31 PDT 2009
On 06/06/2009 10:52 PM, PCMan wrote:
[...]
> Here is the full specification.
> http://wiki.lxde.org/en/Desktop_Preferred_Applications_Specification
Aside from other objections raised, I see a problem with your terminal
handling. You suggest specifying something like this in the .desktop file:
Exec=gnome-terminal -e %f
... except that won't really work. If the user tries to launch the
terminal from, say, the applications menu, it'll fail to load because
the menu implementation will try to execute "gnome-terminal -e".
gnome-terminal may behave ok if you pass -e without any parameters, and
it may not... regardless, poor command-line option parsing isn't a
'feature' you can rely on.
Also the terminal emulator option lacks a method to do something I
imagine might be common -- opening the terminal emulator with $PWD set
to a directory specified on the commandline (of course, you could do
fork(); chdir(); exec(); but that's kinda lame).
Not sure what the best way would be to handle this... maybe through some
custom X- prefixed keys in the desktop file, like
X-Terminal-Run-Command-Exec= and X-Terminal-Open-Directory-Exec=. (Of
course, this would be a perfect job for the 'custom actions' portion of
the desktop entry spec; a pity that was removed and there's no good
replacement; Thunar implements it, and IMO it's pretty useful.)
Otherwise I'm ok with most of this.
One other thing -- why is there a need for a special
application/x-web-browser fake mime type? Why not just use
application/x-xdg-protocol-http and application/x-xdg-protocol-https?
Is there enough value in knowing that an app is a web browser (rather
than just "an app that handles http/https URLs") that would justify a
special case?
-brian
More information about the xdg
mailing list