Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to X server unix:1 #19

Open
kofronpi opened this issue Sep 6, 2016 · 2 comments
Open

Cannot connect to X server unix:1 #19

kofronpi opened this issue Sep 6, 2016 · 2 comments

Comments

@kofronpi
Copy link

kofronpi commented Sep 6, 2016

Hello,

I tried to run your docker qgis (without attaching to a postgis db) but it failed:

Pulling qgisdesktop (kartoza/qgis-desktop:2.14)...
2.14: Pulling from kartoza/qgis-desktop
8b87079b7a06: Pull complete
a3ed95caeb02: Pull complete
313cd0003722: Pull complete
c6c61c066ed5: Pull complete
e33e35a14640: Pull complete
655f54fb8796: Pull complete
8b688443b5e4: Pull complete
6fde39a647f9: Pull complete
1c2c6f3d0e0b: Pull complete
10faa1575c24: Pull complete
2127edd83feb: Pull complete
a5ea21a90b19: Pull complete
13f33ae799bd: Pull complete
52762fd4efdc: Pull complete
d77e68ef7695: Pull complete
Digest: sha256:5c9da833ff651c7829614d800f1da2493f2a386d7b3e3a42bdec1d0e0f58dd4f
Status: Downloaded newer image for kartoza/qgis-desktop:2.14
Creating qgis_qgisdesktop_1
Attaching to qgis_qgisdesktop_1
qgisdesktop_1 | Warning: qgis: cannot connect to X server unix:1
qgis_qgisdesktop_1 exited with code 1
@ksketo
Copy link

ksketo commented Oct 10, 2016

You need to change the environment variable in your compose file to DISPLAY=${ip}:0 , where ip is (in mac os x) ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')

@Inkimar
Copy link

Inkimar commented Sep 3, 2020

Hi @ksketo ,

I am running this on Ubuntu 19
I guess that command fetches the ip-adress, but how would one construct that command when running multiple docker-containers etc? or could I just write the ip as in :
DISPLAY=127.0.0.1.:0

-i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants