Make a Cygwin shortcut to ssh with XWindows

This page explains how to make a shortcut on your Microsoft Windows desktop which logs you in to a SSH server with the XWindows service active. The basic methodology is taken from this Stack Overflow question and its answers, with the addition of the ability to use XWindows.

Here are the steps:

  1. Right-click on the Cygwin terminal icon on your desktop.
  2. Choose "Copy"
  3. Go to a blank part of the screen
  4. Right-click and choose "Paste". A new Cygwin icon should appear.
  5. Right-click on the new icon and choose "Properties". A box entitled something like "Cygwin64 Terminal Properties" should appear.
  6. On the "Cygwin64 Terminal Properties", under the "Shortcut" tab, click on the text in "Target".
  7. Edit the text to
    C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico /bin/bash -l -c "DISPLAY=:0 ssh -Y <name>@<server>".
    Here <name> is your login name on the server, and <server> is the server's name.
  8. Optionally, you may want to right-click on the icon and choose "Rename" to rename it to whatever is appropriate. You can also change the icon used with "Change icon" under the "Properties" menu discussed above.

Now clicking on the icon will log you in to the server and enable you to use XWindows on the server. Please note that the form ssh -X does not work, and that there is no semicolon after DISPLAY=:0.

Web links


Copyright © Ben Bullock 2009-2022. All rights reserved. For comments, questions, and corrections, please email Ben Bullock (benkasminbullock@gmail.com) or use the discussion group at Google Groups. / Privacy / Disclaimer