Dr. Werner Fink 2017-04-26 07:34:32 +00:00 committed by Git OBS Bridge
parent 7b5d2a72bb
commit d333c5cb4d
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Apr 26 07:33:45 UTC 2017 - werner@suse.de
- Use socket activation to get dbus up before starting emacs
-------------------------------------------------------------------
Tue Apr 25 14:51:25 UTC 2017 - werner@suse.de

View File

@ -95,8 +95,8 @@ if test -n "$dbusdaemon" ; then
DBUS_SESSION_BUS_ADDRESS=${dadd#*=}
export DBUS_SESSION_BUS_ADDRESS
done
if test -z "$DBUS_SESSION_BUS_ADDRESS" -a -S /run/user/${UID}/bus ; then
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${UID}/bus
if test -z "$DBUS_SESSION_BUS_ADDRESS" -a -S "${XDG_RUNTIME_DIR}/bus" ; then
DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
export DBUS_SESSION_BUS_ADDRESS
fi
fi
@ -114,6 +114,12 @@ if test -n "$dbusdaemon" ; then
else
arg0=emacs
fi
elif test -S "${XDG_RUNTIME_DIR}/bus" ; then
dbusupdate=$(type -p dbus-update-activation-environment 2>/dev/null)
dbusstatus=$(systemctl --user is-active dbus.service 2>/dev/null)
if test -n "$dbusupdate" -a "$dbusstatus" != active ; then
$dbusupdate --systemd DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
fi
fi
unset dbuslaunch dbusdaemon
fi