macOS network shared drive connection options (NFS rocks, AFP & SMB suck)

I use an aging Western Digital NAS drive and have found it harder and harder to make macOS continue to connect to its shares using AFP. Even the fixes I link above are a pain to get working reliably, due to the file system’s weird behaviour these days with plist files. On a borrowed Sierra MacBook Pro it finally gave up the ghost and refused to talk any longer. Mount attempts were returning alternately errno 32 and 89, suspicions led toward .AppleDB folders on the shares before I decided enough was enough.

“Never mind” I said to myself, “Apple wants us to use Samba these days anyway, I’ll configure that instead”. AFP performance was never exactly stellar, but oh my god Samba is abysmal!!1 I’ll admit I wasn’t helping myself in that the files in question were multi-hundred gigabyte sparse disk images on the NAS, but still and all there had to be another way..

Fortunately there is; the venerable protocol from Sun named NFS.

For whatever reason, Apple don’t make it easy or obvious how to connect NFS shares, so here’s the steps to follow:

    1. On your server, set up one or more NFS shares. How to do this will depend on your server; in my case the NAS GUI Folder Shares simply has a tick-box to enable NFS for a given share.
    2. Open Terminal and in your favourite text editor, add the following line to the end of /etc/auto_master:

      /mnt/nfs auto_nfs

    3. Create a new file named /etc/auto_nfs, with the following content, all on one line. Note that the items in italics are placeholders for your specifics, and that all NFS sharenames on WD NAS drives are prefixed with /nfs/ (Update: or are they prefixed with /DataVolume/ ? A later configuration on an El Capitan client needed the latter). I spent a long time playing with the fstype parameter list to find something that worked; there are many resources online if you would like to understand each parameter in more detail:

      sharename -fstype=nfs,vers=3,rw,soft,intr,rsize=32768,wsize=32768,noatime,timeo=1200,retrans=10,proto=tcp,resvport,locallocks,noacl nfs://ip address of server/sharename

    4. Create a mount point for each share listed in auto_nfs. Do not create these in /Volumes – macOS will delete them when you restart your machine:

      sudo mkdir /mnt/nfs

    5. Finally, to inform the NFS client of the new configuration, execute the following:

      sudo automount -cv

    The extra bonus of this approach is that it uses the automount system, meaning the OS will mount any of these shares as soon as you attempt to browse to them. To make it easier to access these mount points more easily from Finder, use Go To (⌘⇪G) and type in /mnt, then drag the folder ‘nfs’ shown in Finder to your Favourites bar over on the left.

  1. H/T to the publishers of the following articles that helped me coalesce this solution:



  1. It turns out that a security change in 10.11.5 might be the cause of SMB slowness, and here’s how to disable that feature to get better throughput. ↩︎

Which Firefox tab is eating my computer’s performance?

Firefox is once again the leading web browser, now that they’ve caught up with Chrome’s multi-threaded approach for tab management. Where Chrome still has an edge though is its built in Task Manager window, showing you the resource usage of each individual tab. Yes, Firefox has the about:performance page, but in my experience it isn’t good at showing me which tab is causing my laptop fan to do a jet engine impersonation, so how to proceed when I want to cool things down?

Fortunately, Firefox’s threads are separated out in the macOS Activity Monitor. Note that I have ordered the view in %CPU descending:

macOS Activity Monitor

Whilst there’s no way to match a particular ‘FirefoxCP Web Content’ process to a particular tab, if you highlight the one that’s using the most CPU time, click the ‘Quit’ button at top-left (the one with a white X on a black circle) and select Quit on the dialog, you will kill that one process without bringing down Firefox itself.

How to know which tab you killed? Well, switch back to Firefox and cursor through your open tabs. When you reach the one you’ve killed, you’ll see a “Gah. Your tab just crashed.” message, with a handy ‘Reload’ button, so if it was one you absolutely didn’t want to lose all is not lost.

That’s it! Obviously the approach I’ve described here uses a Mac’s Activity Monitor, but I expect there are equivalent ways to achieve the same on Linux. I don’t think Windows offers adequately fine-grained process control, but I’ll be more than happy to be contradicted in the comments!

N.B. The astute will notice that there are far fewer FirefoxCP Web Content process than you have open tabs. I don’t know how Firefox metes out threads to tabs, but in my experience with this approach CPU-hungry tabs always seem to have a process all their own; I’ve not yet had one process kill take down multiple tabs.

How to unlock your iPod without resetting it

So you’ve pulled that dusty old iPod out of a drawer and find that you’ve forgotten the PIN code screen lock. You want to get into it without resetting/restoring it or having to resync all your music? Yes it’s possible, thanks to Apple’s hilarious iPod ‘security model’:

  1. Connect the iPod to your laptop
  2. Use a file manager that shows hidden files. Obviously only macOS is a challenge here – I don’t use Finder but perhaps it still hides the iPod filesystem even if you’ve set it to show hidden files. I guess either get a proper file manager or just use Terminal?
  3. Browse to the folder <whatever the iPod is called>/iPod_Control/Device. In Terminal I typed (note forward slashes before spaces in path):

    cd /Volumes/my\ iPod/iPod_Control/Device/

  4. Rename the file named _locked to _unlocked.
  5. Eject the iPod (Close Terminal first else iTunes will complain).
  6. Yep, that really is all there is to it!

Yay Bandcamp!!

Just a  quick note to say props to (the pre-eminent musicians-selling-their-wares-direct-to-the-fans site), who’ve just published a note to show that they’re significantly profitable and have been for four years. This is the context of a music industry of diminishing sales, shrinking margins and even Apple suggesting that they’re going to get out of the music download game.

Just goes to show that it’s not music sales that are broken, it’s the music industry that is broken.

Apple Music will (update: might) delete your music

It’s as simple as the title says; Apple Music™ will delete your music. As reported here, when you sign up for Apple Music, your entire catalogue is uploaded to their servers (excepting files it considers it already has a match for), then deletes all your local files.

Update: Fortunately Apple are considering this a bug and are taking extraordinary measures to fix it.

The idea is that they’ll then stream your content to you wherever you are, but this naive premise has several dire problems:

  • if you don’t have a network connection you don’t have any music.
  • Apple are a hardware company; their DNA just isn’t suited to online services; I for one would not trust my data to their cloud.
  • If you do re-download the files they’ve deleted, more problems arise:
    • you can only do so one file at a time which is a ball-ache and would take days
    • if they matched your files incorrectly, the file you download isn’t necessarily the same version of a song you had previously
    • they do not respect file format and bit depth – if you have files in a format they don’t support (e.g. WAV) you get back a 256kbps AAC file.


In summary, teh suck :0(

Privoxy for Android

UPDATE: Version support list

It has been tried several times in the past with limited success, but now confidence is high that there is a broadly compatible release of Privoxy for Android devices.

It is available at Sourceforge or here, the project’s mirror site.

This release statically links all dependencies in order to be as compatible as possible, at the cost of raising the binary’s size from ~600K to ~1.1MB; it was considered well worth the size growth in order to be applicable to the widest range of Android devices and versions.

So far Privoxy for Android has been explicitly tested on point releases of Android 4 through 6 inclusive, and on Samsung and Lenovo tablets, a Samsung Galaxy S4 phone and a Oneplus 2 phone. Feedback from the user community indicates no issues in operation on Android 7.

HTC One proximity sensor failure whilst in phone call

TL;DR – if you’re going to customise your phone, always ensure that the firmware version matches the Android version in the ROM. A mismatch can cause very slight and subtle bugs!

I noticed that my HTC One, customised with the Android Revolution HD ROM (Android 4.3) and the Team7even kernel, had a problem whereby the screen would switch off as soon as I started a phone call (even if I did not bring the phone close to my head) and would not switch back on even after the call completed; I would have to wake it up with the button.

Using a phone tester app from Play Store I worked out that the proximity sensor had stopped responding. I furthermore worked out that it was fine immediately after turning on the phone, but after the first time it entered deep sleep then the problem would express itself.

A lot of digging and testing later I have worked out that it was caused by a mismatch of the phone firmware (Android 4.1-based – v1.29.631.17) and the ROM Android version (4.3). Non-trivial to fix; I had to go back to stock everything (good thing I kept a Nandroid of my stock ROM from when I first got the phone) so as to be able to pick up the OTA upgrade to Android 4.3 (3.22.631.1). This cleanly upgraded the phone firmware, from which I’m now free to install any ROM (just so long as it is based on Android 4.3!).

Roxio Toast mis-reporting DVD DL capacity – how to fix

I wanted to burn a dual-layer DVD the other day, but confusingly Toast quoted the space available as 4.21GB, where of course it ought to be 7.92GB. This was the case regardless of whether a disk was inserted. Much playing around eventually found the cause, and a solution.

It turns out that one of the disks on a spindle of blank DVD DL (DVD+R, though I don’t think that matters) was faulty, and indeed only had 4.21GB available. Unfortunately it seems there’s a bug in Toast such that it then stores indefinitely this incorrect capacity as being what a DVD DL can store, preventing one from using the full capacity of a DVD DL thenceforth.

The solution to this is to delete Toast’s preference plist, that’s found at /Users/<username>/Library/Preferences/com.roxio.toast.plist. Once this is done and Toast it restarted, it’ll take you through the ‘first time launch’ spiel (but won’t lose your serial number registration) and, once you’re done with that, DVD DL capacity will be correctly reported once more.

Privoxy for iPhone

Privoxy is now available for download for jailbroken iPhone, supporting all iPhones and iOS releases. Download from Sourceforge here.

Jailbroken iPhone malware

Not the first, but also probably not the last. This one bills itself as ‘Enable WebGL’ on the ModMyI Cydia repository, and whilst indeed it does use some WebGL, fundamentally it is an off-screen frame that simply reloads every time you change screen on your iPhone and earns the author ad revenue each time it does so. Not too malicious then, but it still steals processor cycles and therefore battery usage and therefore your electricity bill and therefore your money :-P

Full writeup here.