installer.kmdr: fixes for reboots

This commit is contained in:
Silvan Calarco 2015-01-16 18:38:52 +01:00
parent e81ae6996c
commit 5aa3b7aca6

View File

@ -3657,13 +3657,17 @@ fi
<property name="associations" stdset="0"> <property name="associations" stdset="0">
<stringlist> <stringlist>
<string>if [ "$DESKTOP_SESSION" == "gnome" -o "$DESKTOP_SESSION" == "GNOME" ]; then <string>if [ "$DESKTOP_SESSION" == "gnome" -o "$DESKTOP_SESSION" == "GNOME" ]; then
gnome-session-save --shutdown-dialog dbus-send --session --type=method_call --print-reply --reply-timeout=2000 \
--dest=org.gnome.SessionManager /org/gnome/SessionManager \
org.gnome.SessionManager.RequestReboot
elif [ "$DESKTOP_SESSION" == "lxde" -o "$DESKTOP_SESSION" == "LXDE" ]; then elif [ "$DESKTOP_SESSION" == "lxde" -o "$DESKTOP_SESSION" == "LXDE" ]; then
dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit \ # no better method found
/org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart systemctl reboot
else else
# assume KDE4 as default (or use KDE_FULL_SESSION == true) # assume KDE4 as default (or use KDE_FULL_SESSION == true)
/usr/bin/qdbus org.kde.ksmserver /KSMServer logout 0 1 2 dbus-send --session --type=method_call --print-reply --reply-timeout=2000 \
--dest=org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout \
int32:0 int32:1 int32:2 2&gt;&amp;1 &amp;&amp; return
fi fi
</string> </string>
</stringlist> </stringlist>