Package: libglib2.0-0
Version: 2.42.1-1
Severity: normal
Tags: patch, upstream

Hi,

On MATE desktop, menu entries that have a "Terminal=true" line in their
desktop file are opened in xterm instead of mate-terminal, and even fail
if xterm isn't installed. This rudimentary patch fixes this by adding
support for mate-terminal.wrapper as a substitute for xterm-based
terminals. Natively supporting mate-terminal (since it has the same
syntax than gnome-terminal, namely "-x" instead of "-e") should be
possible but it would require a more complicated patch, and I'm no C
coder, so I prefer doing something simple but unoptimized that works,
instead of trying to optimize something at the risk of writing
buggy/dirty/ugly code.

Additionally, when writing this patch, I found something that looked
weird to me but again, since I'm no C coder, I can't be sure and
preferred not to touch: when checking for terminal programs in the path,
xterm is checked, and if not found, the code falls back to... xterm
(please look a couple of lines before/after the patched ones, and decide
if this needs to be changed and/or forwarded upstream).

Regards,

-- 
Raphaël Halimi
Description: Add support for mate-terminal
Author: Raphaël Halimi <[email protected]>
Bug: https://bugs.launchpad.net/linuxmint/+bug/1238964
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -2493,6 +2493,8 @@
       if (check == NULL)
         check = g_find_program_in_path ("dtterm");
       if (check == NULL)
+        check = g_find_program_in_path ("mate-terminal.wrapper");
+      if (check == NULL)
         {
           check = g_strdup ("xterm");
           g_warning ("couldn't find a terminal, falling back to xterm");

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to