Bug #7525

When mate is the primary DE applications with Terminal=true in desktop files don't use mate-terminal

Added by Alexander Pyhalov 12 months ago. Updated 12 months ago.

Status:ResolvedStart date:2016-10-29
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Difficulty:Medium Tags:needs-triage

Description

This is a OI bug for https://github.com/mate-desktop/mate-panel/issues/57
The issue is that glib has the following code:

check = g_find_program_in_path ("gnome-terminal");
  if (check != NULL)
    {
      term_argv[0] = check;
      /* Note that gnome-terminal takes -x and
       * as -e in gnome-terminal is broken we use that. */
      term_argv[1] = g_strdup ("-x");
    }
  else
    {
      if (check == NULL)
        check = g_find_program_in_path ("nxterm");
      if (check == NULL)
        check = g_find_program_in_path ("color-xterm");
      if (check == NULL)
        check = g_find_program_in_path ("rxvt");
      if (check == NULL)
        check = g_find_program_in_path ("xterm");
      if (check == NULL)
        check = g_find_program_in_path ("dtterm");
      if (check == NULL)
        {
          check = g_strdup ("xterm");
          g_warning ("couldn't find a terminal, falling back to xterm");
        }
      term_argv[0] = check;
      term_argv[1] = g_strdup ("-e");
    }

to find terminal emulator. So on mate when application is launched via g_desktop_app_info_launch_uris_as_manager() and similar functions, gnome-terminal or xterm is used when dekstop file states that application should be run in terminal.

History

#1 Updated by Alexander Pyhalov 12 months ago

Debian handles this with x-terminal-emulator https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773915

#2 Updated by Alexander Pyhalov 12 months ago

  • Subject changed from When mate is the primary DE applications with Terminal=true in desktop files doesn't use mate-terminal to When mate is the primary DE applications with Terminal=true in desktop files don't use mate-terminal

#3 Updated by Alexander Pyhalov 12 months ago

  • Status changed from New to Resolved

PR https://github.com/OpenIndiana/oi-userland/pull/2553 addresses this issue in the following way:
- we introduce mediator x-terminal-emulator for link /usr/bin/x-terminal-emulator with possible implementations gnome-terminal, mate-terminal and xterm;
- mate-terminal implementation has the highest priority (if it is installed, by default it wins);
- glib is modified to use link /usr/bin/x-terminal-emulator if it's found for running applications with Terminal=true.

Also available in: Atom