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!
$DISPLAY
automatically) so if you run a command from Terminal or iTerm which requires an X11 window, X11.app starts automatically. In fact, it is not recommended that you launch X11 via the Dock Icon any more, because this causes set up problems. Also make sure it doesn't start at Login (see the Users pane in System Preferences). Also, avoid setting your $DISPLAY
explicitly (for example in your .cshrc
file).
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!
/usr/bin/perl5.8.9
. Hit OK and then File -> Update data table and your packages should be displayed. Not that it is still a little twitchy with 10.6 at the moment (for example, table updating seems broken).
tetex
package. Other useful fink packages are gv
and 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
make
and configure
. The default Apple-supplied version does not come with a Fortran compiler.
G77 can be built from source code for the Intel Macs by applying some patches. See George Helffrich's page for instructions. There is a binary built using these patches on hpc.sourceforge.net, and a package on Fink.
gfortran -o myprog myprog.f90 lib/mylib.a -lg2c -L/sw/lib(this assumes that you have g77 installed from Fink). Order is important.
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 make xtinstallThis should build all the binaries and put them in /usr/local/SU/bin. Note that I haven't built the optional Fortran, Motif and OpenGL codes, so those might need extra fiddling with the Makefile.config file, and/or extra third-party libraries.
MyFolder
type:
hdiutil makehybrid -o MyImage.dmg MyFolderThis can then be burned in DiskUtility as normal. (Thanks to George Helffrich for this tip.) A hybrid format disk image can be created directly in DiskUtility, by using the drop down formats menu under the Menu Item New->Disk Image from Folder.
/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