Cygwin/X can do a lot, including giving you a nice xterm for your Windows-to-linux ssh sessions.

But you’d think it would be easier…

  • Install cygwin, including…
    Shells: bash (included by default)
    X11: xorg-x11-xwin: Cygwin/X X server
    Net: openssh: The OpenSSH server and client programs
  • Add [C:\cygwin\bin;C:\cygwin\usr\X11R6\bin] to your Windows PATH env variable
  • Make some batch files, one for each machine to which you want to connect. Here’s an example:
    @echo off
    SET DISPLAY=127.0.0.1:0.0
    SET CYGWIN_ROOT=\cygwin
    SET RUN=%CYGWIN_ROOT%\bin\run -p /usr/X11R6/bin
    SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%
    SET XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults
    SET XCMSDB=/usr/X11R6/lib/X11/Xcms.txt
    SET XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
    SET XNLSPATH=/usr/X11R6/lib/X11/locale
    
    c:
    cd C:\cygwin\usr\X11R6\bin
    
    %RUN% xterm -e 'ssh user@machine'
  • Run the X server (via startxwin.sh or whatever)
  • Call the batch files to connect!

You can also set up shortcuts for ssh via bash in the standard Windows console, or in an rxvt terminal, if you install that.

Or just use putty. :>

Leave a Reply