Installing a Free X Server on Windows XP

I needed to export X sessions to my Windows XP laptop, so I turned to Cygwin/XFree86. In less than 10 minutes I had am xterm from a FreeBSD machine appear on my Windows XP desktop. Here's how I did it.



  1. Download and execute Cygwin setup. The Cygwin/XFree86 User's Guide gives plenty of hand-holding if you need it. I selected all of the XFree86 packages plus OpenSSH. You'll see why OpenSSH was included shortly.

  2. Once Cygwin has finished installing, start a Cygwin shell, typically via 'C:\cygwin\cygwin.bat'.

  3. Within the Cygwin shell, start the X server via 'sh /usr/X11R6/bin/startxwin.sh' as shown below. You'll see an xterm appear.
  4. Within the xterm, allow the remote host to connect via X by executing '/usr/X11R6/bin/xhost 10.1.1.1', where 10.1.1.1 is the IP address of the remote host.

  5. Now use SSH to connect to the remote UNIX system. For example, 'ssh -l username -X 10.1.1.1'. Using the '-X' switch enables X forwarding, if it's not already specified in the SSH configuration file.

  6. Once connected to the remote UNIX system, send back an xterm by simply executing 'xterm'.

    I also sent 'xeyes' back to my system to show the sorts of graphical information that can be transmitted. It's as simple as that! All of the X traffic is sent via the encrypted SSH link, so you don't have to worry about exposing that information to the Internet.




If you're wondering how to upgrade the Cygwin packages already installed, this thread makes it clear that you only need to rerun the Cygwin setup.exe program.

Popular posts from this blog

Zeek in Action Videos

New Book! The Best of TaoSecurity Blog, Volume 4

MITRE ATT&CK Tactics Are Not Tactics