Monday 12 April 2010

Repairing Login Parameters

I was really excited to see the announcement and release of Snow Leopard 10.6.3 in the hope that the update would resolve my (and others) long outstanding problems where I lose my Internet/Server connection on my iMac on an intermittent and recurring basis. I've written about this at length in previous posts so I won't repeat the details here, but sadly, 10.6.3 doesn't appear to have made any material difference. Time between failures is generally longer, but the problem is still there, and the only solution is a restart or a total power down and on cycle.

It was during one of these outages over the weekend that I ran into a different problem. On starting the machine back up, over half the start-up programmes had failed to load. I checked the Login Items preferences in the Account option under System Preferences, and true enough there were only six items out of the twenty or so programmes I expected.

I had encountered this problem once or twice before, and had always resorted to fixing it the hard way; by adding each of the missing entries manually and hoping that I hadn't forgotten anything important. Thinking that there must be a better and easier fix, I typed in a tentative Google search for "login items in OS X". I couldn't immediately find anything that seemed to match my particular problem, but I did find some references to a file called loginwindow.plist that I thought might be worth looking at.

I fired up the Finder and located the loginwindow.plist file in the /Users/< username >/Library/Preferences folder. Opening this up with the extremely useful PrefEdit application from Marcel Bresink showed that this file indeed was the place where the login items information was stored. Next, I opened up Time Machine and found a pre-crash version of the file and a few seconds later had all my login items restored in their rightful place. Another restart, and everything was back to normal.

I'd like to know what causes the login items to disappear, but at least this is a relatively painless way to get them back when they do go awol!