Le 07/06/2013 03:44, Vikas Rawal a écrit :
> I have a debian machine on which I recently shifted to awesome from
> xfce. I have following problems that I am unable to fix, and find that
> documentation on the wiki is not clear.
>
> 1. What is the recommended way to hibernate/suspend the computer?
> Is http://awesome.naquadah.org/wiki/ShutdownDialog the best we can
> get? This solution requires root/sudo privileges. Also, in my case, I
> am unable to restore the session after hibernating.
My solution was inspired by this script, but with a much simpler design:
#!/bin/sh
ACTION=`kdialog --combobox "Select logout action" Suspend Hibernate
Shutdown Reboot`
if [ -n "${ACTION}" ];then
case $ACTION in
Shutdown)
kdesudo halt
;;
Reboot)
kdesudo reboot
;;
Suspend)
kdesudo pm-suspend
;;
Hibernate)
kdesudo pm-hibernate
;;
esac
fi
Try from commandline the "pm-hibernate" to check if it is working
correrctly. I never really tried the dbus/upower methods, as I never
understood the interest compared this simple method...
> 2. How to logout from the session? The above solution does not give an
> option for logging out.
In my case, this script is then simply called by awesome menu:
myawesomemenu = {
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awful.util.getdir("config") ..
"/rc.lua" },
{ "restart", awesome.restart },
{ "quit", awesome.quit },
{ "shutdown" , "/home/alf/bin/shutdown_dialog.sh" }
}
So that I have a choice for logging out at this place. However, If you
want everything in the same window, it would be easy to add a "Logout"
line in the shutdown_dialog, that would call awesome.quit via awesome
client.
Raphaël
--
To unsubscribe, send mail to [email protected].