installer: call shutdown using sudo with LXDE; fallback in KDE4 for shutdown with qdbus

This commit is contained in:
Silvan Calarco 2011-10-21 02:40:29 +02:00
parent 7455659778
commit 2d498e88b4
2 changed files with 6 additions and 7 deletions

View File

@ -6,6 +6,6 @@
#
# Cmnd alias specification
Cmnd_Alias INSTALLER = /usr/sbin/gparted, /usr/share/openmamba/installer/installer.sh, /usr/bin/udisks
Cmnd_Alias INSTALLER = /usr/sbin/gparted, /usr/share/openmamba/installer/installer.sh, /usr/bin/udisks, /sbin/shutdown
%sysadmin ALL = NOPASSWD: INSTALLER

View File

@ -3462,14 +3462,13 @@ fi
</property>
<property name="associations" stdset="0">
<stringlist>
<string>if [ "$DESKTOP_SESSION" == "gnome" ]; then
<string>if [ "$DESKTOP_SESSION" == "gnome" -o "$DESKTOP_SESSION" == "GNOME" ]; then
gnome-session-save --shutdown-dialog
elif [ "${DESKTOP_SESSION:0:3}" == "kde" -o "${KDE_FULL_SESSION}" == "true" ]; then
/usr/bin/qdbus org.kde.ksmserver /KSMServer logout 0 1 2
elif [ "${DESKTOP_SESSION:0:3}" == "kde" ]; then
dcop ksmserver ksmserver logout 0 1 1
else
elif [ "$DESKTOP_SESSION" == "lxde" -o "$DESKTOP_SESSION" == "LXDE" ]; then
shutdown now -r
else
# assume KDE4 as default (or use KDE_FULL_SESSION == true)
/usr/bin/qdbus org.kde.ksmserver /KSMServer logout 0 1 2
fi
</string>
</stringlist>