Hi,

Den 2015-10-20 12:23, Thomas Gläßle skrev:
- xdg-open does not know how to spawn terminals (leading to the
application aborting or even worse: suppressed output)

Only in generic mode. When running under a desktop environment xdg-open calls e.g. gvfs-open, kde-open5, exo-open. In that case it is their responsibility to open a terminal window.

- not sure what desktop environments are doing in their code base, maybe
hardcoding their own terminals

Many use gsettings or config files.

Apparently GNOME removed the UI for choosing terminal so you have to use the gsettings command to change it.

- xdg-terminal (unreleased, part of xdg-utils) currently even looks at
$TERM and uses xterm as hardcoded fallback

Again, only in generic mode.

1 a) invent a new variable e.g. $TERMINAL or similar that works like
$BROWSER, i.e. something of the form TERMINAL=urxvt:gnome-terminal:xterm

Again, the variable would be mostly for generic mode, not DEs.

3). invent a mimetype for terminal applications so available terminals
can be iterated via .desktop files and a default can be requested in the
mimeapps.list file, e.g.:

     [Desktop Entry]
     name=terminator
     GenericName=X Terminal Emulator
     Exec=terminator -x %F
     MimeType=x-terminal-emulator

I was sceptical at first but now I think it might be a good idea, although strictly speaking it is an abuse of MIME types. It is similar to how URIs are handled, with x-scheme-handler/<scheme>.

The Exec field would need to be specified differently though. %F is defined as a list of files, not a command.

Also it needs to be implemented in desktop environments. There's no point in only implementing it in xdg-open/xdg-terminal.

concerning 1 a)

   - [+] nice and simple
   - [-] have to hardcode command line options, e.g. terminator uses "-x"
rather than "-e"

There's nothing stopping you from using commands with arguments. It works in $BROWSER and $MAILER.

--
Pelle
_______________________________________________
xdg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xdg

Reply via email to