mlgrm / glabels

a docker container for glabels-3.4.1 based on ubuntu 18.04
GNU General Public License v3.0
2 stars 1 forks source link

Unable to init server: Could not connect: Connection refused #1

Open poilkos opened 4 years ago

poilkos commented 4 years ago

Hello, I am trying to use glabels image in docker and get this error: Unable to init server: Could not connect: Connection refused (glabels-3:6): Gtk-WARNING **: 17:56:31.731: cannot open display: Unable to init server: Could not connect: Connection refused

alconcl commented 4 years ago

if you are using OSX or Windows you'll need xquartz or vcxsrv respectively.

https://www.xquartz.org/ https://sourceforge.net/projects/vcxsrv/

For instance on windows, we need to use the IP address of the virtual network adapter that docker created (vEthernet):

And then in the PowerShell you define the DISPLAY variable:

set-variable -name DISPLAY -value 172.18.85.65:0.0

localhost or 127.0.0.1 won't work.

You can define the display manually or check the log display server to confirm the current port.

And then you run it passing the variable as follows: docker run -e DISPLAY=$DISPLAY 'mlgrm/glabels'