May 2008

You are currently browsing the monthly archive for May 2008.

Apple has just released Mac OS X 10.5.3 update and the changes are not earth shattering.

Here is a list of changes in Leopard OS X 10.5.3 posted at Apple Support.

Most important to me would be this one:

“Addresses reliability issues when performing a full restore from a Time Machine backup.”

[Hint: don't install the Leopard 10.5.3 update for a week or two if you aren't suffering from any of the problems fixed in the list of changes. Why? Remember 10.5.1? That was a fiasco that led to so many problems that 10.5.2 was quickly released to "fix the fixes". Basically, let others find the bugs within 10.5.3 and have Apple fix those before you install the update. If there are any major issues with this latest release, you'll avoid the worst of them by waiting a couple of weeks. I'm actually still using 10.5.0 since it's rock solid and the updates released since don't affect my day-to-day usage. I'd rather have reliability than having all the software that I don't use up-to-date.]

That’d be pretty annoying to use Time Machine religiously and when finally disaster strikes and your backups aren’t fully useable? Ouch.

Regardless, I’d still recommend SuperDuper! for bootable Leopard backups in concert to Time Machine file backups, since Time Machine’s backups do not give you a bootable backup disk to restore from. If Time Machine backups are all you have, you’d have to reload Leopard from DVD, then restore your settings and documents from Time Machine.

With SuperDuper! you could simply connect the drive you used via FireWire/USB, reboot your Mac, hold down the alt key, select your SuperDuper backup and be working from that drive like nothing has changed.

Even more hard-core, you could simply remove the failed drive within your Mac, install the SuperDuper disk in its place, boot, and theoretically you should be operating normally as if nothing had happened.

A good alternative browser to Safari on Mac OS X Leopard is Camino. Camino is based on Mozilla’s Gecko engine, so it operates much like Firefox on Mac, but a hell of a lot quicker.

Camino just released version 1.6.1 (May 20, 2008), which fixed stability and security issues from their last major release, 1.6, which was made available a month before that, so the latest release should be pretty solid.

Having offered Camino as an alternative to Safari, I actually not only still use Safari, but I also use Firefox, basically the three major browsers on Mac. Why the heck would I do this? Each browser has its benefits.

Camino

Best mix of speed, features, and compatibility. I still find certain javascript/ajax issues such as with Google Documents drop down menus, but not much beyond that. Did I mention blocking of all Flash Ads and Pop-ups, with exceptions or white-lists available for both? Hot.

Firefox

Best overall website compatibility. Lets face it, Apple still has a ways to go before Mac penetration gets beyond even 15% of the user base that Windows has. As such, most websites are optimized or tested for “Internet Explorer” and none other. This can lead to rendering issues on Mac browsers such as Safari and Camino. Firefox is the least susceptible to these compatibility issues, which are generally due to Internet Explorer not being standards compliant. But, that’s another story for another time, by another blogger.

Safari

Fastest browser. Faster than both Camino and Firefox. Safari is what I think of as a “light browser”: a lean, mean, browsing machine. This was the first browser for Mac and it’s the most “integrated” with the operating system. But, it lacks some “power-user” features that I can’t live without on a day to day basis. For example: text or link searching using “forward slash” or “single quote”. In Camino simply hit the “forward slash” key, start typing, and Camino will move to the next word containing the string of characters you are typing. Hitting Ctrl + G will move to the next match. The same works with “single quote” link searching. Once the link you’re searching for is found and highlighted, simply press Enter/Return and the link is opened. This is seriously efficient and fast browsing, much much faster than messing around with a mouse or trackpad and hovering the mouse pointer over the correct few centimeters of display in order to open links. Try this inline search feature on Camino and I bet you will love it.

Safari has its own search/find feature that’s pretty tight as well, highlighting the word you’re searching for and darkening the rest of the page. This is great for serious text reading on big documents, but for navigating and general surfing, I’d much rather have Camino’s inline search with keyboard navigation.

To play divx videos or movies in QuickTime / Front Row on Mac OS X, you need to install a divx codec. If you open an .avi file and see only black, you likely don’t have a divx codec installed.

Download a free divx codec for Mac here then following these walkthrough instructions on how to play divx videos on Mac.

Say you have different keyboard layouts cause you’re bilingual and need access to accents or different alphabets. The normal way to switch between these two keyboards would be to show the keyboard icon on the top Menu bar and simply click on the icon and choose the keyboard layout you wish to use.

Although this works, it’s a bit annoying to mess with the mouse in search of a tiny keyboard layout icon when you just want to hop in to a keyboard layout to get an accented character, then return back to the original that you were just using.

To the rescue: Input Menu, hidden deep within System Preferences => Keyboard & Mouse => Keyboard Shortcuts => Input Menu (greyed out)

The reason Input Menu is disabled by default is that its historic keyboard shortcut has been taken over by Spotlights: Apple Key + Spacebar.

Keyboard and Mouse Preferences - Keyboard Shortcuts - Input Menu

For me, I hardly ever use Spotlight, since I’m on the Quicksilver launcher train, which pretty much circumvents my need of Spotlight, so I’m happy to give up Command + Spacebar to be able to toggle back and forth nearly instantaneously between keyboards (French AZERTY and English QWERTY). (See the great things you can do with Quicksilver here).

If you’re hot on Spotlight, simply choose a different keyboard shortcut for either Spotlight or Input Menu => Select the Previous Input Source. You can do this by double clicking on the shortcut in question and pressing the new keyboard combination to replace it with.

Fix for “caution: filename not matched” error when trying to unzip multiple files at once in Terminal.

Solution for unzipping multiple zip files with a single command.

Open up a Terminal window on OS X, go to the directory containing the zip files and enter this command:

unzip \*.zip

The forward slash escapes (prevents) the wildcard character (the “*”) from being expanded by bash shell interpreter. In English: the files in the directory are the filenames “unzip” is trying to extract from the first file it finds when using “*”.

Example:

/myzips directory contains zip files: first.zip second.zip third.zip

Trying to run: “unzip *.zip” will cause the unzip program to take “first.zip” as the archive to play with, and will look for files “second.zip” and “third.zip” within “first.zip” to expand/extract. Obviously not what you want to do.

Not escaping the * character will result in errors like: “caution: filename not matched”.

microphone

Think you have a loud or noisy CD/DVD drive in your MacBook / MacBook Pro?

Apple was kind enough to record the noises from SuperDrives installed in MacBooks so that we can compare our drive sounds to that of “normal” SuperDrives.  In my opinion, the SuperDrives make horrible loud clunky noises completely unbefitting of sleek laptop like the MacBook or MacBook Pro

Listen and compare your cd/dvd drive noise to these official Apple “SuperDrive” sounds.

I’m not sure why, but I can’t help but laugh when hearing these sound clips.

(Photo: Ben McLeod)

First find your current sleep setting by opening Terminal in OS X and entering this at the prompt:

pmset -g | grep hibernatemode

That should return you something like “hibernatemode 3″. Remember this number, send an email to yourself, write it down on a scratch pad, whatever it takes to remember your default mode. Mode 3 keeps your RAM powered during sleep to allow super fast wake-up, but also writes an image file of all memory onto disk in case power is lost.

To change the hibernate safe sleep setting to not create an image file on the disk, i.e. mode 0 (mode zero, not the letter ‘o’), enter the following in a Terminal window:

sudo pmset -a hibernatemode 0

Enter your password when asked to do so. This prevents Safe Sleep from saving your memory contents to disk, in large part the cause of not being able to wake MacBook’s from sleep.

If you’d like to get back about a gigabyte or more of disk space, delete the memory image file with the following Terminal command:

sudo rm /var/vm/sleepimage

Macworld has a great article with more information about safe sleep and hibernation on MacBooks.

Open the lid and nothing? Tap keys, change brightness, close and re-open lid and your MacBook still in sleep mode?

Solution: Turn off Safe Sleep. Or use Smart Sleep.

If you open your MacBook lid and notice that you can’t wake your MacBook from sleep, it’s because of the Safe Sleep system Apple designed. This system puts all your current memory (your RAM) onto the disk, so that it can power down the RAM, save energy, and keep the current working state of your computer, even if you ran out of battery power, changed batteries, etc.

Problem is, it’s slow. And buggy. Often when waking from sleep by opening the lid, the MacBook will remain in sleep.

My solution to this: don’t use Safe Sleep. Unless you’re constantly working on battery power and hate plugging in, you likely won’t ever notice you’re not using Safe Sleep’s hibernate to disk mode.

Here are some instructions on how to turn off Safe Sleep on a MacBook Pro Leopard or Tiger to avoid wake-up problems.

If you still want to use Safe Sleep with disk caching of RAM, use Smart Sleep by Patrick Stein. This software adds a preference pane to your Mac, allowing you to not use disk hibernation until you reach a low battery level, say 20% remaining battery.

Find Terminal in Leopard or Tiger

Open Finder

Go to Applications => Utilities

Double click on Terminal or highlight Terminal and Apple/Command Key + Arrow Down.

In a follow-up to my previous post on the best laptop screen - MacBook Pro 15″ LED backlit screen, I’ve discovered why the laptop screen is quite different in displaying the same photo as compared to something like a Samsung SyncMaster 206bw which I use as my secondary display.

It comes down to screen gamut [pronounced gammet], or how many colors a display can accurately represent. For example, a black and white display has less gamut than a color CRT with a dead electron gun, which in turn has less gamut than a fresh new Apple MacBook Pro LED screen.

Viewing a dedicated display like the Samsung side-by-side with any laptop screen, will make the laptop screen look “washed-out” in terms of color, simply because the laptop screen cannot produce as many different colors. At extremes you’ll have one color replace another, for example, light reds replacing what should be orange hues (which is the most notable deficiency in colors of the MacBook Pro LED screens).

This doesn’t mean the MacBook Pro LED screen is bad, it’s actually the best in terms of color gamut amongst all of the previous Apple laptop screens.

For a more in-depth discussion of color gamut on the MacBook Pro 15″ LED displays, check out these posts from James Duncan Davidson and Rob Gailbraith.

While watching a tv series encoded with divx, in avi package format on a Macbook installed with Leopard, I noticed that Front Row would randomly crash and return to the desktop.

First step in investigating what was causing the crash is to look at the syslog.

  • Open up Terminal (Applications => Utilities => Terminal)
  • Go to the /var/log directory (cd /var/log)
  • View the syslog file (less system.log)
  • Go down to the latest entries in the log file (Shift + G)
  • Look for a line saying “Saved crashreport to /Users/[username]/Library/Logs/CrashReporter/Front Row_2008-04-27″ or something to that effect. The username will be your Mac OS X username and the date attached to the Front Row text will of course be different.  These crash logs are created whenever a program you are running stops for some unknown reason (i.e. a crash).
  • Press “q” to quit the “less” program.
  • Goto the CrashReporter directory (cd /Users/[username]/Library/Logs/CrashReporter). Replace [username] with your username.
  • Open the latest Front Row crashlog with “less” (less Front Row_2008_2008-04-27). If you’re having trouble typing the name, just hit the Tab key, which will attempt to fill in the blanks as best as possible, creating spaces with escape characters.
  • Look for the line saying “Crashed Thread” and note the number beside it. In my case it was “22″.
  • Now use the search function within “less” by hitting forward slash “/” then typing “Thread 22″. This is case sensitive so make sure you capitalize “T” in Thread.
  • You should see Thread 22 Crashed: followed by what file was related to the crash of Front Row.  In my case it was listed as “com.yourcompany.XviD_Codec”.

If you continue reading, you’re doing the following AT YOUR OWN RISK.  You can royally screw up Front Row and any type of movie/video watching by performing the following, so if you have any qualms, do not perform the next steps.

My fix was to move the AppleIntermediateCodec.component and AppleMPEG2Codec.component files from /Library/QuickTime to a backup directory and replace it with Xvid_Codec 1.0 alpha.component which is detailed in another post on how to watch xvid encoded avi files on Mac OS X. To move these two files elsewhere, create a backup directory on your home directory (mkdir ~/QuickTime_backup) then use the “mv” command (mv AppleIntermediateCodec.component ~/QuickTime_backup/) (mv AppleMPEG2Codec.component ~/QuickTime_backup). Now install the alpha xvid component for Mac.

Make sure QuickTime isn’t running, or fully Quit QuickTime and then start Front Row and attempt to watch the same file that was causing Front Row to crash before.

The reasoning behind removing these two QuickTime codecs is that they aren’t on another MacBook book of mine, which doesn’t have Front Row crashing problems.  That’s the only logic I have behind this fix.

So far, the change has worked.

Best of luck.

With large files, sometimes it’s easier handling them split into many smaller files.  In order to rejoin the files one typically uses a file joining program.  I came across two that could possibly perform file joins: MacHacha and Split & Concat.

Turns out that MacHacha has some issues, perhaps related to Leopard, as after reaching the last file of a 75 part file series, it simply hung on searching for the next part (which didn’t exist).

Split & Concat on the other hand, handled the files without issue and has the option of specifying the output directory though the Options button before the start of a join session.

My vote goes to Split & Concat for file joining software on Mac OS X.

To reduce the temperature of my MacBook Pro I use smcFanControl by Hendrik Holtmann.  Normally my MacBook Pro would run somewhere close the 55-60C mark without doing anything intensive, say a 10-15% average CPU utilization.  I found this somewhat hot for my tastes, especially when using the built in keyboard where it would be uncomfortably hot to touch the speaker/heat dissipation grilles on either site of the keyboard.

I generally run the two internal MacBook Pro fans at 2600rpm each to keep the temperature 50C or below, depending on ambient temperature.  The cost is a little fan noise which is noticeable in a dead quiet room.  If you’ve got any music or background noise, you won’t notice it.  Either way, it’ll blend into the background quickly since it’s “white” noise anyways.

I’m unsure which version is the latest for smcFanControl so here’s another link to smc Fan Control version 2.1.2 in case it’s more recent than the above link.

This post was due to a comments discussion on how to turn off the macbook pro display when using an external display for Front Row.

To use an external display only when watching a movie on an external TV or projector it’s nice to not show the video on your Mac’s main display since it’s distracting. Closing the lid on a MacBook Pro makes it go to sleep and the only way to prevent the MacBook from sleeping with the lid closed is through some serious kernel hacks.

Apple’s Front Row has a feature that makes the secondary screen will go blank and dark when the Front Row is started. The trick to make your main MacBook display go blank when outputting Front Row to the secondary screen is to make your secondary screen the primary display. This is done through System Preferences => Display Preferences.

When you have the DVI to Video Adapter connected to your MacBook Pro and connected to a TV or other type of external display, open up Display Preferences. Within Display Preferences, choose Arrangement. You should see two blue squares that represent each display, main and secondary. On the main display you’ll notice a bar along the top. Simply click and drag this bar from the Main Display (usually on the left and large) to the secondary display, to make it the Primary or Main display. Close Display Preferences. Launch Front Row by hitting Apple key + Esc or by hitting the Menu on your Apple Remote. Front Row will launch and turn off the MacBook main display so that you can enjoy a distraction free viewing experience for your movies and videos on an external display.

Enjoy.

Apple Spotlight PDF ATSServer

I recently copied over a set of PDF ebooks from an external drive to my “home” folder (usually your login name under Places within Finder) and a few minutes after that my Macbook Pro fan started to go nuts and I noticed my CPU temperature was up near the 70 degree C mark.

Cutting to the chase (fix): Open up System Preferences -> Spotlight Preferences -> Click Privacy button -> Click + button at bottom left and add the directory where you’ve just put your PDF files. In a few minutes, ATSServer will stop going nuts.

I quickly loaded up Activity Monitor (found under Applications -> Utilities in Finder, if nothing shows up after starting Activity Monitor, hit Apple key + 1), sorted processes by CPU descending (by clicking on the CPU column) and noticed that a process called ATSServer was hitting about 60% CPU time with mdworker below it at about 23%.

These two processes were really chewing up processor time and I had no idea what I had done to set this off, having never seen ATSServer before, I googled “What is ATSServer?” and found a forum thread on support.apple.com where people were batting around theories of what was causing ATSServer to go nuts.

For me it turned out to be the PDF books that I had just copied over to my Documents folder. Turns out that Spotlight, Apple’s file and text indexing service, tries to parse text in files, make thumbnails of pdfs (dear god),
and many other things including the kitchen sink.

Here’s an excerpt from Apple on Spotlight (warning PDF file) when they released Spotlight with Tiger (OS X 10.4):

Spotlight is comprehensive. Spotlight searches across your documents, images, movies, music, PDFs, email, calendar events, and system preferences. It can find some- thing by its text content, filename, or information associated with it, known as metadata. This allows you to find a photo by entering the brand of camera that took it, the name of the person who emailed it to you, or the date you last opened it.

I guess Spotlight is a bit too ambitious when it comes to PDF files. Simply copying over 300MB worth of PDF docs shouldn’t cause Spotlight to lose its mind. My guess is that it’s attempting to parse all the text within the PDFs and put those results into Spotlights database. Result: nastiness. PDF’s are exactly “fun” to parse I guess.