Hello everyone. I've been solving this issue for quite a while, and I am out of ideas.
What I want: I want to be able to boot the Pi to the desktop and then to be able to switch to emulationstation using only a mouse (actually it's a touchscreen, but there's not much of a difference), without typing any commands, somehow.
What i've tried: I have written a simple watchdog script that gets run at boot and checks if a file (/home/pi/startemu) contains "1". If it does, it kills X, launches emulationstation, changes the 1 to a 0. Another script, in the desktop writes a 1 into the file when executed. And this works. Sorta. Emulationstation launches, the desktop closes, but when I try to launch a rom, the screen just blinks a couple times and then i get returned into the emulationstation menu. I am guessing that this is because the emu-station got launched from outside the active console (/dev/tty1) and thus, all the emulators try to launch themselves wherever the watchdog script runs, and fail.
I have also tried to just launch emustation by a script inside X that killed X and then launched emustation, but that did not work, for obvious reasons (script stops working as soon as X is closed, since it's running inside X), this is a dead end.
Does anyone have an idea about how to make this work? I am open to other solutins as well, as long as they allow me to launch emulationstation using only my touchscreen