installer: call shutdown using sudo with LXDE; fallback in KDE4 for shutdown with qdbus
This commit is contained in:
parent
7455659778
commit
2d498e88b4
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user