jozo / docker-pyqt5

Dockerfile for development of GUI applications with Python 3 + PyQt5
84 stars 24 forks source link

xhost _local:docker but it didn't work. #10

Open Yuchen-ck opened 1 year ago

Yuchen-ck commented 1 year ago

image

Yuchen-ck commented 1 year ago

Error: qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

jozo commented 1 year ago

Which OS do you use? You need to have x11 (X.Org) running.

Yuchen-ck commented 1 year ago

Don't use WSL, because it doesn't have cd /tmp/.X11-unix, WSL doesn't support GUI

jozo commented 1 year ago

You don't provide much information. :/ But based on the error you've provided it seems you have problem with X.Org. Here is an article that explains how to use it on all major platforms: https://cuneyt.aliustaoglu.biz/en/running-gui-applications-in-docker-on-windows-linux-mac-hosts/

Yuchen-ck commented 1 year ago

Thanks!