Note. This is the version of Mac Eye pertaining to Mac OSX 10.4 (Tiger). It is archived for legacy reasons and no longer updated. For up to date information see here.
This page is maintained by James Wookey ( ).
This page is designed to provide a list of instructions, links and tips for setting up a MacOS X machine for use in the Earth Sciences (mostly seismology). It is not affiliated in any way with Bravo TV's Queer Eye for the Straight Guy, Apple Computer, Inc or any reputable distribution of Linux. Some of this information comes from O'Reilly's excellent Mac OS X Tiger for Unix Geeks. Thanks to George Helffrich for the name, possibly inspired by this Joy of Tech cartoon. *The rebranding from "Linux Guy" to "Geophysics Guy" better reflects the current purpose of the page (and gave me an excuse to make a new logo).
Bristol-specific information now has its own local-access only page: Mac Eye for the Bristol Guy. More information on using Mac OS X generally in the department is also available from John Schumacher's webpage (this is also only available internally).
This information is provided in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Any views represented here are entirely personal; they do not reflect the views of the School of Earth Sciences, or the University of Bristol.
If you find anything here doesn't work, drop me an email. Also, if you have any packages, tips or advice you think should be on here, please let me know.
sudo
. So to create the directory /usr/local2
use the command sudo mkdir /usr/local2
. You will be prompted for a password; this is YOUR password (not any separate root one). If you don't have administrator permissions on the machine you are setting up, I am afraid you might as well skip the rest of this page ...
sudo dscl . -create /users/joebloggs shell /bin/tcshsubstituting joebloggs for your username (the short Unix one, see above). I have had some reports of this not working. If it does not, it can be done with the NetInfo Manager in Utilities, or the command
chsh
. Be careful when changing directory services things, in my experience they can be temperamental.
.tcshrc
or .cshrc
file. An example of such a file is given here. Just copy it to your home directory and type mv -f tcshrc.txt .tcshrc
. This contains basic paths, some helpful environmental variables and a bit of shell-fu to set window prompts and titles.
cd dOcUmEnTs
will work as well as cd Documents
. This means that files on a standard HFS+ cannot differ only by case. The filesystem is, however, case-preserving, which is useful if you are transferring files to and from systems like Linux or Solaris which are case sensitive. The wrinkle in this is that although the OS is case-insensitive, various things in the shell are not (like filename expansion). So ls doc*
does not match the folder Documents
. So in practice the user has to be 'case-aware', even if the filesystem is not!
(10.3) If you are using Panther, you will need Apple's optional X11 package. You can get it from www.apple.com/support/downloads/x11formacosx.html.
.Xdefaults
file (in your home directory, create one if it doesn't exist). As a basic set of customisations, try:
*customization: -color XTerm*VT100.Translations: #override\ <Key>Prior: scroll-back(1,page)\n\ <Key>Next: scroll-forw(1,page)\n\ <Key>Home: scroll-back(1000,page) *XTerm*deleteIsDEL: true xterm*saveLines: 10000 xterm*scrollBar: true xterm*rightScrollBar: true xterm*jumpScroll: true xterm*faceName: Monaco xterm*faceSize: 11 xterm*visualBell: true xterm*charClass: 43:48,45-47:48,95:48,127:48These control the behaviour of the xterm. It adds scrolling, sets up the page-up and page-down keys, sets the font to something a bit prettier than the default, and sets up some useful characters to be included when double clicking. Many different X11 applications have parameters which can be manipulated in this way. If you make changes to this file you must shut down X11 and restart, or type
xrdb ~/.Xdefaultsfor it to take effect (this won't work until after the Xcode tools have been installed).
defaults write com.apple.x11 wm_ffm trueYou should restart X11 after doing this.
Fink installs software under its own /sw tree. This is a definite bonus since if you manage to mess up your Fink installed software you can just scratch the whole tree and start again!
unstable/main unstable/crypto
to the line beginning "Trees:" in /sw/etc/fink.conf
fink selfupdate
, then fink index
, then fink scanpackages
. This will take yonks as it has to compile a bunch of stuff.
tetex gv xfig psutils
gs
to reside in /usr/local/bin
. This won't be the case if you have installed with Fink, so type:
sudo ln -s /sw/bin/gs /usr/local/bin/gsto set up a link. Once this is done, it should work fine.
sudo make install
./configure --host=powerpc-apple-bsd make sudo make install
make
and configure
. If you are having trouble compiling something, and you suspect that the version of GCC is a problem (version 4+ is pretty new), you can also use gcc3.3 (Xcode tools provides this). The command to choose which version of gcc to use is gcc_select
, so use 'sudo gcc_select 3.3
' to switch to version 3.3. Don't forget to change it back after you have compiled! You can check which version is currently selected with 'gcc_select
' (without arguments).
/usr/local
appears to cause real problems with Software Update.
gfortran -o myprog myprog.f90 lib/mylib.a -lg2c -L/sw/lib(this assumes that you have g77 installed from Fink)
convert
flag to your file open statement:
open(20,file='myfile.bin',convert='big_endian', form='unformatted') close(20)This can be used for both reading and writing.
convert='little_endian'
is also valid.
sudo fink install gmt
cd /usr/local/sh source setup/shsetup make depend make make worldNow the command SH should start the SH command line interface. Try typing "xopen ;;" to make sure the xwindows stuff works properly. You should add the line "source /usr/local/sh/setup/shsetup" to your .cshrc.
swapbytes < MYDATA.QBN > tmp mv -f tmp MYDATA.QBN
/usr/local
). You will need to add the following lines to your .cshrc
:
setenv TAUP_HOME /usr/local/TauP set path = ($path ${TAUP_HOME}/bin)(as of version 1.1.5 the CLASSPATH variable need not be set).
setenv CWPROOT /usr/local/SU cd $CWPROOT/src make install cd xplot; make; cd .. make finstallThis should build all the binaries and put them in /usr/local/SU/bin.
/usr/local/SU/src/par/lib/Makefile
and use this Makefile.config. This works on the 64-bit Core 2 CPUs; you might have to make some adjustments if you are using a 32-bit machine (specifically the XDR flag in Makefile.config).
MyFolder
type:
hdiutil makehybrid -o MyImage.dmg MyFolderThis can then be burned in DiskUtility as normal. (Thanks to George Helffrich for this tip.)
/System/Library/Frameworks/Kerberos.framework
, and click install. Authenticate, and replace all files. When this is finished, ssh and afp should be working again. You may have to repeat this after subsequent Apple updates.
open mydoc.pdfopens the preview application with the PDF mydoc loaded, and
open .opens the current directory in Finder. You can also specify the action to take, see the man page for details.
One of the new features of Tiger is the Spotlight search function, which searches metadata associated with files. The command to use this from the command line is mdfind. So:
mdfind shoeboxlists all files with any metadata tag set to the value shoebox. The query can be limited by directory using the flag -onlyin. Thus
mdfind -onlyin /tmp shoeboxwill only list files in (and under) the directory /tmp. For some odd reason this command doesn't understand "." to mean the current directory, so if you want to search from where you are use:
mdfind -onlyin `pwd` shoeboxThe query can be limited to certain metadata tags only; for more details see Mac OS X Tiger for Unix Geeks.
If you go to the root directory in Finder, you will notice that you cannot see directories like /usr
, /dev
and so on, whereas you can in Terminal. This behaviour is controlled by HFS+ extended attributes. Mac OS X provides the utilities GetFileInfo
and SetFile
(located in /Developer/Tools
) for viewing and setting these attributes from the command line. This can be quite useful (for example if you want to be able to see /usr
in Finder). To do this type:
sudo SetFile -a v /usrSee the man pages for
GetFileInfo
and SetFile
for details of all the attributes and metadata you can edit.
If you want to paste multiple PDF, PS or EPS files into a single document, use the following:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=new.pdf -dBATCH file1.pdf file2.pdf file3.eps ...This generates the new combined file new.pdf