Commit 5aa3b7aca6b9e7d9984436102fe8c31927235859

Authored by Silvan Calarco
1 parent e81ae6996c
Exists in master

installer.kmdr: fixes for reboots

Showing 1 changed file with 9 additions and 5 deletions Side-by-side Diff

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