I am trying to install Glassfish on my new Amazon EC2 Linux instance.
The installation is telling me to set the DISPLAY variable.
I determine my IP by using http://www.whatismyip.com (for example 123.45.67.89)
I open X11 on my Mac and I set the ip address in linux (eg export DISPLAY=123.45.67.89)
But the Glassfish installation is throwing an exception
java.lang.InternalError: Can't connect to X11 window server using '123.45.67.89' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
...
Any ideas?
Your mac is likely not making X available via remote interfaces (a relatively sane default). The idiomatic way to do this is to tunnel it over
ssh, which has the handy benefit of relieving you of the burden of configuring theDISPLAYvariable (not to mention saving you the embarrassment of typing your glassfish credentials in the clear!).From your mac:
Now, on the
remotehost: