Auto start into ES or Pixel depending on key press
-
First off, I have a raspberry Pi 3 with the latest releases of raspbian and retropie. Raspbian was installed first and then retropie installed on top of it. Everything was set up and installed in the last couple of weeks. I also gave one to my sister and brother-in-law, and am using mine to prototype some scripts for theirs.
So, here's the ideal situation: more often than not, they'll want the Pi to boot straight into emulation station. However, occasionally they'd like to instead go straight to the desktop (eg. Pixel).
My thoughts on a design: edit the autostart.sh script to give a small countdown (currently 5 seconds) before launching emulationstation. If a key is pressed within those 5 seconds, instead go to Pixel. (If anybody wants to recommend an alternative approach I'd be happy to hear your thoughts.)
The problem I'm running into: the startx command leads to a black screen if it's ever run after the autostart script. Regardless of which branch of the script gets executed, startx fails. I assumed it had to do with when startx was being called in terms of the system booting up, so right now the script is set up that it only launches ES if no button was pressed and otherwise it just reaches the end of execution (so no exit calls or anything). This does mean that if I press a button during the countdown it goes straight to the CLI. But then if I do startx, blank screen. If I let ES launch and then quit to the CLI and try startx, blank screen. Seemingly no matter what, if autostart.sh gets executed, startx fails.
I imagine there's some issue with the way the retropie profile affects the defaul settings for the xserver, but I'm not familiar enough with Raspbian or Retropie's boot sequence to know where to go from here.
-
-
@Septcanmat possibly related to this bug that has since been fixed with a bit of a workaround
https://retropie.org.uk/forum/topic/6304/desktop-from-ports-fails-to-load-4-1
-
@herb_fargus I'll give the workarounds a try tomorrow but I don't think it's the same issue. I don't get any errors or crashes or anything - i can even switch to another console. It's literally that startx just leads to a blank black screen.
-
This post is deleted!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.