Skip to content

no authorization protocol specified for Graphical Interface in container

Summary

Trying to run a simple graphical user interface inside a container I come across the error:

Authorization required, but no authorization protocol specified
_tkinter.TclError: couldn't connect to display ":0"

I open this issue here for information on Apptainer for the DIAMOND project, it is not related to any apptainer image hosted in this repository.

Steps to reproduce

I was not able to reproduce reliably the problem on a different machine.

The container instance was started using the --containall option.

The graphical user interface is a python script running:

tkinter.Tk()

Description of the system

  • Ubuntu 24.04
  • Apptainer 1.3.6 from debian package

What is the current bug behavior?

Python script returns an exception and the expected window doesn't show.

Possible fixes

  • incorrect DISPLAY environment variable: I checked that the DISPLAY environment variable was correctly passed from host machine to container, but this did not fix the issue.
  • I will try the "xhost solution" from Diamond Frequently asked questions
  • I will try starting the instance without the --containall option. I am confident this will work but it wouldn't be a satisfactory solution.