summaryrefslogtreecommitdiff
path: root/roles/tools/files
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-18 13:11:53 +0100
committerIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-18 13:20:49 +0100
commit1a48017dde54325c5619f45f925478e7c3143ba8 (patch)
treebeb689a4f5525f653d1ba65657e0a34b0d6264c7 /roles/tools/files
parent0c9e64e112318249a00a33315a127aa70787165c (diff)
downloadAnsible-1a48017dde54325c5619f45f925478e7c3143ba8.tar.gz
Ansible-1a48017dde54325c5619f45f925478e7c3143ba8.tar.zst
Ansible-1a48017dde54325c5619f45f925478e7c3143ba8.zip
Add gio unwrapper
Diffstat (limited to 'roles/tools/files')
-rwxr-xr-xroles/tools/files/gio_unwrapper.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/roles/tools/files/gio_unwrapper.sh b/roles/tools/files/gio_unwrapper.sh
new file mode 100755
index 0000000..bfddc49
--- /dev/null
+++ b/roles/tools/files/gio_unwrapper.sh
@@ -0,0 +1,18 @@
1#!/bin/bash
2
3# gio is the replacement for xdg-open in gnome (and gtk) applications,
4# including for instance Firefox. It makes two problems:
5# First, it searches for terminals in a fixed list (which does not
6# include lxterminal)
7# Second, it will not use the configuration that was set using pcmanfm.
8
9# This unwrapper will be called by gio (in place of gio-launch-desktop)
10# thanks to the GIO_LAUNCH_DESKTOP variable, will try to find the opened
11# file in the arguments, and use xdg-open to open it (beware, xdg-open
12# might reuse gio in turn to open the file, for instance in gnome
13# environments)
14
15while [ -n "$1" -a "${1:0:1}" != "/" -a ! -f "$1" ]; do
16 shift
17done
18xdg-open "$1"