I am trying to get a python script with tkinter GUI to run in kiosk mode on startup without loading the entire X environments desktop and everything else.
I have the following script in ~/.xinitrc:
#!/bin/sh exec /home/pi/test.py --kiosk
Using Rasps-Config, if I boot to the console with auto login and type startx, then it works perfectly. However, if I boot to the desktop environment it loads the complete desktop and my script never runs. If I boot to the console and place a script in rc.local that runs startx, it still goes to the complete environment without running my script. However, I do get an error saying "no session for pid 786".
In this usage case, I do not have access to a keyboard so I am unable to type startx from the console to make it boot correctly.
Anyway have and ideas or solutions?
By the way, I'm running a Pi 3 with the latest image of stretch. It's a clean install except for the software to run Adafruit's 2.4" PiTFT screen.