I am using a rpi zero w with hdmi to a monitor, no SSH just using keyboard & mouse directly to the pi. Ive been having the pi boot up in terminal before starting gui recently and everything has worked fine until today when i went to do startx and got an error.
pi@raspberrypi:~ $ startx X.Org X Server 1.20.11 X Protocol Version 11, Revision 0 Build Operating System: linux Raspbian Current Operating System: Linux raspberrypi 5.15.32+ #1538 Thu Mar 31 19:37:58 BST 2022 armv61 ... (EE) Fatal server error: (EE) AddScreen/ScreenInit failed for driver 0 (EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/home/pi/.local/share/xorg/Xorg.0.log" for additional information (EE)(EE) Server terminated with error (1). Closing log file xinit: giving up xinit: unable to connect to X server: Connection refused xinit: server error
Tried starting up a different way ie having thonny open up a file and got this error:
_tkinter.TclError: no display name and no $DISPLAY environment variable
to no surprise
echo $DISPLAY returned an empty string.
export DISPLAY=0.0 didn't fix the startup error though.