VineSeed で Gnome メニューの「シャットダウン...」から再起動やシャットダウンができない

なぜだか分からないんだけど、 1 月ごろから VineSeedGnome メニューの「シャットダウン...」を選択して、再起動やシャットダウンを選択しても全く実行されなくなってしまった。

Gnome のシャットダウンや再起動のアクションは、 GDM で設定されています。

/usr/share/gdm/defaults.conf がデフォルトで、ローカルで変更したい場合は、 Vine Linux だと /etc/X11/gdm/custom.conf および /etc/X11/gdm/ 以下を弄ることで設定できます。

実際に、シャットダウンや再起動は /usr/share/gdm/defaults.conf で以下のように設定されています。

# System command support.
#
# Reboot, Halt and suspend commands, you can add different commands separated
# by a semicolon.  GDM will use the first one it can find.
RebootCommand=/usr/bin/reboot;/sbin/reboot;/sbin/shutdown -r now;/usr/sbin/shutdown -r now
HaltCommand=/usr/bin/poweroff;/sbin/poweroff;/sbin/shutdown -h now;/usr/sbin/shutdown -h now
SuspendCommand=

/usr/bin/reboot や /usr/bin/poweroff はユーザー権限でも実行ができるので、どこが変更されたのか原因究明中です。

仕方ないのでしばらくの間、 zenity で「シャットダウン...」もどきを作ってみました。

#!/bin/sh

isReboot="再起動"
isShutdown="シャットダウン"
isLogout="ログアウト"
itemLIST="$isReboot $isShutdown $isLogout"

isGNOME="GNOME"
isLXDE="LXDE"

Mygnomelogout() {
    echo -n "$CurrentWM: stating logout process ... "
    lxdelogout
    echo "done. "
}

Mygnomelogout() {
    echo -n "$CurrentWM: stating logout process ... "
    gnome-session-save --logout
    echo "done. "
}

Logout(){
    CurrentWM=$(ps x | grep -m1 '[l]xde-settings'>/dev/null && echo $isLXDE)
    [ "$CurrentWM" = "$isLXDE" ] && Mylxdelogout
    CurrentWM=$(ps x | grep -m1 '[g]nome-settings'>/dev/null && echo $isGNOME)
    [ "$CurrentWM" = "$isGNOME" ] && Mygnomelogout
    exit 0
}

CMD=$(zenity --list \
    --title "シャットダウンの選択" \
    --width=240 --height=210 \
    --text "あなたは現在 \"$LOGNAME\" でログインしています。
このシステムを今すぐシャットダウンしますか?" \
    --column "動作" $itemLIST)
REP=$?
[ $REP = 1 ] && exit 1

case "$CMD" in
    "$isLogout")
	Logout;
	;;
    "$isReboot")
	shutdown -r now
	;;
    "$isShutdown")
	shutdown -p now
	;;
esac

[ $REP = 0 ] && shutdown -p now

exit