docker-eclipse icon indicating copy to clipboard operation
docker-eclipse copied to clipboard

Eclipse can not open display.

Open Divyashri-Nagaraj opened this issue 8 years ago • 11 comments

On docker run :

docker run -ti --rm
-e DISPLAY=$DISPLAY
-v /tmp/.X11-unix:/tmp/.X11-unix
-v pwd:/workspace
fgrehm/eclipse:v4.4.1

returns

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 Eclipse: Cannot open display: org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will retry after the state location is initialized. Eclipse: Cannot open display: Eclipse: An error has occurred. See the log file /home/developer/.eclipse/org.eclipse.platform_4.4.0_1473617060_linux_gtk_x86_64/configuration/1463424228669.log.

Please help to solve this issue

Divyashri-Nagaraj avatar May 17 '16 15:05 Divyashri-Nagaraj

i has the same problem with you

ciys avatar May 20 '16 05:05 ciys

sam here. are you all using mac? i suspect in mac since the virtual machine is the base os, we have to set up ssh forwarding in the vm to mac. haven't figured out how though

dzhao avatar May 20 '16 07:05 dzhao

Am using windows machine and connected to linux OS using Vartual machine. docker is on linux(fedora) . i am able to build the image, but eclipse GUI is not loading on docker run.

Please help!!!

Divyashri-Nagaraj avatar May 20 '16 08:05 Divyashri-Nagaraj

I have just installed and have gotten the same error as the others. I am on a Mac and I am using Docker 1.12.1. I believe that this new version of Docker for Mac doesn't use a VM.

a19i23 avatar Sep 16 '16 14:09 a19i23

I have modified the command a little and I get some progress but not much. I ran this command also from another example for running firefox.

 ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
 xhost + $ip

Then I run the docker command.

 docker run -ti --rm \
      -e DISPLAY=$ip:0 \
      -v /tmp/.X11-unix:/tmp/.X11-unix \
      -v `pwd`/.eclipse-docker:/home/developer \
      -v `pwd`:/workspace \
      fgrehm/eclipse:v4.4.1

changing the DISPLAY=$ip:0 gives me an output but it's an error screen shot 2016-09-16 at 1 46 06 pm It's progress it seems but not much. The pretty sure I'm using 64bit java so I'm not sure what the issue is.

a19i23 avatar Sep 16 '16 18:09 a19i23

I have the same setup than you, @a19i23 and the XQuartz part is working fine. The only difference is that I'm running my own image because the genuine one has a unser with id 1000, and the user on my MacOS has an id 500.

hasalex avatar Dec 12 '16 16:12 hasalex

Please see pull request #8 to resolve this

kmbyatco avatar Feb 20 '17 09:02 kmbyatco

@hasalex So are you saying you just replaced all the entries of 1000 with 500in the original docker file and built yourself a new image, and it worked?

a19i23 avatar May 20 '17 18:05 a19i23

@a19i23 As far as I remember, that was my only change for MacOS.

hasalex avatar May 21 '17 19:05 hasalex

@hasalex I've done that but now I'm getting an error about the gtk lib org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]. Do you happen to have the image still lying around somewhere? Maybe you can share it or maybe the Dockerfile

a19i23 avatar May 21 '17 20:05 a19i23

@a19i23 Yes, AFAIR. I don't use it anymore and I don't have a Mac anymore.

hasalex avatar May 23 '17 16:05 hasalex