Set DBUS_SESSION_BUS_ADDRESS to disabled when it's not set.

This commit is contained in:
Syahrial Agni Prasetya 2021-05-18 20:07:14 +07:00
parent b7a3af2167
commit 3719a80f5d
No known key found for this signature in database
GPG Key ID: 46F88749C8C79383

View File

@ -34,8 +34,7 @@ storeenv() {
command -v xhost >/dev/null 2>&1 && xhost +local: > /dev/null command -v xhost >/dev/null 2>&1 && xhost +local: > /dev/null
printf "%s\n" "DISPLAY=${DISPLAY}" >> /tmp/archbox_env printf "%s\n" "DISPLAY=${DISPLAY}" >> /tmp/archbox_env
fi fi
[ ! -z $DBUS_SESSION_BUS_ADDRESS ] && eval "$(dbus-launch)" printf "%s\n" "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS:-disabled:}" >> /tmp/archbox_env
printf "%s\n" "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >> /tmp/archbox_env
printf "%s\n" "XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp}" >> /tmp/archbox_env printf "%s\n" "XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp}" >> /tmp/archbox_env
} }