jozo / docker-pyqt5-qml

Dockerfile for development of GUI applications with Python 3 + PyQt5 + QML
1 stars 1 forks source link

libGL error: No matching fbConfigs or visuals found #2

Open akhilesh17 opened 5 years ago

akhilesh17 commented 5 years ago
$ docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v $(pwd)/test:/app -e DISPLAY=$DISPLAY -u qtuser fadawar/docker-pyqt5-qml python3 /app/hello.py
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-qtuser'
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Could not initialize GLX

Any solution for this?

EDIT:

It tried -v ~/.Xauthority:/home/qtuser/.Xauthority also but the same error.

$ docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/.Xauthority:/home/qtuser/.Xauthority -v $(pwd)/test:/app -e DISPLAY=$DISPLAY -u qtuser fadawar/docker-pyqt5-qml python3 /app/hello.py
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-qtuser'
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Could not initialize GLX
jozo commented 5 years ago

Which OS do you use?

akhilesh17 commented 5 years ago

@jozo , Sorry for the delayed reply. I am using Ubuntu 16.04 LTS.

jozo commented 5 years ago

So today I tried run the command in Ubuntu 16.04.5 in VirtualBox. I also got the warning: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-qtuser'

However, it run without problem. The problem in your case will be in next lines about libGL error. It's hard to help you because I can't reproduce the problem. Maybe you can look at this issue to find some help: https://github.com/jessfraz/dockerfiles/issues/253 If you find solution please share it here. 🤔