« Great Feuds in Technology | Main | CVS client on HPUX 11.11 »

making CygWin/X work with Fedora Core2

With lots of trial and error and some googling, I finally managed to get CygWin/X running on my Windows box work with my Fedora Core2 Linux system. The steps are actually quite simple:

1. start the X in multiwindow mode from cygwin's bash prompt:

$ X -multiwindow &

This would run the X server in the background, showing an X icon in the Windows system tray (also known as notification area). The root X window is hidden.

2. launch xterm on the local machine:

$ xterm -display localhost:0 &

This opens an x window on the local machine.

3. From this X window, ssh into the remote Linux system:

$ ssh -X -l <user> <linux-host>

Now, any program with GUI run from this window on the remote system will open a window on the local machine. Simple, isn't it!

So, why did it take me signficant amount of trial and error and googling?

Perhpas I was misled by the ease with which CygWin/X works with an HPUX system:

$X -query <hpux-host>

This doesn't work for Linux. The explanation I found is that the above command requires xdm daemon to be running on the target host, which is disabled by default on most Linux systems (for security reasons). Apparently, the steps to enable and run xdm are not very straightforward and I gave up after a couple of false starts.

Other route I tried was to run X server on the local machine, then ssh into the remote Linux machine from a Windows command window, set the DISPLAY env. variable and then run an X program from the ssh session. This used to show the following error on the remote Linux machine:

Xlib: connection to "<local-host>:0.0" refused by server
Xlib: No protocol specified

xterm Xt error: Can't open display: <local-host>:0

And the following message on the local machine:

AUDIT: Wed Sep 22 23:52:18 2004: 2040 X: client 1 rejected from IP

These messages had me baffled for quite a while! But now that I know how to make things work, even these error messages make sense.


This page contains a single entry from the blog posted on September 22, 2004 11:58 PM.

The previous post in this blog was Great Feuds in Technology.

The next post in this blog is CVS client on HPUX 11.11.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33