diff options
-rw-r--r-- | data/unity-greeter-session-broadcast-session.conf | 16 | ||||
-rw-r--r-- | debian/control | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/data/unity-greeter-session-broadcast-session.conf b/data/unity-greeter-session-broadcast-session.conf index 0e92905..a5b744c 100644 --- a/data/unity-greeter-session-broadcast-session.conf +++ b/data/unity-greeter-session-broadcast-session.conf @@ -6,6 +6,20 @@ task emits application-start #TODO: Check GSettings Key -start on dbus-system SIGNAL="StartApplication" INTERFACE="com.canonical.Unity.Greeter.Broadcast" SENDER="com.canonical.Unity.Greeter.Broadcast" PATH="/com/canonical/Unity/Greeter/Broadcast" ARG0=${USER} +start on dbus-system SIGNAL="StartApplication" INTERFACE="com.canonical.Unity.Greeter.Broadcast" PATH="/com/canonical/Unity/Greeter/Broadcast" ARG0=${USER} + +pre-start script + OWNER=`gdbus call --system --dest org.freedesktop.DBus --object-path / --method org.freedesktop.DBus.GetNameOwner com.canonical.Unity.Greeter.Broadcast | cut -d "'" -f 2` + + if [ -z $OWNER ] ; then + stop + exit 1 + fi + if [ $OWNER != $SENDER ] ; then + stop + exit 1 + fi +end script + exec initctl emit application-start APP_ID=${ARG1} diff --git a/debian/control b/debian/control index f24aefd..2fa5f9e 100644 --- a/debian/control +++ b/debian/control @@ -10,6 +10,7 @@ Build-Depends: cmake, intltool, libdbus-1-dev, libdbustest1-dev, + libglib2.0-bin, python3-dbusmock, Standards-Version: 3.9.4 Homepage: http://launchpad.net/unity-greeter-session-broadcast |