docker-qgis-desktop icon indicating copy to clipboard operation
docker-qgis-desktop copied to clipboard

Cannot connect to X server unix:1

Open kofronpi opened this issue 9 years ago • 2 comments

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

kofronpi avatar Sep 06 '16 14:09 kofronpi

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}')

ksketo avatar Oct 10 '16 11:10 ksketo

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

Inkimar avatar Sep 03 '20 21:09 Inkimar