Say you work somewhere where all workstations run Linux, only you have Windows on your laptop, which you basically use all the time. Now as I type this, I am not sure if anyone else shares my fate. Anyway; this does not stop you from running some of the cool Linux tools. Just install CygwinX (through the regular Cygwin installer) and start the XServer from the start menu. Icons will appear in your taskbar and you can start an XTerm. Inside that XTerm, type:
rattle@windows.box$ ssh -Y rattle@linux.box
Password: 
Last login: Thu Sep 17 12:43:19 2015 from windows.box

rattle@linux.box$ xmaple
and there you go!
Maple on Windows
Maple on Windows
The -Y switch is the one that does all the magic, obviously.


Well. In case you have not stumbled across the corresponding StackOverflow post, and if you have always wondered why vim does not work properly in cygwin, just
[rattle@ALICE:~]$ cat .vimrc
set nocompatible
set backspace=indent,eol,start
and your worries will be over.


If you run cygwin applications such as [the rsync-backup script](/2014/01/31/incremental-backups-with-rsync-in-windows/), you will sometimes run into trouble with odd NTFS permissions being set by the cygwin application. My tip is to avoid this by making cygwin not set *any* permissions at all. If a cygwin application then creates a file, for instance, this file will only inherit its security settings from the folder it is contained in. This way, you can set access control on the root directory and all the files created by rsync inside that folder will inherit these permissions. How to do it? Open your cygwin shell and edit /etc/fstab which should contain only one non-comment line:
none /cygdrive cygdrive binary,posix=0,user 0 0
Now insert the noacl attribute, see [the cygwin manual](http://www.cygwin.com/cygwin-ug-net/using.html#mount-table):
none /cygdrive cygdrive binary,noacl,posix=0,user 0 0
And the next time you run rsync-backup, it will *not* set all kinds of awkward permissions on your files which make them unreadable on a freshly installed computer. Just saying.