fgrehm / docker-eclipse

Eclipse IDE in a Docker container
MIT License
147 stars 68 forks source link

Eclipse can not open display. #5

Open Divyashri-Nagaraj opened 8 years ago

Divyashri-Nagaraj commented 8 years ago

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

ciys commented 8 years ago

i has the same problem with you

dzhao commented 8 years ago

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

Divyashri-Nagaraj commented 8 years ago

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!!!

a19i23 commented 8 years ago

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 commented 8 years ago

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.

hasalex commented 7 years ago

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.

kmbyatco commented 7 years ago

Please see pull request #8 to resolve this

a19i23 commented 7 years ago

@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?

hasalex commented 7 years ago

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

a19i23 commented 7 years ago

@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

hasalex commented 7 years ago

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