From 7af68ceb7be0a0d5881f1119dcfdc5cc338ddea6 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Thu, 15 May 2014 16:46:15 +0800 Subject: [PATCH] Use systemctl to shutdown and reboot By default, systemd allows the local user to shutdown and reboot the system, so we can use systemctl to do that without typing the password. Signed-off-by: Gary Ching-Pang Lin --- rc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc.lua b/rc.lua index dc12186..c277fc8 100644 --- a/rc.lua +++ b/rc.lua @@ -129,8 +129,8 @@ end mysystem_menu = { { 'Lock Screen', 'xscreensaver-command -lock', freedesktop.utils.lookup_icon({ icon = 'system-lock-screen' }) }, { 'Logout', awesome.quit, freedesktop.utils.lookup_icon({ icon = 'system-log-out' }) }, - { 'Reboot System', 'xdg-su -c "shutdown -r now"', freedesktop.utils.lookup_icon({ icon = 'reboot-notifier' }) }, - { 'Shutdown System', 'xdg-su -c "shutdown -h now"', freedesktop.utils.lookup_icon({ icon = 'system-shutdown' }) } + { 'Reboot System', 'systemctl reboot', freedesktop.utils.lookup_icon({ icon = 'reboot-notifier' }) }, + { 'Shutdown System', 'systemctl poweroff', freedesktop.utils.lookup_icon({ icon = 'system-shutdown' }) } } myawesome_menu = { -- 1.8.4.5