More about "intents": Several improvements to desktop files and caches

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Jan 8 06:11:04 PST 2014


On 08/01/14 14:03, Dominique Michel wrote:
> It is another issue with the terminal emulators, some use -e to launch
> applications, other use -x, and I am not convinced the wrapper glue
> they done in Debian recently around gnome-terminal and
> x-terminal-emulator (Debian terminal), instead of fixing
> this at the application level, will solve all the cases.

What you need here is to define a protocol (or an API, if you prefer
that term): as you point out, just saying "use this executable" is
insufficient, unless all available implementations have some sort of
protocol in common. That protocol can be a D-Bus interface, or a
particular set of command-line options, or whatever, but it must exist.

In Debian, the protocol that was defined for terminal emulators includes
"alternatives for x-terminal-emulator must support a subset of xterm
arguments, including -e". gnome-terminal does not actually implement
that protocol (gnome-terminal -e has the same general purpose but
different semantics), so gnome-terminal cannot be used directly as an
implementation of the x-terminal-emulator protocol. GNOME on Debian uses
gnome-terminal.wrapper, a Perl script which translates command-line
arguments and execs gnome-terminal, as its implementation of that protocol.

GNOME in Debian also needed its defaults to be changed, to not assume
that terminal implementations were command-line-compatible with
gnome-terminal (because x-terminal-emulator isn't).

When associating files with applications, one common protocol is "you
append the files as arguments on the application's command-line, one
argument per file". It's so common that people don't necessarily think
of it as a protocol at all, but you can't have interoperability without
agreeing on a protocol of some sort.

    S



More information about the xdg mailing list