Tkinter GUI app in Torizon OS

The error _tkinter.TclError: couldn’t connect to display “:0” or literally means it tried to find a display (set by the WAYLAND_DISPLAY or DISPLAY variables, run printenv inside your container application to make sure those are set) but it wasn’t able to.

It either means that:

Please check this thread, there’s a lot of information there about this specific error message: Containers not running in TorizonCore with evaluation containers for iMX8M-Plus - #22 by SCordibella

I also tried your sample here … I don’t know how to apply it

You need to copy it over to Torizon OS and run it with docker-compose up.

I read somewhere that Torizon OS does not support Xserver, which tkinter needs. Is that true?

It does through XWayland (a Xserver under Wayland), so it shouldn’t have problems there.