Ask Your Question
2

What is the cause of the error "Gtk: cannot open display: :0" when running Chromium in Docker?

asked 2023-05-07 23:02:59 +0000

david gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-07 23:27:01 +0000

scrum gravatar image

The error "Gtk: cannot open display: :0" occurs when Chromium is trying to open a graphical user interface, but the Docker container does not have access to the X Windows display. This could be because the container is running on a headless server, or the DISPLAY environment variable is not set correctly in the container. To fix this error, you can either use a different headless browser or make sure the Docker container has access to the X Windows display by setting the DISPLAY environment variable to the correct value.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-07 23:02:59 +0000

Seen: 14 times

Last updated: May 07 '23