You are not logged in.

#1 2013-02-04 10:03:29

dancer69
Banned
Registered: 2011-08-05
Posts: 66

[SOLVED]Problems with gshutdown

I'm using gshutdown to automatic shutdown the machine at a specific time. But on arch doesn't work right, instead of shutdown/reboot machine just quit gnome session and logout the user.
Using custom commands and "systemctl shutdown", "systemctl reboot" the commands work, but need to give password when the time pass, so is useless, because isn't in fact automatic.
Is there any fix, other way, or app, which can simply do this job?

Last edited by dancer69 (2013-02-04 16:44:10)

Offline

#2 2013-02-04 10:35:01

jv2112
Member
Registered: 2011-07-23
Posts: 160

Re: [SOLVED]Problems with gshutdown

You can use systemctl shutdown set up as a root cron job.

Login as root

crontab -e

Then set up as specified time.  The link below is a good reference page for cron.

http://www.adminschoice.com/crontab-quick-reference


Life is pleasant. Death is peaceful. It's the transition that's troublesome. Isaac Asimov - / -

Offline

#3 2013-02-04 16:03:20

dancer69
Banned
Registered: 2011-08-05
Posts: 66

Re: [SOLVED]Problems with gshutdown

I haven't use cron ever, but I don't want the automatic shutdown to be done everyday and the same specified time. I prefere to use gshutdown, because I can simply activated when I want it and specify the the time at this moment. When I said other way I mean with the same or similar flexibility and simplicity.
So, can cron provide those?

EDIT:
I found a way to make it work:

User_Alias SHUTDOWNERS = user1, user2
SHUTDOWNERS ALL = NOPASSWD: /sbin/shutdown

on sudoers and then use:
sudo shutdown -h now(or -r now to reboot).

Last edited by dancer69 (2013-02-04 16:43:37)

Offline

#4 2013-02-05 00:36:59

jv2112
Member
Registered: 2011-07-23
Posts: 160

Re: [SOLVED]Problems with gshutdown

Great !


Life is pleasant. Death is peaceful. It's the transition that's troublesome. Isaac Asimov - / -

Offline

Board footer

Powered by FluxBB