aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2013-08-30 14:08:04 -0500
committerTed Gould <ted@gould.cx>2013-08-30 14:08:04 -0500
commit6646f8c2a62d8ff7bac22dddb2ccaa4e2b5a2f05 (patch)
tree350328cd4ab7109570090042e4be63e718081b8d
parent2725d59b1c9bb81379014c95b0b64f3a2dae5f04 (diff)
downloadayatana-greeter-session-broadcast-6646f8c2a62d8ff7bac22dddb2ccaa4e2b5a2f05.tar.gz
ayatana-greeter-session-broadcast-6646f8c2a62d8ff7bac22dddb2ccaa4e2b5a2f05.tar.bz2
ayatana-greeter-session-broadcast-6646f8c2a62d8ff7bac22dddb2ccaa4e2b5a2f05.zip
Move the user into the script and handle the lack of PATH
-rw-r--r--data/unity-greeter-session-broadcast-session.conf16
1 files changed, 13 insertions, 3 deletions
diff --git a/data/unity-greeter-session-broadcast-session.conf b/data/unity-greeter-session-broadcast-session.conf
index a5b744c..db2425c 100644
--- a/data/unity-greeter-session-broadcast-session.conf
+++ b/data/unity-greeter-session-broadcast-session.conf
@@ -6,9 +6,20 @@ task
emits application-start
#TODO: Check GSettings Key
-start on dbus-system SIGNAL="StartApplication" INTERFACE="com.canonical.Unity.Greeter.Broadcast" PATH="/com/canonical/Unity/Greeter/Broadcast" ARG0=${USER}
+start on dbus BUS=system SIGNAL="StartApplication" INTERFACE="com.canonical.Unity.Greeter.Broadcast" PATH="/com/canonical/Unity/Greeter/Broadcast"
pre-start script
+ PATH="/bin:/usr/bin:/sbin:/usr/sbin"
+
+ if [ -z $ARG0 ] ; then
+ stop
+ exit 1
+ fi
+ if [ $ARG0 != $USER ] ; then
+ stop
+ exit 1
+ fi
+
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
@@ -21,5 +32,4 @@ pre-start script
fi
end script
-
-exec initctl emit application-start APP_ID=${ARG1}
+exec /sbin/initctl emit application-start APP_ID=${ARG1}