Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutdown fails to work on Ubuntu 14.04 / 14.10 #349

Open
mdeguzis opened this issue Jan 14, 2015 · 2 comments
Open

Shutdown fails to work on Ubuntu 14.04 / 14.10 #349

mdeguzis opened this issue Jan 14, 2015 · 2 comments

Comments

@mdeguzis
Copy link

The shutdown or restart command fails with:

lvl2:   Added known joystick PLAYSTATION(R)3 Controller (64:D4:BD:BD:24:60) (instance ID: 0, device index: 0)
lvl1:   Shutdown terminated with non-zero result!

I am fine changing the line of code that I am guessing issues sudo shutdown -h now to something that works from the terminal. Is this something you can help me with? Maybe I am missing something, but nothing in the dotfile configs popped out at me right away.

@Aloshi
Copy link
Owner

Aloshi commented Jan 15, 2015

The line you're looking for is on line 43 of es-core/src/platform.cpp. I'm guessing this is a permissions issue. I have no idea what the "proper" way to ask the system to shut down is on Linux as a non-superuser.

@mdeguzis
Copy link
Author

ok I will take a look at that line and see what I can come up with. What I will likely do is add my user to the sbin reboot and shutdown commands (possibly) in the sudoers file. Either that, or come up with some kind of hack.

Something akin to:

user ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown

Not sure if there is a safer way, but only allowing a specific user allowance to shutdown and reboot seems to be the least of the methods I have seen. I'd rather not set the suid on /sbin files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants