I used to have a working container that started an X11 server.
After I upgraded to balenaOS 2.41.0r3 my startx script fails (it’s being run as an unprivileged user) saying xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
It works if you run it as root… but then it doesn’t execute my .xinitrc for that user…
Upgraded from 2.38. 4 hours later and I mended everything that was busted…
Had to do chmod 660 /dev/tty* and now it works (my non-priv user was already in the tty group).
Also needed to add my user to the video group so that it could open /dev/fb0. strace is such a great tool for debugging this sort of thing !
Finally I needed to add needs_root_rights=yes to /etc/X11/Xwrapper.config otherwise modeset would fail. Probably mucking about with the groups is actually not necessary with the Xwrapper change…