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

Linux System shutdown and restart command doesn`t work #42

Closed
Mernst1 opened this issue Jul 23, 2016 · 4 comments
Closed

Linux System shutdown and restart command doesn`t work #42

Mernst1 opened this issue Jul 23, 2016 · 4 comments

Comments

@Mernst1
Copy link

Mernst1 commented Jul 23, 2016

When I click the shutdown or also the restart command in the menu Emulationstation just closes.
It doesn`t shutdown or restart the hole System.

@MCMic
Copy link

MCMic commented Jul 23, 2016

From what I’ve seen in emulationstation output it uses sudo on shutdown command.
So you need to give the user emulationstation runs under the right to use sudo shutdown without password.
http://askubuntu.com/questions/159007/how-do-i-run-specific-sudo-commands-without-a-password

@Mernst1
Copy link
Author

Mernst1 commented Jul 23, 2016

Okay, I tried it again. I wrote in the sudoers file that users can use the shutdown command with root access. But Emulationstation still doesn`t shutdown only closes Emulationstation. When I try it in the terminal with user rights its working. I also tried to change the command in the plattform.cpp from 'sudo shutdown -h now' in 'shutdown -P now' and its not working.
I think the Problem seems to be somewhere in the code.

@johnodon
Copy link

johnodon commented Aug 2, 2016

I am having the same issue compiled on Lubuntu 16.04. If I try to restart ES or restart/shutdown the system, I am taken back to the desktop. My local acct has been added to sudoers and it did not help:

sudo sed -i '$ a\retro ALL=(ALL) NOPASSWD:ALL' /etc/sudoers

Stock ES from the PPA works fine (although missing 'Restart ES' option obviously).

@CaptainBoatCode
Copy link

CaptainBoatCode commented Aug 10, 2016

Fixed it, was working on #37 and found that the functions runShutdownCommand and runRestartCommand where never called. Going to do a pull request with the fix.

However, for the fix to work emulationstation has to be run as root or under permission to reboot or shutdown the system !

See pull-request: #45

@Mernst1 Mernst1 closed this as completed Sep 18, 2022
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

4 participants