forked from pool/xdg-utils
Jiri Slaby
4002cab31c
OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/xdg-utils?expand=0&rev=57
58 lines
1.5 KiB
Diff
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
|