First, I'm a noob regarding Linux and alikes. I've been trying for last 24 hours to make my Picade (a small arcade bartop by Pimoroni, running on Raspberry Pi 4) start into Pico-8 in Splore mode. It boots in the desktop and I usually launch Pico-8 manually in the console with:
(my folder is pico8, not pico-8)
Works well, figured I could as well make Raspberry OS do it for me.
Followed tens of tutorials, with no success. To the most, it looks like Pico-8 launches for a second then closes. Feels like this because there's a black screen opening that closes 1 sec later. I've made a .sh file with:
with 'pico8_dyn' in place of 'pico8' if that matters. If I run it on console it works with the added echos on start and closing of Pico-8.
Then I made a autostart file at .config/lxsession/LXDE-pi/autostart:
Note the 3 commented lines:
- the sleep 5s was a tuto suggestion to wait for desktop loading, with no effect.
- the following line tries to start Pico-8. As said the result is a black screen showing briefly (this doesn't occur once the line commented)
- last line launches Chromium on the discogs website at desktop launch. This works, so the autostart file is indeed called.
So the line supposed to launch Pico8 is the call to my .sh file above. No better result, but the echo may tell what happens in the log file at ~/.cache/lxsession/LXDE-pi/run.log. So a tail -n50 shows:
You can see the echo 'Launching Pico-8...' at 13:08:18.646 so the .sh is launched. The close message is not here, so I guess Pico-8 is running but does not show.
This all feels like a pb with Pico-8, as the autostart can launch Chromium or any other program.
Also tried with adding a pico8.desktop as told there: https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup/all
Doesn't work neither.
So I'm getting quite tired and depressed about how difficult it is to simply launch Pico-8 at startup. Againg, I'm a noob, but I feel like that's not the only problem here. An idea, anyone? Am I doing something wrong? Is it a problem with Pico-8? Did someone achieved what I'm trying to do?
EDIT: the command "ps -ef | grep pico" shows that Pico-8 is in fact running. If I launch manually the .desktop file above in the desktop, it runs Pico-8 as intended, and this Pico-8 also appear in the "ps" command as a 2nd pico-8 instance. So it looks like all those attempts really launch Pico-8, but it just doesn't show. Alt-tab don't show them neither. So why don't they show, and how can I make them to?
EDIT 2: pico-8 sound was muted, but after I unmuted it, I now can hear its little tune playing once the Pi has booted in the desktop, so I'm 100% sure Pico-8 IS RUNNING, but not displaying, and no way to make it show.