Kerberos authentication on a Mac OS X workstation with Chrome

Kerberos authentication allows your computer to log into certain services automatically without you having to enter (and re-enter) your password (it's a SSO—single sign-on—service). Kerberos v5 is baked into Windows and Internet Explorer and works great with many LDAP-enabled services (for example, Drupal's LDAP module allows includes a submodule for SSO support).

Kerberos is built into Mac OS X as well, but isn't as simple to use and configure with Chrome and FireFox as it is with Explorer on a Windows workstation. You need to do two things before you can use Kerberos for authentication in Chrome/FireFox:

Can't Disable Annoying Chrome Notifications menu bar item on Mac OS X

Update (7/20/14): You can finally disable the notifications icon by selecting "Hide Notifications Icon" from the Chrome menu:

Disable Chrome Notifications on Mac OS X

Original post below.

Today, I received a mysterious notification from one of my Chrome extensions that popped up under a generic alarm bell icon in my Mac OS X menu bar:

Chrome Notifications

No thanks. I have Notification Center (built into Mac OS X), and if I wanted to see spammy notifications from Chrome extensions, I would enable them there. I know I can disable individual (or all) extensions from this Chrome Notification Center, but that doesn't make the icon go away. Nor does the standard trick of holding down the command key and dragging the icon off the menu bar.

Quickly generate secure, random passwords (Mac)

If you use Mac OS X, add the following line to your .bash_profile:

alias passme='openssl rand 48 -base64 | pbcopy'

Whenever you need a password (like when you're registering a new account or resetting your password because yet another online service you used was hacked), just fire up the Terminal and type in passme. Then paste the password that's copied to your clipboard into the password fields, and into your password manager (I use 1Password).

This alias simply uses openssl to generate a random base64-encoded string with 48 characters (you can change that value to whatever you want). If the online service you use doesn't allow 48 characters in the password field, you should file a support request with that online service, telling them they're being silly only allowing X characters in a password.

Stop letting .DS_Store slow you down

I have over 100 git repositories on my Mac, and for almost every one, I sometimes browse the directory structure in the Finder. Once I do that, I inevitably end up with a few pesky .DS_Store files that want to be added to my repo:

Pesky .DS_Store Files in Terminal during Git Status

.DS_Store files don't add anything of value to my code (they just tell Mac OS X about folder display and icons), so I always end up adding them to my own projects' .gitignore files. But when I'm working on other repositories (like Drupal, or a fork from GitHub) I don't want to add a .gitignore if none exists, or mess with the project's existing .gitignore. So what's a coder to do?

There are a couple good solutions:

Replacing the hard drive in a (non-unibody) MacBook Pro

A friend of mine had an older 2008 MacBook Pro (the kind that does not have the modern 'unibody' construction), and he noticed it was getting slower. He upgraded the RAM to max it out at 4 GB (I think it might be able to go to 6 or 8 GB if needed). But a lot of things took a long time to do, even though the Mac had a 1.86 Ghz Core 2 Duo processor (not a slouch by any means).

He asked me to replace the hard drive with an SSD, so I did. I followed this iFixIt guide, and put in a new OCZ Agility 256GB SSD, which is way faster (especially for random access, like when you boot the computer or launch an app) than the old disk drive that I removed from the MacBook Pro.

Save space by removing Photo Stream photos from your Mac

iCloud's handy Photo Stream feature is very convenient for getting the photos you've taken to and from all your devices—Mac, iPad, and iPhone. However, if you use an app like DaisyDisk to find large directories on your Mac, you may notice a very large folder inside iLifeAssetManagement (specifically, in Users/[yourname]/Library/Application Support/iLifeAssetManagement/assets/sub).

You can safely remove this folder by doing the following:

  1. Open System Preferences and go to the iCloud settings.
  2. Uncheck 'Photo Stream' (this will turn off automatic syncing back to your Mac.

Now, you should get (in most cases) a few GB of space back on your computer. Note that you can still access all the Photo Stream photos you've previously imported into Aperture and iPhoto libraries.

If you want to enable Photo Stream again, you can. You might want to delete some files out of your photo stream (do this directly in Aperture or iPhoto), just to save space. You should only really keep files you'd like shared on all your devices in there.

Glitchy Video and Freezes on MacBook Pros

I've had a few friends report strange issues with their MacBook Pro laptops. Often they would report that the video signal on either an internal or external display becomes 'glitchy' or 'jumpy'. I initially thought it could be a connection issue, as I've seen many a VGA cable that becomes loose cause weird sync issues. However, they also reported that the cursor continued to work normally, moving around when they were moving the mouse/trackpad.

MacBook Pro Graphics Glitch
Doesn't look too nice...

I typically recommend people take these sorts of issues to the Genius Bar at an Apple Store, especially since the problem isn't easy to replicate when I take a minute or two to look at the laptop—often the problem only happens after constantly using the computer for more than half an hour.

However, I finally got to experience the problem first-hand, when my sister brought me her laptop and I used it for an evening of blogging and browsing. After half an hour or so, the screen started getting quite jittery (click through to view video and read more):

Mac OS X Lion/Mountain Lion - Could not join network/timeout

I was migrating all the data from a friend's old MacBook (which was running Mac OS X Tiger) to her new MacBook Air (running Mac OS X Mountain Lion), and besides a WiFi hiccup, everything went smoothly (I had to clone the old MacBook's drive to a USB disk, then use Setup Assistant to migrate the data from that disk to the new MacBook Air).

During the Setup Assistant, I could easily connect to my WiFi network, but after the migration was complete, I couldn't connect anymore. I kept getting a pesky error: "Could not join [network]. A connection timeout has occurred." (see picture of error dialog here). Looking through Apple's forums and elsewhere was not much help, because this message seems to be a very generic 'something weird happened' error, happening in many different circumstances.

However, knowing that the keychain and old WiFi connection data from the old Mac had transferred over to the new Mac, and knowing that something might've gone screwy with the network information, I decided to do the following:

Computers are amazing

In a break from the typical kind of writing I do here, I'd like to mention a few thoughts I've had after reading some opinion pieces on the reparability (or lack thereof) of the new MacBook Pro with Retina display.

Early PCs and Macs

The first computer I owned was a scrap-parts 386 DOS-based PC. I found a working 386 processor from a broken computer, scrounged 1MB of RAM from a couple dead motherboards, found a small hard drive and floppy drive, and slapped it all together inside a huge metal case. It ran great, except when one of the components failed—which seemed to happen on a monthly basis.

My First 386 PC - Gutted
My first PC - and all the tools necessary for PC repair!

While using early PCs, I had to deal with IRQ addresses, serial port driver conflicts, floppy drive cables malfunctioning, hard drive errors, and power supply fuses breaking... not to mention the myriad software incompatibilities with various bits of hardware (and I couldn't just Google "<device name> + <windows 3.1>"!).

I even spent quite a bit of time hardware hacking with the first few Macs I owned (a Mac IIci, a PowerBook 180c, and then a few other Mac desktops and towers—more history here).

Throughout high school and college, I helped a few hundred people repair or upgrade their computers, first through 'Jeff's Computer Service' (as a side/hobby job), and then through Midwestern Mac, LLC (this site's company). I loved working on computers, and still do! From the earliest computers until the past five or so years, most computers required some level of technical knowledge to be used effectively, and required repairs and upgrades at least once or twice a year.

But times have changed; I've since dropped 'computer repair' from the services I provide, because the only service requests are for Windows users who have found some way to clutter up their computer with strange search toolbars and other junkware.

Minecraft Patching Guide for Macs

I've watched a few episodes of 'The Minecraft Project' on YouTube for inspiration, and I occasionally play Minecraft for an hour or two as a diversion (it's like LEGOs on a computer, but much more fun, because there are zombies!).

Jeff's Humble little Minecraft Farm
My humble little Minecraft farm.

One thing I've always liked is The Minecraft Project's look and feel, mostly due to syndicate's use of the DokuCraft Light texture pack. However, getting that texture pack to work along with other mods and patches (especially the automatic tool switcher mod) took some work on my Mac, and I thought I'd post my process for getting everything to work here, for the benefit of others having the same troubles (especially those getting the 'Use the patcher noob' messages where water, lava, etc. are supposed to appear):


Subscribe to RSS - mac