Peter Shearer, x42260, pshearer@ucsd.edu
29 July 2004: This site is intended to have notes to assist me and other users in converting to the new IGPP Mac network. Related sites include:
Kris Walker's Mac OSX page
German Prieto's software page
German and Kris already know much more about this than I do. But I hope my site may still be useful for those of us who are just getting started.
These notes assume that you have an account on the IGPP Macs. This means that your user directory is stored on the IGPP server and you can login to any of the Macs that are connected to the server. This includes the Macs in the Barnyard. The NetOps people can get you set up with an account, although currently accounts are restricted to members of the fishnet group. When you login to these Macs, you use the CPU of the Mac you are sitting at, but your files continue to be stored on the server. This means that, just like the Sun network, you have the flexibility to use different machines while just having one set of files. Your user directory on the IGPP server is mirrored to a second server and backed up to tape once per day. Your user directory should not exceed 20 GB. The Movies, Music and Pictures directories are not backed up.
It;s a good idea to store your personal files in the Document directory so that they are not readable to the world. The Public directory is the standard place to put files to share with your colleagues (put them in directly or you can e-mail documents to http://igpphome.ucsd.edu/$username/Public/$filename). However, you can also change the UNIX permissions for your files and directories to have more detailed control over this. In my case, I have set up a TEXT directory in my Documents directory that has all of my word-processing files. I have created a PROG directory (at the top level in my user directory) that will have all of my programs. Just like on the Suns, this will be visible to other people in IGPP who may wish to run some of my programs, link to subroutines, etc.
If you have a laptop, your situation is more complicated (see below).
Transferring files from the Suns
This can be done using Fugu (should be in /Applications, if not you can download it for free). You can also use the secure copy (scp) command (thanks to Kris for this tip), i.e., to copy a file from my Sun account on rock, I use:
scp shearer@rock.ucsd.edu:PROG/filename .which will copy the file filename into your local directory with the same name. To copy an entire directory, use the recursive (-r) option:
scp -r shearer@rock.ucsd.edu:PROG .which will copy over the entire PROG directory.
The UNIX environment
The default Mac OS X shell is /bin/bash. Most people at IGPP use tcsh and these notes assume that is what you are running. If you are set up with bash and want to change, see German's web site for instructions.
To program like you used to on the Suns, you will need to run X11 or Terminal. You can find these programs in Applications/Utilities/. I find it convenient to have these in my Dock. X11 is less convenient than Terminal because it does not automatically have a scroll bar and cutting and pasting text is awkward. You will, however, want to have X11 running before you run Terminal so that the X graphics stuff works OK.
Your .csrhc file
Just like on the Suns, you will need a .cshrc file at the top level in your Mac user directory. Here is what mine looks like:
setenv OPENWINHOME /usr/X11R6 set path=($path .) set path=($path /usr/X11R6/bin ) set path=($path /sw/bin ) set path=($path /sw/sbin ) set path=($path /sw/igpp/bin ) set path=($path /Applications ) set path=($path /Applications/Utilities ) set path=($path /Applications/7/bin) set path=($path /Developer/Applications ) set prompt="%n@%m %h> " alias setx 'setenv DISPLAY :0:0' alias edit 'nedit' alias xcode 'open /Developer/Applications/Xcode.app' alias xt 'xterm -sb -sl 1000 &' alias xtcol 'xterm -fn 7x14 -fb 7x14 -sl 1024 -sb -bg navy -fg white -geom =120x36 -cr yellow -rightbar &' alias phone "finger -l phone@igpp | grep -i" alias logrock 'ssh -X -f rock.ucsd.edu -l shearer cmdtool' alias logmahi 'ssh -X -f mahi.ucsd.edu -l shearer cmdtool'
Explanations:
setenv OPENWINHOME /usr/X11R6 (needed for X graphics stuff)
set path=($path .) (needed so that you can execute files in your current directory)
set path=($path /usr/X11R6/bin ) (find executables in this directory)
etc.
set prompt="%n@%m %h> " (makes nicer prompt, name@machine histnum)
alias setx 'setenv DISPLAY :0:0' (alias to set DISPLAY so X things plot from terminal)
alias edit 'nedit' (alias so that edit launches nedit)
alias xcode 'open /Developer/Applications/Xcode.app' (alias to launch xcode)
alias xt 'xterm -sb -sl 1000 &' (alias so xt creates xterm with scroll bar)
alias xtcol 'xterm -fn 7x14 etc. (makes fancy colored xterm window)
alias phone "finger -l phone@igpp | grep -i" (enables phone command to get IGPP person info)
alias logrock 'ssh -X -f rock.ucsd.edu -l shearer cmdtool' (alias to login to rock)
(-X to get graphics to work right)
(-f is compression thing Ed told me about, probably not needed)
(cmdtool launches cmdtool for those who still use this)
NOTE: At one point, I just did 'setenv DISPLAY :0.0' at the beginning of my .cshrc file. However, this caused problems when I logged on remotely to another machine, like using grunt from my office. So now, I have this set up with an alias so that I can just say 'setx' whenever I start a terminal on my machine. If I don't, then I can't do the X stuff from Terminal.
For a lot more suggestions for your .cshrc file, see German's website.
Text Editors
The Mac TextEdit program is pretty limited. You will probably want to use either nedit or emacs. nedit is sort of like the Sun textedit program. emacs is like a super-charged version of vi (which is also available of course). I have been using nedit. HINT: To cut and paste in nedit, highlight the text and then click the middle mouse button. If you don't have a mouse, then hold down the option key when you click to paste. Alternatively, [control]-c and [control]-v will sometimes work!
The Mac Xcodes program is great for editing programs. This will come up automatically if you double-click on a xxxxx.f or xxxx.c file. To invoke xcode from within a Unix text window, enter 'open /Developer/Applications/Xcode.app' although you will find it more convenient to have an alias for this in your .cshrc file (see above).
Laptop Users
This assumes that your laptop is synched to the igpp server. This is convenient because your laptop is backed up and you just have one set of files no matter where you are. I have a big flat screen and keyboard in my office that I plug my laptop into when I arrive in the morning.
Synchronization is done with the ChronoSynch program, which I don't yet fully understand. I have mainly been making changes only on my laptop and then running the laptop-to-server option in the program. The program can be run manually or at a scheduled time each day.
Be aware that when you remotely login to another machine, like grunt in the Barnyard, that you will be writing to the IGPP server, not your laptop. This will make the synch problem a bit trickier if you have also been making changes on your laptop. I have not gotten to this stage yet. Hopefully somebody will write a nice guide to using the Chronosynch program before I do!
When you are on your laptop, you may not be able to see the home directories of other users the way you are used to on the Suns (i.e., 'cd ~guy' to get to Guy's directory). If not, try going to /Volumes/Users/guy. If that does not work, you will have to mount the Users directory. To do this, enter [CMD]-k to connect to the server. Then enter igpphome (igpphome.ucsd.edu if not at IGPP). Login with your password and then mount Users.