Using Cygwin on Velocity Cluster

1. Connecting to the login nodes

The preferred method of access is via a Termininal Services Client(TSC).
  • For information on running TSC see our Access document.
    Once connected by TSC, open a Command Prompt window and follow the instructions below.
  • If not using TSC, use SSH to connect to a login node and log in.
    Your HOME directory is H:\Users\[username]
  • To customize your environment, copy H:\CTC Tools\userlogin.bat to your home directory. Whenever you connect to a login node, the file named userlogin.bat in your home directory will be executed. Look for the following two lines in userlogin.bat. Remove the REM on the second line. By doing this the cygwin setup file will be executed.

    REM to access cygwin 
    REM call H:\CTCToo~1\setup_cygwin.bat
    REM/rem for your application. Read the comments that precede these lines.
    REM invoke a different shell upon login with cygwin
    rem ----- Invoke a shell
    REM set SHELL=bash
    REM set SHELL=tcsh
    rem if exist .tcshrc (tcsh & exit)
    rem if exist .cshrc (tcsh & exit)
    rem if exist .profile (bash & exit)
    rem if exist .bashrc (bash & exit)
  • Once you have uncovered the appropriate "if", the file .bashrc/.tcshrc in your home directory h:/Users/[username] will be executed and a cygwin bash/tcsh shell prompt will appear. Otherwise you will get a Windows command prompt.
  • To get to a Windows command prompt from cygwin, type cmd.
  • To get a Cygwin prompt from a Windows command prompt type either bash or tcsh.
2. Running Shell Scripts in tcsh
    • #!/bin/tcsh at top of scripts
    • run as a normal script file
      e.g. to run a script called test1.csh,
      % ./test1.csh
3. Other notes on using Cygwin:
    • use / instead of \
    • chmod only useful for changing write file permissions
    • does not support case distinction
    • does not support the more command, but less works
    • does not support spaces within filenames.
cd h:/CTC Tools
can be legally executed by the following:
cd h:/CTC\ Tools
    • termcap entry is very limited – telnet for windows needs termcap entries for vt100.
      • vi has problems due to above-mentioned termcap situation
      • Suggestion: edit at a Windows command prompt and use unix under cygwin.
    • Suggested Reading: the Cygwin FAQ located at:
      http://cygwin.com/faq/faq_toc.html