Categories
Tech

Swap Speaker Output Channels in macOS

How my cheapo Logitech speakers are setup on my desk in relation to my Hackintosh computer means the right speaker is actually on the left side of my side and the left is on the right. This is due to the 3.5mm input cable built into the right speaker not being long enough to reach the computer when positioned on the right side.

Luckily within macOS, Apple make it super easy to switch output channels, so left is right and right is left.

From Finder open the Audio MIDI Setup app which can be found in
Applications -> Utilities -> Audio MIDI Setup.app

  1. Select your current output device, in my case this is ‘USB Audio Device’ but yours will likely be ‘Built-in Output‘.
  2. Click ‘Configure Speakers‘ located at the bottom right.
  3. Then it’s simply the matter of setting the left front to the front right and the right front to the front left.
  4. Click ‘Apply‘ then ‘Done’ and close. 
  5. Test audio output channels are correct by finding a sound test video on YouTube. 
Categories
Tech

Fix LastPass Binary Component for Safari

No matter how many times I tried I couldn’t get the LastPass binary component to show as working in Safari on my Mac. Even after reinstalling the latest version of LastPass (as of August 2018) numerous times I couldn’t get the binary component for Safari working. Clicking the LastPass toolbar icon -> ‘More Options’ -> ‘About LastPass’ confirms the binary component wasn’t loading (Will show false instead of true, as I just fixed mine).

LastPass About Binary Component

I did find a post that reported a fix for this issue, however the linked fix was only documented in a set of images that are currently broken (not helpful). Luckily there is a web archive that contains a snapshot of the images, however I’ll document the simple fix here also for future reference.

Editing the Lastpass plist file

Using Finder navigate to the hidden folder (Finder shortcut = shift + cmd + g)
~/Library/LaunchAgents/

Open the com.lastpass.LastPassHelper.plist in a text editor (Needs admin privileges IIRC) and change the ‘Program’ entry that contains “REPLACE_HOME/Library/Application..” to reflect your Mac OS account’s username (which should be the same as your users home directory, e.g dan).

LastPass binary component fix

Checking the about page again should result in a working binary component.

Update Nov 2018

Incase it’s still not working double check that the LastPassHelper.app is listed in your users login items which can be found in system preferences -> users & groups -> login items.
Be sure to add it if it’s not listed.
The helper app is located at ‘~/Library/Application Support/LastPass/LastPassHelper.app’.

Categories
Tech

Mac Pro 1,1 Restart on Wake issue FIXED

Until recently my 1st Gen Mac Pro suffered from the somewhat known ‘restart on wake’ issue, but no longer as a replacement PSU appears to have cured it.

I picked up the Mac Pro a couple years ago for £50 and I haven’t done much with other than install an SSD, upgrade to 32GB RAM and use it as a gitlab runner. It’s still running the original dual dual-core Xeon CPU’s and Yosemite which is really starting to show it’s age due to apps claiming the OS is too old for them to run after updating.. This combined with you effectively had to disable sleep to have a working machine led me to stop using it for a while.

I’d tried a few things over the months to isolate the restart on wake issue.

  • Installed a fresh copy of OS X Lion (The max officially supported version of OS X for the Mac Pro 1,1) – Issue still present
  • Swapped out the 32GB RAM from eBay with the original Apple 4GB RAM whilst still running Lion – Issue still present
  • Aquired a copy of Apple Service Diagnostics (3S108) to test hardware and run memory tests – No problems found, issue still present
  • Installed a copy of Ubuntu 14.04 for Mac and upgraded to 16.04 to isolate if the issue was specific to OS X – Issue still present

After trying all these things I’d ruled out that the issue wasn’t RAM or OS related, which seemed to be the cause of most problems for others running into a similar sounding issue. I figured it was either going to be something to do with the logic board or PSU and being as the PSU’s were going for £50 on eBay I thought I’d try my luck (also the fact it made some strange clicking noises when going into/out of sleep gave me a big hint).

After swapping out the PSU following this iFixit guide the issue immediately disappeared. Sleep now works perfectly again in both OS X and Ubuntu, however I’m sticking with Ubuntu 16.04 for the moment simply as that software is still supported.

Categories
Tech

Circus Ponies Notebook is no more

Circus Ponies logo

This afternoon I went on over to Circus Ponies to download a fresh copy of Notebook for a new HackPro of mine, and was presented with this lovely notice.
Thanks for all the fish

Well that was a bit out of the blue, and with no prior notice. No emails, no heads up, no nothing.

Circus Ponies announced today that they are closing up shop, having been acquired by Google. They had been the creators of a fab piece of note taking software called Notebook. It really was a simple bit of kit that did was it was meant to do and nothing more, I used it in conjunction with Owncloud to privately host my project notes which automatically synced between my various computers. Not sure why Google would want their hands on it yet, perhaps to improve their own suite of Apps capable of note taking.

Now begins the joyous task of finding something else that will fit the bill. I had been considering for a while about hosting my own internal wiki to accomplish the same role as Notebook, the only niggle with that idea is I often find myself without a reliable Internet connection (trains) and don’t want to be sat stranded not being able to do work simply because I don’t have the relevant project notes handy.

Anyways It’s not as if the app is crippled without online functionality as it doesn’t really have any. So in the meantime I will continue to use until I can find a suitable replacement or Apple releases an update with breaks compatibility.
That really will be the last nail in the coffin for Notebook.

Categories
Tech

How to: Configure FreeNAS 9.3 for Time Machine with disk quotas

FreeNAS Logo

FreeNAS is an amazing software stack and purpose built for hosting dedicated file storage shares, so it makes for an excellent platform to host a Time Machine compatible network share for use with OS X.

I wanted to build a server that would provide a reliable backup location with data redundancy for multiple Macs, with the ability to scale the storage space to meet future needs. Something which the current line of Apple TimeCapsules don’t offer, not to mention they are expensive for what they offer.

This setup will allow any Mac on the local network to backup to a central server using Ethernet/Wireless. I have gone the extra mile and included the ability of being able to remotely backup my MacBook Pro when away in London to my FreeNAS server at home using my OpenVPN server, but that’s for another post.

To clarify this was my first time using FreeNAS, I had no prior experience with the platform before writing this guide, so anyone should be able to recreate my setup with no prior knowledge of FreeNAS. My post is an updated version of an existing article I found, but is also a result of my own trial and errors. It takes time to figure out what works and what doesn’t.

Hardware

For storage I picked up 4 x WD Red 3TB for NAS (Inc WD Express Warranty) for £91.99 each (£183.98 total). I picked the 3TB over the 4TB partly because of cost, but namely for reliability as numerous forums discuss high failure rates for the 4TB models.

I decided to utilise one of my G7 HP MicroServers as a dedicated FreeNAS server. The 2 WD Red drives were installed for storage, as well as a 32GB SanDisk Cruzer for the FreeNAS OS. I also maxed out the 16GB Kingston ECC RAM to help cope with the ZFS filesystems (the minimum recommended is 8GB).

Prerequisites

FreeNAS 9.3 Homepage
You need to have a working install of FreeNAS before you can attempt this guide. I won’t detail over the OS installation as it’s fairly simple and has been documented numerous times over online, without forgetting to mention the amazing documentation that comes with FreeNAS Doc.
FreeNAS 9.3 is the current release at time of writing and is what this guide is based on, although future versions should also work fine.

Create ‘time-machine’ Group

The first step is to create a system group for the Time-Machine share in preparation for adding users.
Under the ‘Account’ menu item, expand the ‘Groups’ item, then select ‘Add Group’. Note that in my screenshots I already have a group called ‘Time-Machine’, your system won’t have until you complete this step.
Add Group in FreeNAS for TimeMachine

An ‘Add Group’ dialog box should pop up, prompting you to create the new group.
FreeNAS Group Settings
Set the config as follows:

  • Leave ‘Group ID’ to whatever it is by default
  • Set ‘Group Name’ to ‘time-machine’

Leave everything else as default and click OK. Our newly created ‘time-machine’ group should be visible under the ‘Groups’ section now.

Create and Configure Time-Machine ZFS Dataset

Now it’s time to create the ZFS dataset which will be used to store the Time Machine backups. You must have a ZFS volume already created for this step, if you haven’t got one then you should go read through the ZFS primer in the FreeNAS docs.

Under the ‘Storage’ tab select the ‘Volumes’ menu item, then select your ZFS volume (Volume1 in my case) and then select ‘Create Dataset’.
FreeNAS Create ZFS Dataset for TimeMachine

A ‘Create ZFS Dataset’ dialog box should pop up, prompting you to create the new ZFS dataset.
FreeNAS Create ZFS Dataset Dialog
Ensure the wizard is in ‘Advanced Mode’ and then set the config as follows:

  • Set ‘Dataset Name’ to ‘Time-Machine’
  • Set ‘Quota for this dataset’ to ‘1000 GiB’

In the section option we are specifying a quota for the dataset, effectively settings the size of available disk space for our Time Machine backups. Change the value if 1000 GiB is not suitable for your setup.
Leave everything else as default and click ‘Add Dataset’. Our newly created ‘Time-Machine’ dataset should be visible under the ‘Volumes’ section now.

Now we need to configure the permissions for our ‘Time-Machine’ dataset, so that our ‘time-machine’ group has read/write access.
Select the dataset (Time-Machine) and then select ‘Change Permissions’.
FreeNAS Change ZFS Permissions

A ‘Change Permissions’ dialog box should pop up, prompting you to edit the ZFS dataset.
FreeNAS Change ZFS Permissions Dialog
Set the config as follows:

  • Set ‘Owner (group)’ to ‘time-machine’
  • Set ‘Mode’ checkboxes to the same as mine in the screenshot

Click ‘By setting the group owner to the ‘time-machine’ group, we are granting any users of that group read/write/execute permissions.

Create Time-Machine Users

Now it’s time to create a separate user to represent each computer that will use the FreeNAS server for Time Machine backups.
Under the ‘Account’ menu item, expand the ‘Users’ item, then select ‘Add User’.
FreeNAS Create User Dialog
Set the config as follows, but change the relevant information related to your setup:

  • Leave ‘User ID’ to whatever it is by default
  • Set ‘Username’ to ‘dans-macbook-pro’
  • Ensure ‘Create a new primary group’ is deselected
  • Set ‘Primary Group’ to ‘time-machine’
  • Set ‘Full Name’ to ‘Dan’s MacBook Pro’
  • Set ‘Password’ to something strong (mix of; uppercase, lowercase, numbers, 16 chars long)

Leave everything else as default and click OK. Our newly created ‘dans-macbook-pro’ should be visible under the ‘Users’ section now.

Create Time-Machine AFP Share

The last step on the FreeNAS server is to create the AFP Share that will broadcast the storage on the local network.
Under the ‘Sharing’ tab select the ‘Apple (AFP)’ menu item, and then select ‘Add Apple (AFP) Share’.
FreeNAS Create AFP Share Dialog
Ensure the wizard is in ‘Advanced Mode’ and then set the config as follows:

  • Set ‘Name’ to ‘Time Machine’
  • Set ‘Path’ to your ZFS dataset path
  • Set ‘Allow List’ to ‘@time-machine’
  • Ensure the ‘Time Machine’ box is checked
  • Ensure the ‘Default file permission’ is set to the same as the screenshot
  • Ensure the ‘Default directory permission’ is set to the same as the screenshot

Add Time Machine Backup to OS X

Finally the last step is to configure Time Machine itself to backup to the newly created share.
In OS X, select ‘Time Machine’ from within ‘System Preferences’, and then click the ‘Select Disk’ button.
Add FreeNAS to Time Machine in OS X Dialog
All being well your FreeNAS AFP share should be listed. If you select to use the disk for Time Machine you will be prompted to enter the username and password for the FreeNAS user we created previously. That’s the last step, Time Machine should begin backing up shortly after adding the disk. I recommend that the first backup be completed over Ethernet instead of wireless as the initial backup can take considerable time.

I have used this setup for a couple of years now backing up 4/5 Mac’s with no real issues. Any problems I have ran into have most revolved around sudden shutdowns of the FreeNAS server midway through Time Machine backing up due to power cuts/loss. My Storage is setup using ZFS in striped mirrored mode, meaning I get the best of both for speed and disk redundancy.

Please let me know if you found this guide useful, or spot any mistakes above.