Shell script to shutdown system after running xinit command?
0
votes
1
answer
130
views
I have a Raspberry Pi Zero 2W running Raspberry OS Lite (based on Debian 11 Bullseye, no desktop environment) that runs a startup shell script after an automatic login. The script uses the
command to run a graphical application and then to shutdown:
sudo xinit case_test.rpi3 --video-driver GLES2; shutdown now
The
command runs as expected and starts the graphical application. However, as soon as the application is loaded, the shutdown command is executed meaning I cannot interact with the application.
What I want to happen is for the application to launch as it does, allowing me to interact with it as long as I want, and when I choose to exit the application and return to the console, the system will then shutdown automatically. Any good ways of writing this in the shell script?
Asked by GAMER H2
(1 rep)
Mar 6, 2022, 08:00 PM
Last activity: Mar 6, 2022, 11:27 PM
Last activity: Mar 6, 2022, 11:27 PM