From: James Bunton Date: Fri, 22 Apr 2022 10:46:21 +0000 (+1000) Subject: bash: pick up DBUS_SESSION_BUS_ADDRESS in case it isn't set automatically X-Git-Url: https://code.delx.au/dotfiles/commitdiff_plain/b7f0bc56cf2f4a3ba96ad7c8b7bf20f9af9bcc77?ds=sidebyside bash: pick up DBUS_SESSION_BUS_ADDRESS in case it isn't set automatically --- diff --git a/.bashrc b/.bashrc index 784fd13..6a5588e 100644 --- a/.bashrc +++ b/.bashrc @@ -30,6 +30,12 @@ if [ -z "$SSH_AUTH_SOCK" ]; then fi fi +# Look for DBUS +if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && [ -S "/run/user/$(id -u)/bus" ]; then + DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus" + export DBUS_SESSION_BUS_ADDRESS +fi + ########################### # Interactive shells only #