Search code examples
glibvala

Glib AppInfo.create_from_commandline with NEEDS_TERMINAL only launches xterm or gnome-terminal


Why is this code only launching xterm or gnome terminal ? I don't understand why it is not using user default terminal (x-terminal-emulator) on Debian, or even KDE default terminal.

AppInfo ai = AppInfo.create_from_commandline (
  "ssh %s".printf (this.title),
  "ssh", AppInfoCreateFlags.NEEDS_TERMINAL);
ai.launch (null, null);

Solution

  • Here is the list of what GDesktopAppInfo tries: gio/gdesktopappinfo.c#L2467-L2494

    I believe the problem is that x-terminal-emulator is not standardized. If one were to push that as a freedesktop standard it would likely get implemented.