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

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

Open
poilkos opened this issue Mar 20, 2020 · 1 comment
Open

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

poilkos opened this issue Mar 20, 2020 · 1 comment

Comments

@poilkos
Copy link

poilkos commented Mar 20, 2020

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
Copy link

alconcl commented Apr 19, 2020

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'

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

2 participants