If you’ve been following my posts here, you know I’ve been trying to get Ubuntu to run on this MacBook Pro I bought last year. Bottom line is, Linux works fine on the Mac, however, it still doesn’t handle the MacBook Pro 11,3’s graphics subsystems very well.
As long as I’m willing to stick with only one display, everything is great. When I add a second display, which is usually a 1080p display of some sort, scaling issues come into play that make the whole experience less than desirable.
This puts me back in OS X again. So, I’ve been working on getting OS X to behave a little less Mac-like, doing things like putting the Dock over on the left side of the screen, changing the theme to suit me, adding MenuMeters to monitor system functions in the menu bar and XtraFinder to solve some excessively annoying aspects of Apple’s Finder.
I’ve also been working on bringing some of my favorite Linux Bash scripts and utilities over, too. I chose the Homebrew sytem to facilitate this. Homebrew is like Ubuntu’s apt-get for OS X. I used it to install the command-line utility I’ve been using for years to rip my CD’s.
Yes, I still buy CD’s. I like having the physical disk in my possession. I rip them to FLAC and ALAC formats, edit the metadata and add in album art.
I use abcde. It’s a complex bash script that utilizes several other Linux CLI (Command Line Interface) utilities to copy and encode CD contents into the file format of your choice. After you have installed Homebrew, you can install abcde by opening the Terminal and typing:
brew install abcde
Abcde has a ton of options and some of them require other packages be installed to support the options you choose. It’s not at all unusual to have to install a few things before everything runs as planned. Installing these supporting utilities is as easy as installing abcde. “brew install needed_package_name” That usually does it.
I call abcde in a bash script I wrote that takes the FLAC output of abcde and creates an ALAC copy of it in another folder.
The /home Problem
‘abcde’ has intrinsic coding that expects my user’s home folder to be in /home, not /Users as it is in OS X. Normally I would just create a /home directory and link it to /Users, but OS X has a /home directory already, which it uses for some obtuse nefarious purpose related to connecting your computer to a directory service.
To get around this I learned I could remove the lock they have on /home using these commands:
sudo nano /etc/auto_master (put a # in front of /home ) sudo automount -cv
. . . and then create a symbolic link thus:
sudo ln -s /Users/* /home
This allows my Linux-based scripts to run without issue.
The xargs Delimiter Problem
After I got my /home directory issue resolved, I got this error in my script.
xargs illegal option –d
Apparently the BSD version of xargs (OS X is based on BSD) doesn’t support the –d variable. This variable allows you to specify which type of delimiter you’re looking for in the input passed to xargs. The quick fix is to use gxargs from the Homebrew package ‘findutils’. To do this, type:
brew install findutils
Once that’s done, I just add a ‘g’ to my ‘xargs’ in my script so it says ‘gxargs –d’\n’ mkdir’, and everything works great.
Abcde reads the CD, snags the metadata from cddb.org, offers a chance for me to edit it, then pulls the files off the CD and converts them to the format I specified in the config file.
I jump on Amazon and copy the album art to ‘folder.jpg’ inside the album’s directory. I then open Tagger and add the album art I downloaded to all of the songs’ metadata.
All this really isn’t as much trouble as it might sound. And I like it way better than letting iTunes screw around with my collection.
I’m going to try to put together another post outlining the packages I’ve downloaded and installed that make my life in OS X more tolerable. Until then, sigh ah nah rah.