From 8bd99501f54d4e711ba579cc3b5e7e46a9ec29e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 19 Nov 2018 09:07:27 +0100 Subject: [PATCH] Fix GIO unwrapper when called from lxpanelctl --- roles/tools/files/gio_unwrapper.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/roles/tools/files/gio_unwrapper.sh b/roles/tools/files/gio_unwrapper.sh index bfddc49..5629b28 100755 --- a/roles/tools/files/gio_unwrapper.sh +++ b/roles/tools/files/gio_unwrapper.sh @@ -12,7 +12,11 @@ # might reuse gio in turn to open the file, for instance in gnome # environments) -while [ -n "$1" -a "${1:0:1}" != "/" -a ! -f "$1" ]; do - shift -done -xdg-open "$1" +if [ -n "$GIO_LAUNCHED_DESKTOP_FILE" ]; then + while [ -n "$1" -a "${1:0:1}" != "/" -a ! -f "$1" ]; do + shift + done + xdg-open "$1" +else + exec "$@" +fi -- 2.41.0