blob: cf66d2d3aee40f4cb103e5788c67d14ab0c27b6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
description "Unity Greeter Session Broadcast Session Component"
author "Ted Gould <ted@canonical.com>"
task
emits application-start
#TODO: Check GSettings Key
start on dbus BUS=system SIGNAL="StartApplication" INTERFACE="com.canonical.Unity.Greeter.Broadcast" OBJPATH="/com/canonical/Unity/Greeter/Broadcast"
pre-start script
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
stop
exit 1
fi
if [ $OWNER != $SENDER ] ; then
stop
exit 1
fi
end script
exec url-dispatcher ${ARG1}
|