2020-03-21, 03:45 PM
It'd be pretty simple to create a BASH script that just contains:
#!/bin/bash
sudo /sbin/shutdown -h now
Save the script somewhere good, like /usr/local/bin/
Then create a desktop shortcut to that script. Here's a good tutorial:
https://techatplay.wordpress.com/2015/09...pberry-pi/
You can also use a little script that detects a switch closure on a GPIO pin and does a clean shutdown after a few seconds. Then you can do it with a pushbutton. Many have done it - should be easy to find with Google.
#!/bin/bash
sudo /sbin/shutdown -h now
Save the script somewhere good, like /usr/local/bin/
Then create a desktop shortcut to that script. Here's a good tutorial:
https://techatplay.wordpress.com/2015/09...pberry-pi/
You can also use a little script that detects a switch closure on a GPIO pin and does a clean shutdown after a few seconds. Then you can do it with a pushbutton. Many have done it - should be easy to find with Google.