]> git.immae.eu Git - perso/Immae/Config/Ansible.git/commitdiff
Fix GIO unwrapper when called from lxpanelctl
authorIsmaël Bouya <ismael.bouya@fretlink.com>
Mon, 19 Nov 2018 08:07:27 +0000 (09:07 +0100)
committerIsmaël Bouya <ismael.bouya@fretlink.com>
Mon, 19 Nov 2018 08:07:27 +0000 (09:07 +0100)
roles/tools/files/gio_unwrapper.sh

index bfddc49d6fc8e7f14c38ad52e5f0efe6bf87dcb4..5629b28ef3db45195508d5e821b1d6cc1d8f78b8 100755 (executable)
 # 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