Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ACTION=`zenity --width=90 --height=200 --list --radiolist --text="Select logout action" --title="Logout" --column "Choice" --column "Action" TRUE Shutdown FALSE Reboot FALSE Logout`
- if [ -n "${ACTION}" ];then
- case $ACTION in
- Shutdown)
- zenity --question --text "Are you sure you want to halt?" && sudo /sbin/shutdown -h now
- ## or via ConsoleKit
- # dbus-send --system --dest=org.freedesktop.ConsoleKit.Manager \
- # /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
- ;;
- Reboot)
- zenity --question --text "Are you sure you want to reboot?" && sudo /sbin/reboot
- ## Or via ConsoleKit
- # dbus-send --system --dest=org.freedesktop.ConsoleKit.Manager \
- # /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
- ;;
- Logout)
- killall conky && killall thunderbird && killall flwm
- # Or gnome-screensaver-command -l
- ;;
- esac
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement