Delobotomizing Mountain Lion

In February 2013, my beloved MacBook entered its 5th year and the last 20% of its hard-drive capacity, so it was time to upgrade. Back in 2009, I came to Macs for the first time, and was favourably impressed with how quickly and easily the thing could be set up for scientific use. This page is being written because in some respects things seem to have gone backwards in the intervening years. I get the impression that Apple now sees the open unix-based model as a mistake, and wants to move in the direction of the locked-down iPhone. I hope this isn't a long-term trend, otherwise another 4-5 years may take things to the point where scientific users like me move away from Apple. Still, at present it is possible to get things on OSX Mountain Lion sorted as they should be. Since a lot of this required substantial digging on the web to figure out how to fix things that Apple had messed up, I decided to collect the recipes here in case it is helpful to others following the same path.

The good news

First, some things have got better. The new retina hardware is nice (not so much for the screen, given the eyesight typical of my age), but because it is lighter and battery life seems to have improved.

Also, I was pleasantly surprised to find that the old graphics dongles still work, even though the mini-displayport is now a thunderbolt port. Past generations of Macs kept changing dongles, and I assumed this would continue. In passing, I note that never once in 4+ years did I connect my old macbook to anything other than VGA. All MacBook-using scientists would probably happily have paid an extra $100 to get a model with a VGA socket - Apple missed a trick there. But for the first time, the hardware is too thin for VGA, so now we really are stuck with dongles, regrettably.

The things that need fixing

The older you get, the more you realise that all change is for the worse. You do wonder if Apple ever heard of "if it ain't broke, don't fix it", since some changes seem designed just to make life harder. There are obvious irritations that surface within minutes of using the machine, which do seem perplexing: surely this OS received substantial beta testing? And did any scientific users at all make feedback about the impact of the changes? Anyway, here's what I had to do.


In astronomy, at least, everyone uses tcsh, so it's a pain that bash is the default. Go to System preferences > users & groups and right-click on your name for advanced to change shell (that's nice and intuitive: how hard would it be to have the advanced option visble?).


Non-apple apps now won't run. You have to right-click on them and say "run" in order to verify that you really mean it (thankfully this is remembered).


This now defaults to backwards to the scrollbar. Easily fixed in System Preferences>Trackpad>Scroll & Zoom (for "natural" read "un-natural"). You also need to enable tap to click and set up a right-click equivalent (I go for bottom-right corner). But the other broken item requires you to go to System Preferences>Accessibility>Trackpad Options and enable dragging. This lets you select a window and move it via double tap like you used to be able to. Now you can use all functions of the trackpad without physically clicking it.

Save as

This option has disappeared, which is madness. Everyone knows the feeling of doing experimental editing until you decide things are working and you want to save as a new version - but you frequently don't change the original. Luckily, this can be restored now (not in Lion):

Finder issues

By default, there are no scrollbars till you go to the edge or bottom of a window. Then you find the bottom scrollbar stops you accessing the bottom line of the finder window. Grrrr. The best solution is to have them always on: System Preferences>Personal>General

Go to right of devices and "show" will appear ("hide" is the default). Otherwise external drives are not seen, and you can't click to eject them. As with the hidden "advanced" in changing shell, such invisible options are a really bad idea. There's a standard visual style with sideways or downwards arrowheads for showing that menus need expanding - why didn't they just use that?

Finder won't show hidden files. You can make it do so by typing "defaults write AppleShowAllFiles TRUE" and then alt right-click relaunch on the finder icon.

Downloads list

The downloads list on the dock shows things in oldest-first, so the things you want are always off the top. Typing "defaults write use-new-list-stack -bool YES" in a Terminal window cures this.


The first big shock is the lack of X11, without which many of the basic unix applications aren't accessible. You are told to download this at . I was very nervous that, because it isn't properly integrated into the OS, some things wouldn't work - but thankfully no problems so far.

...or, rather, no insurmountable problems. I quickly spotted that the speed of key repeats (e.g. holding delete) was absurdly slow. This is true in Terminal, and can be fixed by System Preferences>Keyboard>Keyboard and turning up the key repeat slider. Also Terminal>Preferences>Advanced Visual Bell will stop you being deafened when listening to music while editing.

But the above fix doesn't deal with the slow repeat rate in xterm. For this, open an xterm and type "xset r rate 200 50" (200ms delay, 50 repeats per second). I have to wonder: did anyone in Apple ever try to edit text in either of these windows?

Once you have xterms going, you need X11>Preferences and Input to emulate 3-button mouse (i.e. alt-click does the middle button that you need to do xterm pasting). Then tick the boxes in Pasteboard to let text selected in xterms be pasted elsewhere (and vice-versa). Why aren't these things on by default?

gcc etc.

Perhaps an even bigger shock is the lack of gcc - how are you supposed to develop any programs? (presumably Apple doesn't want you to). This has got a bit better: for a while you had to visit the disgustingly named "app store" and give a credit card number to get this back. Now Apple has made a direct download of the developer tools you need:

but you still have to register as a developer and justify to Apple that you need this stuff, which I resent: it should be in by default.

aganother gnu

Now you can start to add software to do stuff. The basic gnu tools can be obtained from homebrew or fink. I used fink 4 years ago, but homebrew seems more widely used these days, so I started with homebrew. Type "ruby <(curl -fsSkL" (needs to be done under bash), and then you have homebrew and can type "brew install gv". But I found its gv didn't work, and it didn't know about xfig, so I quickly went back to fink:

This installed easily, and "fink install gv" works, as does its xfig installation. But some other essentials need to be obtained elsewhere. This is personal, but I couldn't live without fortran, tex, or gimp:

"sudo tar -xvf gfortran-mlion.tar -C /." or "sudo tar -xvf g77-intel-bin.tar -C /."


For astronomers, there continues to be lots of useful stuff in the JACH Starlink collection (not least pgplot; gaia; topcat). The current most recent version (Kapuahi) claims to be for Lion, but is fine under ML (thanks to Tim Jenness for advice on this):


OK, so Firefox issues aren't ML's fault. But if you want to use Firefox efficiently under ML (as I do), these are necessary steps. Put about:config into address and toggle browser.tabsontop to false. Then View>Toolbars>Customize to move buttons around to more sensible positions. Firefox>Preferences>Content to select GB English

Firefox (well, any browser) can be an inefficient consumer of resources when many tabs are open. Surprisingly (to me), tabs that you can't see still consume CPU as if they were in the foreground. Even when the entire browser is minimized to the dock, it still churns away. If you are away from a power lead and want to use Firefox intermittently, this is bad. When you minimize something, surely it should go into hibernation? Well, there is a way to force this, by defining the following commands in your .tcshrc file:

alias ff- 'killall -STOP -m firefox'
alias ff+ 'killall -CONT -m firefox'

Despite saying "kill", these terminal commands will just freeze Firefox till you're ready to resume (make sure you minimise it first).

Vmware Fusion

However good Macs are, sometimes you need to run Windows, and this can be done in an integrated way for a modest fee:

The new incarnation of this has a modest bug: don't know if this is Apple's fault or VmWare's, but the Windows installation comes up with capitals and LOWER CASE reversed. The solution is in Windows: Start>Programs>Accessories>Ease of Access>On-Screen Keyboard, click on the Caps Lock button (have to log out of windows for this to take, not just closing VmWare).

One reason for sticking with Windows is the interface on PowerPoint is much better than the Mac version. Plus you can use the magnificent TexPoint to do ppt equations with unmatched efficiency (this is also supposed to work with Office for Mac, but I've had trouble getting it to do so in the past):


Instructions for setting up the University of Edinburgh VPN under Mountain Lion are at

This works no bother. For the ROE network, however, we need Tunnelblick. Changes to Mountain Lion seem to have stopped this working:

Tunnelblick recommend you use the latest beta version from the above address. This didn't work for me, and it took a week of experimentation before I discovered the following succesful recipe: click on the Tunnelblick icon, go to VPN details>Settings and take DNS option "do not set nameserver"; then edit System Preferences>Network preferences>Advanced>DNS to force the use of the openDNS servers and/or (actually, any explicit nameserver will do). Then it works. Strange that Tunnelblick apparently aren't aware of this fix - maybe it's something peculiar to ROE?


The ROE IT instructions for adding printers are wrong. Go to System Preferences>Printers and click + to add a printer. IPP protocol; Address just; queue printers/printer_name; name anything.