Wednesday, October 7, 2009

Eclipse over XWindows

Running and rendering the remote XWin session of eclipse.
61  set | grep SSH
[me@remote ~]$ set | grep SSH
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT='172.18.153.150 49238 22'
SSH_CONNECTION='172.18.153.150 49238 10.10.10.3 22'
SSH_TTY=/dev/pts/3
Use the SSH_CONNECTION ip listed on local to export
60  xhost +  
70  ssh -X foouser@ip_remote_host 'export DISPLAY=172.18.153.150:0;/opt/eclipse-3.3.1.1-europa/eclipse/eclipse'
Do not use the hostname or worse alias for the remote but use the remote ip address in our example 10.10.10.3 When you do not have a local Xserver running you might see this:... if thats the case change your myhostnameasalias to the network IP address of the remote host, 10.10.10.3..
me@local $ ssh -X 'me@myhostnameasalias' 'export DISPLAY=172.18.153.150:0;java -Xmx1536m -Xms1024m -jar myjar.jar '
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
Jun 21, 2012 12:01:18 PM java.util.prefs.FileSystemPreferences$2 run
INFO: Created user preferences directory.
Exception occurred in main() of MyProgram
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:169)
 at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
 at sun.awt.X11.XToolkit.(XToolkit.java:89)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:169)
 at java.awt.Toolkit$2.run(Toolkit.java:834)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826)
 at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:120)
 at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:1556)
 at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:130)
 at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1591)
 at javax.swing.UIManager.setLookAndFeel(UIManager.java:514)
 at javax.swing.UIManager.setLookAndFeel(UIManager.java:554)
To solve this ....

No comments:

Post a Comment