I have a script called "Arcade.py" that makes a cool fullscreen GUI and does other stuff. I want my Pi to boot and run that script, thus hiding everything else in the background.
I managed to configure .bashrc
into starting that script, but it only works when I open the terminal. I've tried other solutions (like setting a service to start my Python app), but to no avail.
Given that I don't need anything else graphical in the system (bars, background images, screensavers, etc), is it possible to turn all default launched app that consume graphical resources off and, consequently, run only my graphical script automatically at boot?
3 Answers 3
You could use a minimal Window Manager (such as Openbox) with autostart. That way it will (probably) run.
Configure your Pi to boot to command line then enter :
startx python Arcade.py
This should start the desktop with just your python app.
Given that I don't need anything else graphical in the system (bars, background images, screensavers, etc), is it possible to turn all default launched app that consume graphical resources off and, consequently, run only my graphical script automatically at boot?
This implies that your script is doing all graphical issues by itself and you do not even need the X-Window server. So you can use Raspbian Buster Light, or any other Light version of Raspbian supporting systemd. This does not install any graphical support. You only have the command line. Now just create a simple Unit file to start the systemd service:
rpi ~$ sudo systemctl --force --full edit myarcade.service
In the empty editor insert these statements, save them and quit the editor:
[Unit]
Description=My Arcade script
[Service]
ExecStart=/full/path/to/Arcade.py
[Install]
WantedBy=multi-user.target
Enable the new service with
rpi ~$ sudo systemctl enable myarcade.service
and reboot.
You can manage the script with:
rpi ~$ sudo systemctl stop|start|restart myarcade.service
rpi ~$ systemctl status myarcade.service
-
It has been so long that I no longer have a system to test this with :/BlueMoon93– BlueMoon932020年05月19日 14:38:59 +00:00Commented May 19, 2020 at 14:38
-
@BlueMoon93 It would be nice if you could accept one answer. Only accepting an answer will finish the question and it will no longer annoying us with pop up month for month all years. Or just delete the question.Ingo– Ingo2020年05月19日 17:44:51 +00:00Commented May 19, 2020 at 17:44
-
you cant delete a question that has answers, afaik. I'll boot my old pi when I have time and see if any of the answers is validBlueMoon93– BlueMoon932020年05月19日 18:44:58 +00:00Commented May 19, 2020 at 18:44