# Tinyos Cygwin (Windows) New User Setup # # Assumes Cygwin (Windows) system already has TinyOS installed # (see Tinyos_Cygwin_Manual_Install.txt for how) # Works with supplemental files in tinyos-1.x_extra_files.zip tinyos-1.x_extra_files.zip includes: ------------------------------------ .bashrc .inputrc env_tinyos-1.x.sh .Xdefaults cygwin-rxvt.bat tinyos_permission_change.sh copy_commapi.sh javacomm20-win32.zip cygwinp_union_init.diff dot_emacs emacs.lnk nesc.el matlab.el nc.vim classpath.txt windows_startup.m windows_defineTOSEnvironment.m Definition: cygwin home directory is /home// --- INSTRUCTIONS --- NOTE: the files in tinyos-1.x_extra_files.zip may have been modified by the administrator who installed tinyos. Get the modified files, as some important paths might have been changed - Set up a cygwin account * mkpasswd -d -u >> /etc/passwd ~ oftentimes, the /etc/passwd file will be write protected so it doesn't accidentally get erased. In this case, do mkpasswd -d -u >> /.txt and ask your system administrator to add you (and perform the steps below) * Change your login group in /etc/passwd to the TinyOS group agreed upon Alter the number denoted by *CHANGE_THIS_NUMBER* below: phoebusc:unused_by_nt/2000/xp:13712:*CHANGE_THIS_NUMBER*:phoebusc,... look in /etc/group to see the corresponding number for a particular group (or alternatively, type 'id' at the command line to see the numbers for groups that you belong to). For example: mkgroup_1_d:*stuff*:GROUP_NUMBER: * It's not clear what type of NT access restriction consequences arise if you do not change your NT SID string to match that of your default group. I have not encountered any yet. The NT SID string is something of the form S-1-5-21-73586283-725345543-1801674531-36297 * For more information about /etc/passwd, look at: http://cygwin.com/cygwin-ug-net/ntsec.html#NTSEC-RELEASE1.1 if this page has been moved, look for the keywords: cygwin, ntsec, SID - OPTIONAL: Make your home directory not world writeable * chmod go-w /home/ - Copy .bashrc .inputrc .Xdefaults and env_tinsyos-1.x.sh and dot_emacs as .emacs to your cygwin home directory * You are free to modify them if you know what you're doing, or just copy what is necessary. ~ OPTIONAL: You may wish to set your umask in your startup scripts like .bashrc later to make sure files created are group writeable. ex. umask u+rwx,g+rwx,o+rx - Set up Matlab * cp classpath.txt ~/matlab * cp windows_startup.m ~/matlab/startup.m * to get matlab to load up TinyOS stuff, you must start matlab from ~/matlab by typing matlab & at the cygwin prompt * If matlab is a remote installation (check with your administrator) you will have to mount the server hosting matlab: Example assuming you are using the EECS license install of Matlab 6.5: 1) Go to "My Computer" and access the "Add or Remove Programs" option and select the Matlab6.5 install (this should be very quick, as very little software physically needs to be installed on your computer) 2) In the "My Computer" Window, select "Tools->Map Network Drive" from the Menu Bar. Select a drive, say Z:, and select the folder \\Winsww\sww\public (or you can browse for it under Microsoft Windows Network->Eecs->Winsww->sww->public). Click "Finish" to map the drive. 3) Check in cygwin that /cygdrive/z exists. Matlab should be located at 'matlab/matlab-6.5/bin/win32/matlab.exe' on the Z: drive. Add it to your PATH variable if necessary (this is already done by env_tinyos-1.x.sh) ex. export MATLAB_HOME='/cygdrive/z/matlab/matlab-6.5' export PATH="$PATH:$MATLAB_HOME/bin/win32" - If you are using ucbRobo * mkdir ~/ucbRoboData in your cygwin home directory Remember that since this is a shared environment, you will want to backup your files periodically.