Strange Systems Problem, Strange Fix

Today I had a computer with a major problem. The machine would boot and then hang just before the login window normally appears, sitting with a near-full progress bar indefinitely. Fortunately, I was able to ssh in to the machine and check its system log, which told me that loginwindow.app was crashing.

From /var/log/system.log:

Dec 14 16:05:45 ComputerOne crashdump[450]: loginwindow crashedDec 14 16:05:45 ComputerOne crashdump[450]: crash report written to: /Library/Logs/CrashReporter/loginwindow.crash.logDec 14 16:05:46 ComputerOne launchd: /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow port /dev/console exited abnormally: Trace/BPT trapDec 14 16:05:46 ComputerOne launchd: getty repeating too quickly on port /dev/console, sleeping

Reading this led me to check the crash log of loginwindow.app, which showed the below.

From /Library/Logs/CrashReporter/loginwindow.crash.log:

Library not loaded: /System/Library/PrivateFrameworks/DisplayServices.framework/Versions/A/DisplayServicesReferenced from: /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindowReason: no suitable image found. Did find:/System/Library/PrivateFrameworks/DisplayServices.framework/Versions/A/DisplayServices: unknown file type, first eight bytes: 0x64 0x73 0x74 0x37 0x00 0x00 0x00 0x01

"Hmmm..." methoughts, "Sounds like there's a corrupt file in the DisplayServices.framework."

Indeed.

So, using the magic of scp, I copied the DisplayServices.framework from another, working machine, and voilà! The machine was able to proceed to the login window without delay. It's working fine now.

Login Slow After Long Idle Time

I've noticed when I log in to my computer at work first thing in the morning, it's very slow the first time. The machine does not go to sleep, spin down hard disks nor shutdown, so it's not an Energy Saver issue. After the first, slow login, subsequent logins are normal and speedy. But what's weirdest of all is that this does not occur on my home system, which is actually a slightly slower machine. I figure it's probably got something to do with my home account settings, or network settings, but I'll be damned if I can figure out the difference. And still, why would login times change after a long idle period. It just doesn't make sense. All I can think is maybe it's stale cache being flushed. Either way, it's a little weird and a slightly annoying way to start the day.

Theories? Anyone?

Show the Original for Multiple Aliases in the Finder

This one actually got printed on MacOSXHints. The Mac has always had an easy way to trace back to the original file of an alias. Select the alias in the Finder and choose 'Show Original' from the File menu (or just hit Command-R), and the Finder will highlight the original file. What I did not realize until recently is that this functionality also extends to multiple files.

So, if you have aliases to several files, say, in a Burn Folder, and you click 'Show Original,' the Finder will highlight all the original files. If the original files are in the same folder, they will all be highlighted in one window. If they reside in different folders, each of these folders will open in a new window with the original items highlighted. This saves a lot of time and brainpower if you want to label — or perform any action — on multiple files in your Burn Folder, or any other folder full of aliases.

Maybe this was obvious to most people, but it was certainly a pleasant surprise to me.

Mac OSX Command-Line is Partially Case Insensitive

I've recently noticed a behavior in the command-line in Mac OS X. This environment, like all *NIX environments, is case sensitive. Typing:
cd /Library

is different from typing:
cd /library

To UNIX, /Library and /library are different directories.

However, I've found that in Mac OS X, typing either of those commands will put me in the same directory. Mac's brand of UNIX seems to be case-insensitive. Weird.

Actually, this has to do with the filesystem, rather than UNIX. Mac's default filesystem is HFS+(Journaled), which is not a case-sensitive filesystem. So the Mac command-line behavior honors this since, on the filesystem, which is at a lower level than the command line, there is no difference between /Library and /library. The command-line environment will, however, mimic case-sensitivity on HFS+ filesystems to a certain degree. For instance, tab-completion of file paths is case sensitive. But typing full file paths seems to default to the case sensitivity of the active filesystem. In fact, if I ssh to a UNIX box or an NFS mount on a UFS or ext3, or other case-sensitive volume, things work as expected in the *NIX world.

Drag Titlebar Icons to Dock or Sidebar

Sometimes, when you go to a folder via the Dock or the Sidebar or a key command, particularly if you're in list or icon view, it can be a challenge to navigate up one directory and see the folder you're currently in. Occasionally I'm in a folder, and I just want to add it to the Dock or the Sidebar, without doing any navigation, but until now, I've not known a way to do this. Today I discovered that you can add the current folder to the Dock or Sidebar by dragging the little icon at the top of the Finder titlebar (the one that represents your current folder) to the Dock or Sidebar. A silly little hint, to be sure, but maybe of some use to someone.