SHA256
1
0
forked from pool/xdg-utils
xdg-utils/xdg-terminal-fix-terminal--x-arg.patch

58 lines
1.5 KiB
Diff

From: sor.alexei@meowr.ru
Subject: Fixes -x argument, which is the default for {gnome,mate}-terminal
References: fdo#93231
---
--- a/scripts/xdg-terminal.in
+++ b/scripts/xdg-terminal.in
@@ -65,11 +65,17 @@ terminal_gnome()
if [ x"$1" = x"" ]; then
$terminal_exec
else
- if [ x"$term_exec_arg" = x"" ]; then
- $terminal_exec "$1"
- else
- $terminal_exec "$term_exec_arg" "$1"
- fi
+ case "$term_exec_arg" in
+ "")
+ "$terminal_exec" "$1"
+ ;;
+ *-x*)
+ "$terminal_exec" "$term_exec_arg" sh -c "$1"
+ ;;
+ *)
+ "$terminal_exec" "$term_exec_arg" "$1"
+ ;;
+ esac
fi
if [ $? -eq 0 ]; then
@@ -93,13 +99,19 @@ terminal_gsettings()
if [ -x "$terminal_exec" ]; then
if [ x"$1" = x"" ]; then
- $terminal_exec
+ "$terminal_exec"
else
- if [ x"$term_exec_arg" = x"" ]; then
- $terminal_exec "$1"
- else
- $terminal_exec "$term_exec_arg" "$1"
- fi
+ case "$term_exec_arg" in
+ "")
+ "$terminal_exec" "$1"
+ ;;
+ *-x*)
+ "$terminal_exec" "$term_exec_arg" sh -c "$1"
+ ;;
+ *)
+ "$terminal_exec" "$term_exec_arg" "$1"
+ ;;
+ esac
fi
if [ $? -eq 0 ]; then