run xterm -e /usr/bin/bash -lI like to run tcsh as my login shell, so I change it to:
REM run xterm -e /usr/bin/bash -l run xterm -e /usr/bin/tcsh -l run xhost +The last line "xhost +" allows any X client to connect to the cygwin X server, including those on remote machines. Save the changes by pressing "Ctrl+s" and quit Notepad. Then right click on c:\cygwin\startxwin.bat again, this time "Send To" -> "Desktop (create shortcut)". You will find an icon "Shortcut to startxwin.bat" on your desktop. I usually do three more things to beautify it: (a) rename the desktop icon to just "startxwin", (b) right click on the desktop icon, go to "Properties", and in the "Shortcut" tab, change "Run: Normal window" to "Run: Minimized", (c) in the same "Shortcut" tab, click on "Change Icon..." -> "Browse...", and go to c:\cygwin directory, and select the distinctive green&black banner.
Now if you click on the desktop icon, you should get an X-Window terminal, running tcsh. If it works, close the terminal window and go to the next step.
mv .cshrc.txt .cshrc mv .Xdefaults.txt .Xdefaults mv .emacs.txt .emacsinside cygwin.
Alternatively, you may use wget to download the files directly inside cygwin, if you have already installed wget.
Now if you click on the desktop icon, you should see a gray X terminal with yellow cursor.
% tar xvfz Co.tar.gzYou will get a bunch of shell scripts, a lot of customization for Emacs, LaTeX, etc, and some binaries like AtomEye. Try it out:
% rehash % A Co/Runtime/Rasmol/PDB/Nanotube8x3x1.cfg
To access a VNC server (say on mse-jl1.eng.ohio-state.edu), you need to run
% ssh -L5901:mse-jl1.eng.ohio-state.edu:5901 -X lij@mse-jl1.eng.ohio-state.eduin your cygwin terminal to tie up mse-jl1.eng.ohio-state.edu:5901 with local port 5901 through ssh encryption. You can then (a) install Windows VNC client program, (b) run it, click on "Options...": in the "Misc" tab, select "Shared connection (do not disconnect other viewers)"; and finally in the "Load/Save" tab, click on Defaults "Save" to save these options. (c) connect to server "localhost:1" (which is L5901), click "OK", type in the VNC password, and viola! The next time you connect, you only need to do (c) since the options are saved.
Then click on c:\cygwin\cygwin.bat to log in, and in tcsh prompt:
tunnel atom.mit.edu vncto enable password-less ssh login to atom.mit.edu.
Then,
cp /cygdrive/c/Program\ Files/RealVNC/VNC4/vncviewer.exe /binso vncviewer can be invoked in tcsh command line.
Edit /cygdrive/c/cygwin/atom-5.bat
@echo off C: chdir C:\cygwin\bin tcsh -c "/bin/vncviewer &; ssh -L5905:atom.mit.edu:5901 vnc@atom.mit.edu"The Windows vncviewer application window should pop up as you click on atom-5.bat. Fill in "localhost:5905" in the vnc window.