![]() |
Startup Shutdown Button Pi - Printable Version +- Forum (http://forum.xbian.org) +-- Forum: Software (/forum-6.html) +--- Forum: Configuration (/forum-17.html) +--- Thread: Startup Shutdown Button Pi (/thread-3903.html) |
Startup Shutdown Button Pi - TheDutypaid - 12th May, 2017 02:55 AM At the moment when I power on I plug in my Pi and when power off, I go through the shutdown menu. I was reading this RetroPie Shutdown and Startup Switch – The Easy Way The install is from a script Code: curl http://pie.8bitjunkie.net/shutdown/setup-shutdown.sh | bash Would this work with Xbian? RE: Startup Shutdown Button Pi - TheDutypaid - 13th May, 2017 12:10 AM Just installed the script and nothing happens when the switch is pressed. Is there another way I can add a startup and shutdown switch to the Pi for this? RE: Startup Shutdown Button Pi - Nachteule - 13th May, 2017 01:28 AM Sure, probably there are millions of solutions for doing this. In your case, if you would read RetroPie installer script you will see that the python stuff is downloaded to home of user pi, but XBian does not have user pi. So you have to download script, modify it (change all pi to xbian) and try again RE: Startup Shutdown Button Pi - TheDutypaid - 13th May, 2017 07:23 AM Hi Nachteule. I changed the script in Notepad ++ (which I think may work) I'm not sure where the file needs to be placed I am using WinSCP Code: #!/bin/bash RE: Startup Shutdown Button Pi - Nachteule - 13th May, 2017 08:42 AM (13th May, 2017 07:23 AM)TheDutypaid Wrote: Hi Nachteule. Every place you want, good place is /tmp, because this folder will be cleaned when system boots Please note before running scrirpt you have to make it executable (chmod +x) or run script via sh <script> Please note after running script you have to change pi -> xbian in /etc/init.d/pi_shutdown also AND sudo apt-get install --yes python-rpi.gpio python3-rpi.gpio </dev/null will fail because those two packages are NOT in raspbian repo, I suppose they are in retropie repo RE: Startup Shutdown Button Pi - Nachteule - 13th May, 2017 08:55 AM ... or you have to grab it from here and here RE: Startup Shutdown Button Pi - Gauner - 22nd Apr, 2020 05:53 AM You could also dig into the dtoverlay=gpio-shutdown. At least the Raspberry Pi 3B+ is prepared to just wire a button on PIN 5 and 6 which starts the Pi from halted and send a KEY_POWER Event while running. Which (as a matter of fact) Kodi just reacts to with a shutdown menu, not an immediate shutdown process, but that's another story. (Has somebody an idea hot to make XBian shutdown on that event, but make Kodi show the shutdown menu when I press the button on the remote control?) |