Cats and Code » OS X http://blog.gorwits.me.uk by Oliver Gorwits Sat, 29 Mar 2014 23:28:44 +0000 en-US hourly 1 http://wordpress.org/?v=3.6.1 Understanding Stored Passwords in Chrome on OS X http://blog.gorwits.me.uk/2012/06/09/understanding-stored-passwords-in-chrome-on-os-x/?utm_source=rss&utm_medium=rss&utm_campaign=understanding-stored-passwords-in-chrome-on-os-x http://blog.gorwits.me.uk/2012/06/09/understanding-stored-passwords-in-chrome-on-os-x/#comments Sat, 09 Jun 2012 16:06:10 +0000 Oliver Gorwits http://blog.gorwits.me.uk/?p=757 Continue reading ]]> When my Mac’s hard disk died, I replaced it with an SSD and reinstalled OS X. At the time I also restored my user’s “login.keychain” file from backup, because I knew that’s where Chrome had stashed all my stored web site passwords. Well, it turns out I only half-knew what was going on.

After the restore, Chrome seemed not to know about any of the credentials. It was quite frustrating because Safari was working fine with the restored Keychain. As a test I entered some credentials in Chrome and they appeared in its own Saved Passwords list! I was expecting that list to be empty because documentation suggests Chrome uses the Keychain on OS X.

After some digging, what I found is that Chrome is quite sensibly engineered, but the user interface is just a little confusing (especially to those with inquiring and suspicious minds!).

This page of Chromium developer documentation explains that Chrome needs to store more metadata about a set of credentials than is supported by the Keychain attributes. Therefore, even though Chrome does use Keychain for credential storage on OS X, it still uses its own built-in (“non-secure”) LoginDatabase. My mistaken belief was that the LoginDatabase would be empty once Keychain is in use.

This can be confirmed by poking around in the local user’s Chrome application data, and opening the SQLite database called “Login Data“. On OS X this contains a row for each stored password but crucially, not the password itself (the username is there, though). Yet in the Chrome Settings user interface, you click “Managed saved passwords” and up pops a list of usernames and passwords as if Chrome was storing them. In fact it’s merging data from both LoginDatabase and Keychain.

The next confusion arises over the lack of Chrome’s awareness of Keychain entries. As explained in the same developer documentation page, until LoginDatabase has a matching entry, the credentials in Keychain are untrusted by Chrome and hence not displayed.

To be fair to the Chrome developers, it’s not an easy thing to get over to the user that the attributes of a set of credentials are split between two stores, and that you can delete or read back from one, but possibly not the other. At least now I know what’s going on, and I can also make sure always to restore the Chrome application data in future.

]]>
http://blog.gorwits.me.uk/2012/06/09/understanding-stored-passwords-in-chrome-on-os-x/feed/ 0
Hacking # in OS X http://blog.gorwits.me.uk/2011/11/30/hacking-in-os-x/?utm_source=rss&utm_medium=rss&utm_campaign=hacking-in-os-x http://blog.gorwits.me.uk/2011/11/30/hacking-in-os-x/#comments Wed, 30 Nov 2011 20:57:05 +0000 Oliver Gorwits http://blog.gorwits.me.uk/?p=717 Continue reading ]]> To get a # sign on an Apple keyboard you use the Option (or Alt) key + 3. This seems terribly klunky to me, and # is of course used quite a bit in programming and sysadmin work.

This hack remaps another key on the keyboard to produce the # character. I chose the funny squiggle that’s to the left of the number 1 key (§). This is the Section sign, used in document formatting. Just create a file at ~/Library/KeyBindings/DefaultKeyBinding.dict which contains the following:

{
    /* this will make all § turn into # */
    "\UA7" = ("insertText:", "#");
}

Any app that uses Apple’s Cocoa interface widgets for text input will pick this up after being restarted. There are some that don’t (perhaps TextMate? Not checked that one so if you know, please comment).

A lot more information about this is available at this excellent page on the Cocoa Text System, including some other neat hacks. Enjoy!

]]>
http://blog.gorwits.me.uk/2011/11/30/hacking-in-os-x/feed/ 0
Backing up Time Machine Backups from a ReadyNAS Duo http://blog.gorwits.me.uk/2011/05/02/backing-up-time-machine-backups-from-a-readynas-duo/?utm_source=rss&utm_medium=rss&utm_campaign=backing-up-time-machine-backups-from-a-readynas-duo http://blog.gorwits.me.uk/2011/05/02/backing-up-time-machine-backups-from-a-readynas-duo/#comments Mon, 02 May 2011 08:32:28 +0000 Oliver Gorwits http://blog.gorwits.me.uk/?p=474 Continue reading ]]> I’ve had a ReadyNAS Duo probably for about a year, now, and quite honestly can’t fault the little black box. Managing computer systems during the day, I have little interest in doing the same at home. The Duo provides home media sharing (DLNA and iTunes), a shared printer, Time Machine backup service, network storage for MythTV, UPS integration, and pretty good configuration and automation.

However as we know RAID is not a backup solution, so I still have to get the data onto some other media and preferably out of the house. For this we have a Western Digital Elements external USB hard drive, to which the Duo copies data when connected.

For Time Machine backups it’s not obvious how to get copies of the sparsebundles. I found that they’re stored in the Duo’s c: volume, in a folder called .timemachine. This can either be backed up with the whole of c: in one job, or separately if referred to by itself.

]]>
http://blog.gorwits.me.uk/2011/05/02/backing-up-time-machine-backups-from-a-readynas-duo/feed/ 0
WinXP to OS X Switch Notes http://blog.gorwits.me.uk/2011/05/02/winxp-to-os-x-switch-notes/?utm_source=rss&utm_medium=rss&utm_campaign=winxp-to-os-x-switch-notes http://blog.gorwits.me.uk/2011/05/02/winxp-to-os-x-switch-notes/#comments Mon, 02 May 2011 07:39:59 +0000 Oliver Gorwits http://blog.gorwits.me.uk/?p=469 Continue reading ]]> My wife has just switched her WinXP system to OS X (both on a Mac Mini), and here are some of the tools that helped along the way:

  • Abee is a free utility which helps migrate from Microsoft Outlook Contacts CSV Export to OS X Address Book. You map the CSV fields to their new counterparts and it works like a charm.
  • This article explains how to copy an iTunes configuration and library between computer systems. Since iTunes 9, there’s no need to fiddle with XML file contents, so well done Apple for making this software portable.
  • Logitech has a driver for the cordless keyboard in use. Although it helps set up the special function keys (music playback control, etc) the keyboard map is still a mess.
  • To fix the keyboard map, KeyRemap4MacBook came to the rescue. It fixes all the UK keyboard layout niggles on the Mac, and even knows about VMware.
  • For Windows XP within VMware, with a UK keyboard, the best setup seems to be to have a United Kingdom locale with a US keyboard layout. KeyRemap4MacBook then fixes things to (mostly) work. Phew, that keyboard stuff was harder work than it ought to have been.
  • The favicon-only favourites (aka bookmarks) bar in Internet Explorer is a nice feature, missing from Google Chrome. Thankfully Iconized Bookmarks Popup is a pretty good replacement (avoid the Bookmarks Bar, still beta). I had to set the horizontal and vertical spacing manually.

I’m pleased to say all the software and hardware we need works sufficiently well on OS X. We still run MS Money on Windows in VMware, but we could switch to Quicken Essentials for Mac. I bought iMovie to replace the previous film editing software (a mediocre freebie bundled with the camera). Address Book is better than Outlook, and iTunes and Microsoft Office are, natively, just as good. I hope her Google Chrome experience to be better than Internet Explorer; we’ll have to wait and see :-)

]]>
http://blog.gorwits.me.uk/2011/05/02/winxp-to-os-x-switch-notes/feed/ 0