These will be particularly useful if you’re a technical user with experience of the command line or academic software on other Unix systems (e.g. Linux) or Windows. OS X is Unix, but in typical Apple style, things are slightly different. From the point-of-view of the end-user, these differences are generally for the better and you will save time in the long run if you adopt a Mac-like way of working rather than trying to emulate Windows or Linux on your new machine.
You have two options. Apple’s Terminal application (which can be found
/Applications/Utilities, but should be dragged to your Dock if you
use it regularly) or
xterm. Terminal has tabs and other
bells-and-whistles on which I’ve come to depend and is easier to
If you use
xterm then you may want to create and edit a
file to enable some useful features and change font sizes and colours.
After making changes run
xrdb -merge ~/.Xdefaults or restart X11 to
import them. The relevant bit from my
here. Among other things, I enable the scrollbar (which
is off by default!) and change the colours to white on grey.
open command, which you should run from the Apple terminal
Terminal.app) or an X11 terminal (such as
xterm) does exactly what
double-clicking on the file would do if you did it in a GUI. In most
cases, this means it opens the file in the default application. For
example, all of these things can be done in the GUI, but you may find it
quicker to stay in Terminal (and of course you can script them):
README.txtusing the default application for text files (TextEdit by default)
open -a Mail
open -a MacVim README.txt
README.txtusing MacVim, another text editor (which may not be installed on your system).
open -a Firefox http://arxiv.org
If you drag a file or directory from Finder onto your Terminal window
then OS X automatically pastes the full path at the insertion point.
This is useful if you have found a file in Finder which you want to
refer to on the command line. (I use it for drag-and-drop attachments in
mutt email client.) This doesn’t work with
If you’re using a GUI application which views documents (e.g. TextEdit, Preview for PDFs) then there should be a small icon next to the name of the file at the top of the window. This icon is a “proxy” for the file in the Finder and behaves almost identically to the file itself. You can drag it to the Terminal to get its full path or to another Application to open it with an alternative editor or viewer. The one difference is that if you drag it off the menu bar and onto the Desktop or elsewhere in your directories then you create an alias to that file (the same as a shortcut on Windows and similar to a symbolic link on Linux).
I find this feature particularly useful if I’m looking at a PDF using the preview window in TeXShop but want to view it in a real PDF viewer such as Preview. I just drag the proxy icon from TeXShop onto the Preview icon which I keep in my Dock.
vi/your favourite editor
TeXShop is a GUI editor for TeX files which also runs LaTeX and friends for you to typeset the document, generating a PDF. Its built-in text editor is fine, but if you prefer another editor then you can use that in combination with TeXShop while retaining the features which allow you to build and preview the PDF easily.
.tex file in your favourite editor. Open TeXShop and choose
Open for Preview from the file menu. Choose the same
.tex file you
opened in your editor. TeXShop will compile the file and open the PDF if
it doesn’t already exist. You can then Cmd-Tab between the editor and
TeXShop, making changes in your editor then using the Cmd-T shortcut in
TeXShop to typeset the file.
If you would like to make this behaviour the default in TeXShop then tick the “Configure for External Editor” option in its Preferences.
If you prefer the rarely-used Caps-Lock key to map to something more
useful such as Control then you can configure this in System Preferences
under Keyboard and Mouse. Choose the Keyboard tab then Modifier Keys. If
you are an
emacs user then I feel bad for you, son, but your carpal
tunnels will thank you for this change.
connection (or on DHCP)
You may see the following error message if running DS9 without a static internet connection:
Unless you’re using XPA then this error can safely be ignored. It is, however, annoying. There are three ways to supress it. I don’t use XPA, so I’m not sure how these interact with XPA, but they do at least get rid of the error message.
/etc/hosts to add the line
where you should replace
bembo with your own hostname. You will need to
be root to edit this file.
launch ds9 from the command line like this:
ds9 -xpa local
ds9 binary lives in
DS9.app/Contents/MacOS, which you may want to add to your path or alias.)
set the shell environment variable
local. E.g. in bash add
~/.bashrc. This will work if you launch DS9 from the command line,
which picks up shell environment variables. If you launch it from the GUI
(which you may occasionally do, now it is no longer 1983), then you’ll need
to play with
so that the GUI knows about the environment variable.