I searched here for "shutdown" and was unable to find the answer, I am a new user and have two 3.5 inch screens on the pi4, I tried using the shutdown button on the AIR MANAGER but this just closes the Airplayer app, Is it possible to cause the Rpi to gracefully shutdown completely when I close the Airmanager app? Or perhaps there is a better way to achieve this. At the moment I have to risk either removing the power to the Rpi or remote access and close down the Rpi manually. Any help on how to todo this greatly appreciated.
I am using Xplane12. perhaps there is a way to send shutdown instruction(s) to the Rpi from XPlane??
Thanks
Rpi4 shutdown
-
- Posts: 5346
- Joined: Thu Jul 27, 2017 12:22 am
Re: Rpi4 shutdown
You would have to put this script into an instrument, then attach a button to the Pi to trigger this script.
-
- Posts: 6
- Joined: Wed May 17, 2023 9:50 am
Re: Rpi4 shutdown
Thanks Ralph and Simpassion, I will have a try at your suggestion.
-
- Posts: 6
- Joined: Wed May 17, 2023 9:50 am
Re: Rpi4 shutdown
So I get the add the instrument and hardware button to work just fine but I have to restart Airplayer manually because I need to use the I/O support on the Rpi,
4. Start Air Player manually
For I/O support on the Raspberry Pi run Bootloader as root:
$ sudo ./Bootloader
It seems to just start as a regular user, I have searched all the directories on the Rpi for these directories ~/.config/autostart
How can I find and edit the file so the AirPlayer starts with I/O support automatically?
Could we have an option to create the autostart file with a choice of either regular or root user?
4. Start Air Player manually
For I/O support on the Raspberry Pi run Bootloader as root:
$ sudo ./Bootloader
It seems to just start as a regular user, I have searched all the directories on the Rpi for these directories ~/.config/autostart
How can I find and edit the file so the AirPlayer starts with I/O support automatically?
Could we have an option to create the autostart file with a choice of either regular or root user?
Re: Rpi4 shutdown
You can run the installer again and make sure that you choose auto start in the installation options.
-
- Posts: 6
- Joined: Wed May 17, 2023 9:50 am
Re: Rpi4 shutdown
Thanks , but I have done that Ralph, I am thinking the script only auto starts AirPlayer as regular user and consequently I am unable to use the I/O resources on the Pi, I need to start AirPlayer with root privileges ? If I do the following manually everytime then everything is fine but I want to do achieve this using the auto start feature.
4. Start Air Player manually
For I/O support on the Raspberry Pi run Bootloader as root:
$ sudo ./Bootloader
4. Start Air Player manually
For I/O support on the Raspberry Pi run Bootloader as root:
$ sudo ./Bootloader
Re: Rpi4 shutdown
Might depend on how you did the installation. I would have to ask my colleague.
-
- Posts: 6
- Joined: Wed May 17, 2023 9:50 am
Re: Rpi4 shutdown
The problem is trying to access shutdown & reboot menu is awkward to say the least, the pi is connected via HDMI 2 x 3.5" screens, One for clock and temp/volts the other is driving the the COM/TRANSPONDER module. I want solve this before having everything fitted permanently and the panels painted etc.
Re: Rpi4 shutdown
You could send shutdown command remotely to Pi from another machine.. I use this Windows batch file to shutdown the PI and Windows, adapt as needed.
@rem ----------------------------------------------------------------------------------
@rem THIS SHUTS DOWN THE PI, THEN SHUTS DOWN WINDOWS
@rem
@rem README install PUTTY PACKAGE ( https://www.chiark.greenend.org.uk/~sgt ... atest.html )
@rem 64 or 32 bit; the package includes putty, plink, psftp, etc
@rem The installer prompts to add putty folder to PATH, you WANT this
@rem this calls Plink relying PATH being updated
@rem STEP 1: putty SSH (console) into the Pi once to get host fingerprint recorded in putty (plink uses that too)
@rem Change IP address to your PI
@rem ----------------------------------------------------------------------------------
plink -batch -ssh pi@192.168.2.23 -pw raspberry "sudo shutdown -h now"
@echo Shutting down Windows
%windir%\System32\shutdown.exe /s /t 5 /c "Shutting down Windows"
@rem ----------------------------------------------------------------------------------
@rem THIS SHUTS DOWN THE PI, THEN SHUTS DOWN WINDOWS
@rem
@rem README install PUTTY PACKAGE ( https://www.chiark.greenend.org.uk/~sgt ... atest.html )
@rem 64 or 32 bit; the package includes putty, plink, psftp, etc
@rem The installer prompts to add putty folder to PATH, you WANT this
@rem this calls Plink relying PATH being updated
@rem STEP 1: putty SSH (console) into the Pi once to get host fingerprint recorded in putty (plink uses that too)
@rem Change IP address to your PI
@rem ----------------------------------------------------------------------------------
plink -batch -ssh pi@192.168.2.23 -pw raspberry "sudo shutdown -h now"
@echo Shutting down Windows
%windir%\System32\shutdown.exe /s /t 5 /c "Shutting down Windows"
FSX/P3D/XP11 - i7@5Ghz, GTX1080, 4 screens + Air Manager screen + custom hardware & Avionics COM, GPS, Radios, XPOND, AP (www.simav8.com)