Displaying remote clients

Displaying remote X clients with Cygwin/X is nearly identical to displaying remote X clients with any other X Server. You may use the secure ssh method, or the insecure telnet method (not recommended).

Secure ssh

On your Windows machine:

  1. Make sure you have the openssh package installed.

  2. Launch Cygwin/X

  3. Run the following in a terminal:

    
$ export DISPLAY=:0.0
    $ ssh -Y username@remote_hostname_or_ip_address
    
  4. Enter your password when prompted by ssh.

  5. Your ssh session should now show you a shell prompt for your remote machine.

  6. You can now launch remote X clients in your ssh session, for example, xterm& will launch an xterm running on your remote host that will display on your Cygwin/X screen.

  7. Launch other remote clients in the same manner. I recommend starting the remote clients in the background, by appending & to the command name, so that you don't have to open several ssh sessions.

Insecure telnet

On your Windows machine:

  1. Make sure you have the inetutils package installed.

  2. Launch Cygwin/X

  3. In an X terminal type xhost remote_hostname_or_ip_address

  4. In an X terminal type /usr/bin/telnet remote_hostname_or_ip_address.

    Note: Use the explicit path to ensure that Cygwin's telnet is run instead of Microsoft's telnet. Microsoft's telnet cannot read input or display output correctly when run from a Cygwin shell.

  5. Login to your remote machine via your telnet session

  6. In your telnet session type, export DISPLAY=windows_hostname_or_ip_address:0.0

  7. You can now launch remote X clients in your telnet session, for example, xterm& will launch an xterm running on your remote host that will display on your Cygwin/X screen.

  8. Launch other remote clients in the same manner; I recommend starting the remote clients in the background, by appending & to the command name, so that you don't have to open several telnet sessions.

Note: This is insecure because the X protocol is transmitted in clear across the network between you and the remote host, and you have allowed any user on the remote host to connect to your X server and monitor your X session. For this reason, use ssh forwarding rather than telnet, if at all possible.