Blog Archives

How to undo a lot of Lion’s little changes using Terminal

Mac OS X Lion has been out for about a week now, long enough for a lot of us to realize that there might be a couple of essential tweaks we’d really like to make to our new systems. However, if you want to disable some of the new animations, reclaim some lost space in Safari’s bookmarks bar, or try to roll back some of the iOS-ification that has gone on, the options available in those default preference panes just won’t cut it.

Luckily though, the good old ‘defaults write’ command for OS X’s is still around to help us pop open that hood and tweak all the stuff that can’t be configured with just a point and a click. Here’s a quick roundup of a few defaults write commands that might make your early days with the new big cat a bit easier.

A few words about ‘defaults write’

The ‘defaults’ command allows users to interact with their user defaults via the terminal (located in the Applications>Utilities folder). Users can read, write, and delete user preference values that often aren’t available for configuration within an application’s normal preference panel. These commands can all be executed via the Terminal, and reversed by simply repeating the command with the original value swapped in for the replacements below. In most cases you’ll have to restart the application you’re trying to tweak before you can see the command’s effect. If you don’t want to mess around with the terminal, I’m sure many of these commands will soon find their way into an updated version of Secrets, which is a GUI preference pane for configuring this type of behavior.

The roundup

  • Animations. There are a lot of new animations in Lion. New windows will warp into existence from a single point on the screen; email replies will fold their way out of threaded conversations; and desktops will go swishing by as you move from space to space. There’s at least two of these you can put an end to right now if you want:
    • Disable Mail Reply animations: “defaults write DisableReplyAnimations -bool YES”
    • Disable New Window animations: “defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO”
  • Character picker. If you’ve ever been frustrated by hunting around in the character viewer for accented characters like the “è” or the “ë” then you probably want to just leave this setting alone. If however, if you’d rather be able to hold down a key and just have it automatically repeat, like it used to, then this defaults write is for you.
    • Disable the character picker: “defaults write -g ApplePressAndHoldEnabled -bool NO”
  • Window restore. Want to keep applications like Preview or QuickTime from restoring old windows that happened to be hanging around the last time you quit? Just switch out the name “Preview” in the command below to target other applications.
    • Disable window restore: “defaults write NSQuitAlwaysKeepsWindows -bool NO”
  • Bookmarks bar. You can get rid of both the Reading List icon and the Top Sites icon with this quick defaults write command:
    • Clean out icons from Safari’s bookmarks bar: “defaults write ProxiesInBookmarksBar ‘()’”
  • Save sheet shortcuts. Lion changes around the default save sheet shortcuts for a little added safety. If you’ve got a lot of muscle memory devoted to “Command-D” as the shortcut for “Don’t Save,” you can bring it back if you want — though to be honest, with “D” and “S” being so close together, I prefer the new settings.
    • Revert save sheet shortcut: “defaults write NSGlobalDomain NSSavePanelStandardDesktopShortcutOnly -bool YES”
  • iOS spell check pop-up. Part of the overall “iOS-ification” effort in Lion was to bring over those helpful but sometimes annoying little spell correction pop-ups you get as you type. The autocorrect can be enabled on a document by document basis with a right-click in “Spelling and Grammar,” but if you just want to kill it off altogether, you can.
    • Disable the iOS-style spell correct: “defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool NO”
  • ~/Library reveal. This last one isn’t technically a defaults command, but it’s too good to leave out. By default in Lion, user libraries are hidden. You can still navigate to the user library by holding down the “option key” while in the Go menu in the Finder, but if you want to restore ~/Library back to it’s proper place, just crack open the terminal and enter in the command below.
    • Restore ~/Library visibility: “chflags nohidden ~/Library”

I’m sure more hidden commands will surface as folks begin to settle into the new OS. I grabbed as many as I could find floating around, but if you’ve got some additional ones you’d like to share, please do so in the comments.

Related research and analysis from GigaOM Pro:
Subscriber content. Sign up for a free trial.

How-To: iPhone HDR

The iPhone has a great little camera, but it’s got serious limitations. Anyone who’s ever tried to capture a scene with a wide range of light knows that it doesn’t take much for the iPhone’s camera to completely lose the high or low end of the spectrum.

I run into this limitation all the time when I’m out on a hike and come across a vista I want to capture. If there’s any kind of sun at all, I’m forced to choose between either exposing for the foreground and losing the sky in a big wash of white, or exposing for the sky and losing the foreground in darkness. Either way, there’s pretty much zero chance of accurately capturing the scene. Unless, of course, I resort to HDR.

If you’re not familiar with the process of HDR imaging, the overall concept is really pretty simple. By merging multiple images, each individually exposed for a different point in the range of luminances from dark to light, we can form a single image that is able to display the full range. Using my example above, that means I can take one photo that exposes for the foreground and another that exposes for the sky and then combine them together to get a single image that more accurately displays the full range of light in the scene.

Because the iPhone’s “Tap to focus” feature also adjusts for exposure and white balance, setting up for HDR processing is dead simple. Obviously, it would be better if we could control exposure independently, but we have to work with what we’ve got. Simply pick two areas of the scene with the most contrast, then tap and capture an image exposed for each in turn. Be sure to keep the phone as steady as you can when taking the two images, so they will align properly when processing. Once you’ve got both images, there are a number of options for actually creating the final HDR image.

If you’ve got a copy of Photoshop CS5, it has HDR merging and toning built right in. From the File menu, choose Automate > Merge to HDR Pro, then play with the myriad of sliders you see on the right hand side to get the look you want. You can keep the image photorealistic, or push it all the way to something entirely surreal depending how artistic you feel. There’s also a super useful “remove ghosts” option in case you shifted the camera slightly while taking the individual photos.

If you prefer to do all the processing on the phone itself, there are a couple apps available. The best of the bunch is Pro HDR. Like before, you need two contrasting photos (unfortunately you’re limited to only two). You can use images already on the phone or take new photos within the app itself. After the images are merged, you can then adjust the brightness, contrast, saturation, and warmth to fine tune the image to your liking.

While all of this does extend the camera’s functionality a bit, it’s still not perfect. In the end, it’s just a 5-megapixel camera, and it’s never going to be able to match the kind of images one can get from a prosumer-grade DSLR. Constraints drive creativity though and it’s the wealth of iPhoneTography apps available in the App Store — and the users’ own imagination — that really let the iPhone camera carve out a niche for itself. I’d probably be better served by taking a more complete camera with me on my walks, but I use the iPhone for so many other things that it’s hard to argue against a multi-use item with such a great function-to-weight ratio.

How-To: Sync NewsFire on Multiple Computers

It seems like you can’t swing a dead cat these days without hitting a tech pundit eager to tell you that RSS is dead. Personally, I’m not buying it. RSS feeds and readers are the No. 1 way I stay up to date with online content, and I don’t see that changing anytime soon.

Over the years I’ve tried out a number of different feed readers including NetNewsWire, Google Reader, Fever, and on and on. Each time I switch though, I always find my way back to NewsFire. For me it’s just the perfect balance of form and function. Well, it’s almost perfect. To paraphrase Churchill I’d say that NewsFire is actually the worst RSS reader, except for all the other RSS readers. The major gaps in my mind are its inability to sync across multiple machines and the lack of an app for the iPhone. As with all things in technology though, there are a lot of ways to skin that cat.

As someone who splits his time among multiple Macs, having the ability to sync my news reader across those machines is a must. If I’m on my work machine paging through new items, when I get home I obviously want those items to show up as having been read. Out of the box NewsFire has no option for syncing but a workable solution turns out to be shockingly simple: Download the free version of Dropbox, create some symbolic links to a few key points on each computer and it’s done. Changes made on one computer are synced through Dropbox and show up on the other.

Setting up the Sync

First, move the follow folder and files into your Dropbox:

~/library/Application Support/NewsFire

You’ll then need to replace them with symbolic links. To create a symbolic link just fire up the Terminal and use the ln command. The format will be (ln -s) (filepath to target) (filepath to link), for example:

ln -s /Users/yournamehere/Dropbox/newsfiresymlinks/org.xlife.NewsFire.plist /Users/yournamehere/Library/Preferences

When you finish making the symlink for the preference file you’ll need to lock it to prevent the application from overwriting it when you quit. To lock it, just right click the file to “Get Info” and select the Locked option.

Now just use the same Dropbox account to link up NewsFire installs on your other machines and you’ll be able to stay in sync. There is one caveat: In order to add new feeds you’ll have to first unlock the .plist file on one end, make the change and then re-link it. For the most part, however, my feeds are already set and I’m really just interested in making sure that the status of an item can be passed back and forth between machines.

Obviously, this approach is not as good as baked-in support would be. But I’m hopeful that we’ll soon see an updated version of NewsFire that will not only support syncing but also close that other major gap, iPhone support. It’s been a long while since NewsFire’s developer David Watanabe dropped this tease about a possible iPhone app. I just hope he can tear himself away from Xtorrent updates long enough to show NewsFire some love.

OS X Hidden Gems

Have you ever noticed that little dark circle that appears within the close button of a document window in OS X when you have unsaved changes? Yeah, me neither. After years of diligent Mac use, this subtle little element somehow escaped me until now. I guess I remember noticing it at times but never realized it was telling me to save my work. It’s a nice touch and got me wondering about what other subtle elements I might have missed over the years.

I spent some time gathering up a number of these hidden gems and figured I’d list them here in the hopes that our readers could add to the list in the comments.

Save Dialog

When saving a file you can press / at the save dialog box to choose from any point in the file system via a file path.


You can press Shift + Ctrl + Eject to put external displays to sleep. On a MacBook this will force the system to sleep without having to close the lid.


Pressing the Option key when clicking on the AirPort icon in the menubar will display some detailed information about your wireless connection, including the transmit rate.


Pressing Control while clicking on the current location icon at the top of the Finder window opens a menu to let you select any parent location along that particular file path.


Pressing Ctrl + Option + Command + 8 will invert the color of your screen.


Pressing Ctrl + Command + D while hovering over a word in any Cocoa application (Safari, Mail, etc.) will automatically look up that word in the OS X dictionary app.

This list just scratches the surface of what I know are a huge number of hidden gems buried inside OS X. If you have any others you want to add to the list, please share it with us in the comments.

Browser Tip: Blocking Flash in Chrome

I’m cuckoo for Chrome. It’s super fast, it’s Webkit, it’s got some nice developer tool options that aren’t available in Safari and it’s combo Search Box/Address Box is so intuitive it’s completely ruined me for any other browsers that still split up those two elements.

The only thing really keeping me from moving over to Chrome full-time at this point is my reliance on Safari for ClickToFlash. Luckily, the newest Dev build of Chrome released yesterday enables support for extensions so closing this gap should now be easier than ever.

If you’re not familiar with ClickToFlash, it’s a Webkit plug-in that replaces all flash elements on a web page with a nice nondescript gray gradient and a little Flash logo.

To view the blocked Flash you just click the logo and the browser loads it in. This has a number of benefits, not the least of which are that since the flash won’t be loaded until you ask for it page load times won’t grind to a crawl, your CPU usage won’t spike, and you won’t be forced to look annoying home mortgage ads when all you do is rent.

The easiest way to replicate this bit of functionality in Chrome (now that the latest Dev build supports it) is to just grab an extension. A quick search through the extensions gallery surfaces a number of possible options to choose from.

  • FlashBlock (by Josorek) offers the most configurability with options for managing a whitelist of sites, blocking not only Flash but Silverlight as well, and customizing the look and placement of the placeholder icon.
  • Kill-Flash is based on a Jetpack port of ClickToFlash and so it looks a lot like what I’m used to seeing in Safari. Unfortunately though, it doesn’t seem to work as well as it’s pedigree might suggest. By default the extension has whitelisted some sites such as YouTube and Gmail but left out any options for the user to manage the list.
  • Another FlashBlock (this time by Ruzanow) works well enough but provides less configuration options than its identically named competitor. This flavor of FlashBlock blocks both Flash and Silverlight and provides no options pane for managing your whitelist. You can disable it for a site by right-clicking on the placeholder of a Flash element but there seems to be no way of then removing that site from the list.

I’ve been using FlashBlock by Josorek for a few weeks now, first with the latest Dev builds of Chromium and now with the most recent Dev build of Chrome, and would recommend it as the best one of the options above.

Of course you could also go with a more robust approach to block not only Flash but all advertisements using something like AdBlock but for me that’s a bit overkill. Now that Chrome has enabled support for extensions I’d be curious in hearing how others are customizing their installs of Chrome. If you have a favorite extension or user script you’ve been using please share it with us in the comments.

WP Like Button Plugin by Free WordPress Templates