Do not want to connect to X server [Closed]

Asked 1 years ago, Updated 1 years ago, 48 views

Do you want to improve this question?Edit your post to clarify the issue you are trying to resolve by adding details.

Closed 4 years ago.

4 years ago

To save the image file from the application, you must start Viewer.
However, when you start Viewer from docker, there is no output destination, so you get the following error:

vtkXOpenGLRenderWindow(0xd7e860):badX server connection.DISPLAY=/usr/local/bin/******:line86:30 Aborted(core dumped)

What should I do to avoid errors?
The environment is ubuntu for both local and Docker.

Thank you for your cooperation.

docker

2022-09-30 19:45

2 Answers

If the application is a GUI, the environment variable DISPLAY must correctly set the IP address (or hostname) of the machine on which the X server is started.
The DISPLAY=/usr/local/bin/*** in the error message is the path of some kind of file, so it is clearly wrong.

vtkXOpenGLRenderWindow(0xd7e860):badX server connection.DISPLAY=/usr/local/bin/******:line86:30 Aborted(core dumped)

You may miss the point because you don't have a specific app name, but when I searched some of the error messages on the web, I found the following page for your reference.

[vtkusers] Rendering to images without X (Linux)?
VTK/Examples/Cxx/Utilities/OffScreenRendering-KitwarePublic


2022-09-30 19:45

I don't know how to prevent X Server from connecting because I don't have any information about Viewer, but I think it would be better if it appeared on the X.org server on the Docker host.

Try specifying the environment variable DISPLAY when the container runs, and specifying the socket for the X11 protocol on the host with the -v option.

Example)

#docker run-it --rm-e DISPLAY=$DISPLAY-v/tmp/.X11-unix:/tmp/.X11-unix viewer

If things go well, when Viewer, the X client, boots up, you will be connected to the X.org server on the Docker host and the GUI will appear on the Docker host screen.


2022-09-30 19:45

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.