Minimal Cygwin install to use as an X server on Windows

Say you have a Windows computer

Say you want to SSH into a Linux computer (or another one that uses X11, but chances are if it does it will be Linux) and view the X windows over your SSH connection.

You need an X server on Windows, to render the stuff, and you need SSH to make the connection. One way to do this, which is fairly light and simple is to use Cygwin.

  1. First, download the Cygwin installer/package manager; it is called setup-x86_64.exe.
  2. Save it somewhere sensible — don’t leave it in your Downloads folder, because it is a toolbox program you’ll run whenever you want to update Cygwin or add software. I suggest something like C:\Users\username\cygwin-setup would be a good place to put it.
  3. Run it. If you don’t have administrator privileges, you can still use it. Also see here.
  4. Click Next until it downloads the list of mirrors and you see the list.
  5. Choose a mirror.
  6. Click Next, and you’ll get the main interface.
  7. First, use the drop-down to choose Full (that is, all packages); then type xorg-server in the Search box, then use the drop-down in the relevant row of the search output to choose the latest version of the package. Do not click Next yet.
  8. Now search for xwin-xdg-menu and select it for install.
  9. Now openssh.
  10. Now xinit.
  11. And anything else you want, but these will work as a minimum. I would recommend choosing a terminal emulator that you know and like, or you’ll just get the basic xterm, which is pretty minimal. But works! I like mate-terminal.
  12. Click Next.
  13. It will work out the dependencies and give you a long list of what it is going to download and install. Click Next.
  14. Watch the bar charts go as it downloads and then unpacks everything.
  15. Choose whether you want links on desktop. I tend to not have desktop but say Yes to Start menu. I strongly advise you make sure it is in Start.
  16. When it is done, click Finish and the installer will close.
  17. With any luck, if you asked for it you will now have a Cygwin folder in your Start menu. Open the menu and find Cygwin-X and within it Xwin Server. Run this.
  18. You should see an X tray icon appear, and then a little green and black Cygwin-X icon in your taskbar. If you click on this you’ll get a menu. Then click XDG menu and you’ll see you applications in a cascading menu. If you’ve just done this minimal install, you’ll only have one category — System Tools.
  19. Go in there and choose your terminal program.
  20. It should open, and you can now work in there like on a Linux terminal, including using ssh with -Y or -X to forward your X traffic and render the windows on your Windows machine.
Excel on Windows, mrxvt through Cygwin and then Gnumeric, xcalc and kCharSelect through X forwarding.

That’s it.

Author: Darren

I'm a scientist by training, currently working as a writer, trainer and editor.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.