XDG Default Applications specification proposal

smcv at collabora.com smcv at collabora.com
Mon Jul 20 11:00:47 UTC 2020


On Thu, 16 Jul 2020 at 22:40:43 -0600, Thayne wrote:
> Perhaps trying to make
> this more general is overcopmlicating it

I suspect it might be.

> and we should just put the
> terminal launching command in a standard place like an
> XDG_TERMINAL_LAUNCHER environment variable

I would prefer not to be doing this via environment variables. Environment
variables propagate between processes (parent to child) in ways that are
not always wanted, and also *don't* propagate between processes at times
that you might want them to propagate (in particular when you launch an
application via D-Bus activation or as a systemd user-service).

> or in a $XDG_CONFIG_HOME/terminal-launcher.sh file.

I would prefer to avoid this, and in any case it doesn't address the need
for a sensible per-desktop default.

I think it might be helpful to take a step back from the implementation
and write down what the requirements are, so that proposed implementations
can be judged against those requirements. Such as:

* Must be user-configurable (overriding desktop and distro defaults)

* Must produce a sensible result without user configuration (installing a
  desktop Linux distribution should have a sensible default)

* Default is desktop-dependent (if the user has not expressed a preference,
  GNOME users expect to see gnome-terminal and KDE users expect konsole)
  - In particular this means things like the Debian /etc/alternatives
    mechanism are unsuitable

* Reading the configuration format should not require linking to specific
  implementation libraries
  - GLib isn't going to want to link to KDE libraries, Qt/KDE isn't going
    to want to link to GNOME libraries, and neither is likely to want to
    become dependent on some desktop-agnostic abstraction layer library
    whose continued maintenance they cannot guarantee

* Different terminals need different arguments to introduce the command
  to execute
  - xterm -e
  - gnome-terminal -x (in old versions)
  - gnome-terminal -- (in new versions)

* Some terminal authors will be unwilling to introduce a D-Bus dependency
  - In particular xterm is unlikely to do this

Many of the requirements are the same as for MIME-type handling, so
many of them can be satisfied by an implementation that mimics MIME-type
handling.

    smcv


More information about the xdg mailing list