Friday, September 01, 2006

Cygwin and Eclipse over X11

Problem
My MacBook HD has died. While I am awaiting its repair I've switched to my Windows XP machine. I needed to run Elcipse on a remote site where I will be running some demos next week. Shouldn't be difficult, simply run ssh into the remote Unix system, allow X11 to use the open connection and "Bob's your Uncle."

So, I installed Cygwin with X11 on XP and Eclipse on a remote Linux system. I opened the ssh connection, tested X11 with an xterm then started Eclipse but received several of the following errors
winMultiWindowXMsgProcErrorHandler -
ERROR: BadWindow (invalid Window parameter)
A few seconds later Eclipse/Java gave a fatal error and died. I tried running Firefox remotely, it had the same BadWindow errors but carried on running and worked perfectly.

Solution
After a long search on the Internet I came across CISC474, Unix Knowledge. It suggested using -Y instead of -X to start the ssh session i.e.
ssh -Y user@host.example.com
I tried Eclipse again, same errors but this time Eclipse carried on running.

The difference between -X and -Y?
From NC State University

Trusted vs. Untrusted X11 Forwarding

Due to security concerns (highlighted by a vulnerability in using SSH with Trusted X11 Forwarding), OpenSSH (as of version 3.8) now supports both untrusted (-X) and trusted (-Y) X11 Forwarding. The difference is what level of permissions the client application has on the X-server running on the client machine. Untrusted (-X) X11 Forwarding is more secure, but unfortunatley most applications do not support running with less priviledges as of yet. So when attempting to remotely access applications, using Trusted (-Y) X11 Forwarding will have less applications problems for the near future.

No comments: