summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2011-08-08 10:51:31 +0200
committerRobert Ancell <robert.ancell@canonical.com>2011-08-08 10:51:31 +0200
commitbd6be0e98f3a80fdb230e19971b05da3c679ff33 (patch)
treed6bd542b8f772cf071d83e6779c75b98a225d889 /src
parentc3c9f703ae14d1ee19e452c0f51fde337b474dfb (diff)
downloadlightdm-git-bd6be0e98f3a80fdb230e19971b05da3c679ff33.tar.gz
Simplify gdmflexiserver using new XDG_SEAT_PATH variable
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gdmflexiserver9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gdmflexiserver b/src/gdmflexiserver
index 3168e177..0e040302 100755
--- a/src/gdmflexiserver
+++ b/src/gdmflexiserver
@@ -9,14 +9,9 @@
#
# See http://www.gnu.org/copyleft/gpl.html for the full text of the license.
-SEAT=$(dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager /org/freedesktop/DisplayManager org.freedesktop.DisplayManager.GetSeatForCookie string:"$XDG_SESSION_COOKIE" 2>/dev/null)
-
-# Pull out seat path
-SEAT=$(echo $SEAT | sed 's/.* object path "\(.*\)"/\1/')
-
-if [ -z "$SEAT" ]; then
+if [ -z "$XDG_SEAT_PATH" ]; then
# something went wrong
exit 1
fi
-dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $SEAT org.freedesktop.DisplayManager.Seat.SwitchToGreeter
+dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter