Cygwin32 on NT

Setting up to use the new CYGNUS cygwin32 release b18.0:

NOTE: all of these instructions/setups (except for creating the common .bashrc file) are effective for only a single user on a single machine so must be repeated for each user on each machine. In addition they are for one particular choice of directories etc. At the end, I'll mention some things that can be customized.
  1. Make sure that you have \\d0server1\apps NT mapped to some drive number. Mine is mapped to n:. All the instructions below assume that mapping. If yours is different, then substitute the correct drive letter. You can also use the \\node\share NT device name convention. That is, you can substitute \\d0server1\apps\ for n:\ in the instructions below.

  2. In Control Panel/System, Environment tab: You may also define the following for TCL: And make sure that:
  3. exit the control panel to make the changes.
  4. create a file c:\.bashrc similar to the one I've used: Common .bashrc
  5. Create a .bashrc in your user area. This is the file source'd by the common .bashrc above. For now this can be an empty file.
  6. Pop a new Command Prompt (MSDOS) window: In principle you can do these mounts from either DOS CMD or bash but the syntax is funny in this version of bash, and depends on exactly what you're mounting. So your best bet is to issue the mount command from the DOS CMD shell.
All of these setups are "permanent". They, including the mounts, survive login sessions and power cycling the computer.


Testing your setup

At this point you can begin using the cygwin32 tools, either in the DOS command line window directly or by invoking the bash shell (just type bash in your command window).

To try out your setup, the first thing you should try is to just run bash and try the various unix commands. Bash is a superset of SH. It has many of the features of csh, tcsh and korn shell. See the references below.

NOTE: make will end with an error. If you edit (NOTEPAD works fine or use emacs) or cat "makefile", you'll find a section all: that includes a list of actions. I've rearranged this section so that the 3 items which fail are last. Each fails in a different way. objdump and exe.exe run fine outside of make. If anyone finds the problem(s), let me know.


Customizations and SoftRelTools

In the setup above there are a number of customizations possible. The most obvious customization that you'll want to do is to "mount" other disks. There are two ways to reference disks in cygwin32.

The only "magic" directory is "/", the root. Whatever directory you mount as "/" is where bash looks for it's .bashrc, .bashrc_profile and .bashrc_logout files. See the references below. And that can be anywhere! For example, to make "/" be your user area on \\d0server1\users, from a DOS Cmd window:

Another obvious customization is your "login directory". You can change it to be anywhere you wish, but be careful with the contents of the common .bashrc file. In the DOS and bash shells, your login directory is the concatenation of the two environmental variables: HOMEDRIVE and HOMEPATH. I've got mine set to C: and \jonckheere respectively. NOTE: emacs uses a variable HOME to find it's .emacs resource file. I've got that defined in terms of the other two.

One more major customization that is recommended: Since we don't have setup (ie UPS) working on NT yet, you'll need to define the cvs and D0RunII variables yourself. It's convenient to put the values that you usually use into your personal .bashrc file. That way they aren't part of the system, so they can be changed from the command line. Unfortunately they aren't available from DOS but you can't have everything. My .bashrc looks like:

#Jonckheere's .bashrc

export CVSROOT;CVSROOT=cvsuser@d0chb.fnal.gov:/cvsroot/d0cvs
lscvs() { /d0dist/dist/util/lscvs $@; }

export BFDIST;BFDIST=/d0dist/dist
export BFCURRENT;BFCURRENT=test
export BFARCH;BFARCH=CYGWIN32-NT`uname -r | cut -c1`

PATH=$BFDIST/releases/$BFCURRENT/bin/$BFARCH:/usr/bin:/usr/local/bin:$PATH
export PATH

#end of ~Jonckheere/.bashrc


References

For a quick intro to the user tools in cygwin32, including bash etc See the files in \\d0server1\apps\gnuwin32\b17-1\html\ For a very nice representation of the MAN pages in Windows HELP format, see: \\d0server1\apps\gnuwin32\b17-1\hlp\dir.hlp. An INFO version is in ...\Info\ etc.

NOTE: all of these are for the previous version of cywin32 (b17.1) but most haven't changed. When the equivalent is available specifically for b18.0 I'll install them.

For a more detailed description of the Cygnus tools see the Cygwin32 home page at www.cygnus.com/misc/gnu-win32 and the Cygnus home page: www.cygnus.com


Alan M. Jonckheere
Last modified: Tue Oct 21 09:10:32 CDT 1997