Comments (6)
Hi. It seems your $IP variable is empty. Did you run this before?
IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
What is the output of
echo $IP
?
from docker-pyqt5.
Same error.
IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
$ echo $IP
192.168.1.16
docker run --rm -it
-v /tmp/.X11-unix:/tmp/.X11-unix
-e DISPLAY=$DISPLAY
-u qtuser
jozo/pyqt5 python3 /tmp/hello.py
qt.qpa.xcb: could not connect to display /private/tmp/com.apple.launchd.V4GO9HuUSU/org.macosforge.xquartz:0
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.
from docker-pyqt5.
I killed and restarted an xterm. I get the Hello World (whoop!)
A slightly different error:
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
I suppose the next question is:
Do I simply add your docker image to my docker-compose.py?
from docker-pyqt5.
Now you have set $IP variable but notice that you don't use it when you call docker. Try again:
docker run --rm -it \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=$IP:0 \
-u qtuser \
jozo/pyqt5 python3 /tmp/hello.py
from docker-pyqt5.
I did, I had just cut and paste an old command.
I can now get the test app up....thanks..
Do I simply add your local build to my docker-compose.py script?
Do I have to preface the execution of the application with
jozo/pyqt5 python3 mypyapp.py
from docker-pyqt5.
I suppose the next question is:
Do I simply add your docker image to my docker-compose.py?
I don't know what is in your docker-compose.py or how you use it. It's up to you. :) If you need help with your project I recommend to write a question to StackOverflow.
from docker-pyqt5.
Related Issues (10)
- QXcbConnection: Could not connect to display HOT 1
- xhost _local:docker but it didn't work. HOT 5
- 我在 centos7上报错
- Error: Could not connect to display HOT 5
- qt.qpa.xcb: could not connect to display $IP:0 HOT 3
- Docker Error: image with reference jozo/pyqt5 was found but does not match the specified platform: wanted linux/arm/v7, actual: linux/amd64 HOT 1
- Error on Archlinux with i3wm: qt.qpa.xcb: could not connect to display :0 HOT 3
- Error: Root user could not connect to display HOT 3
- can not show chinese char HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-pyqt5.