Skip to content

Commit 57ab848

Browse files
authored
force gtk apps to use portals when available (#44)
1 parent 4a7afe8 commit 57ab848

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

sas.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if [ "$SAS_DEBUG" = 1 ]; then
1212
set -x
1313
fi
1414

15-
VERSION=1.7
15+
VERSION=1.8
1616

1717
ADD_DIR=""
1818
ALLOW_XDG_OPEN=1
@@ -103,6 +103,13 @@ DEFAULT_SYS_DIRS="
103103
/usr/share
104104
"
105105

106+
# make sure apps prefer to use portals
107+
if [ -x /usr/libexec/xdg-desktop-portal ] \
108+
|| command -v xdg-desktop-portal 1>/dev/null; then
109+
export GIO_USE_PORTALS="${GIO_USE_PORTALS:-1}"
110+
export GTK_USE_PORTAL="${GTK_USE_PORTAL:-1}"
111+
fi
112+
106113
_cleanup() {
107114
set +u
108115
if [ "$IS_TRUSTED_ONCE" = 1 ]; then

0 commit comments

Comments
 (0)