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 Terminal.app 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 com.apple.Mail 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 com.apple.Preview 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 com.apple.Safari 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.

iTerm 2 is a Beefed Up, Feature-Rich Terminal Replacement for OS X [Download Of The Day]

There’s nothing wrong with OS X’s Terminal, but iTerm 2 adds a bunch of features you probably didn’t realize you needed. With awesome things like autocomplete and a traversable timeline, it makes your time spent at the command line much more productive. More »







Ten ‘Easter Eggs’ to Find in Your Mac OS and Applications

While this week many people are searching for Easter Eggs or the Afikoman, here are 10 hidden settings you can find in your Mac apps and OS X. These are all small changes you can make that make using the applications and the system slightly better.

First off, you’ll need to open up the Terminal application (/Applications > Utilities > Terminal), since these ‘Easter Eggs’ have to be run from the command line. Once you’ve got that open, you can copy and paste the commands below. Each command is one line only, and you should press Return after pasting in each command. To turn these off after, replace YES with NO (or vice-versa) and repeat the command.

Allow Dashboard Widgets to be Dragged Onto the Desktop

Sometimes it’s useful to keep one of you Dashboard widgets around after you close Dashboard, so paste the following into Terminal:

defaults write com.apple.dashboard devmode YES && killall Dock

To use this ability, click and hold a widget and then close Dashboard using your keyboard hotkey (usually F4 on newer Macs).

Stop Twitter’s Compose Window Floating

The compose window in Twitter for Mac floats above all other windows at all times, which can get annoying. To stop it floating, paste this into Terminal, then restart Twitter for Mac.

defaults write com.twitter.twitter-mac NormalComposeWindowLevel -bool NO

Allow Escape to Close Twitter Compose Window

Another one for Twitter for Mac, this allows you to press Esc to close the new tweet window. Once again, paste and then restart Twitter for Mac.

defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool YES

Show Hidden Files in the Finder

There are some files which the Finder keeps hidden, but you might want to be able to see them sometimes, such as .htaccess files for web developers. To show hidden files, paste this into Terminal:

defaults write com.apple.finder AppleShowAllFiles -bool YES && killall Finder

Your hidden files should now show up.

Disable the ‘Unexpectedly Quit’ Dialog

When an application crashes, you’ll see a dialog telling you the application quit unexpectedly. This can get annoying if it happens often, so you can disable that dialog using

defaults write com.apple.CrashReporter DialogType none

You may need to restart your computer for changes to take effect. To turn this back on again, replace ‘none’ with ‘prompt’.

Enable ‘X-Ray Folders’ in QuickLook

The QuickLook feature of Finder is great, but if you use it on a folder, you won’t see anything except a folder icon. Using this hidden setting, you’ll be able to see the contents of the folder when you use QuickLook.

defaults write com.apple.finder QLEnableXRayFolders 1 && killall Finder

To turn off, replace the ’1? with a ’0?.

Show the File Path in the Finder Window Title

It’s easy to get lost in your file system, so enable this to show the path of the current folder in the title bar of your Finder window. That should make it easier to remember where you are.

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES && killall Finder

Disable iTunes Arrow Links

You’ll often see tips on how to change the arrow links in iTunes’ list view to go to your library instead of the store, but what about turning them off altogether? Paste this command and restart iTunes.

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES

Stop the Help Window From Floating

Another troublesome floating window is the Help window which appears when you click Help in most applications. To stop it floating, use

defaults write com.apple.helpviewer NormalWindow -boolean yes

Change the Desktop Picture on the Login Screen

If you don’t like the default image shown behind the login screen, you can change it to any other image using the following command. Just add the path of the image after the word ‘path’.

defaults write /Library/Preferences/com.apple.loginwindow DesktopPicture -path

Bonus: Control Even More Hidden Settings Using Secrets

Secrets is a preference pane which allows you to control even more hidden settings in Mac applications using a friendly interface, rather than having to use Terminal. You can download it here, and once installed you’ll find it at the bottom of System Preferences.

Related content from GigaOM Pro (subscription req’d):

Download the Entire Archive of Nasa’s Astronomy Picture of the Day with One Command [Command Line Hacks]

Nasa’s Astronomy Picture of the Day archive is a packed with awe-inspiring, high-resolution images of space that, incidentally, work great as desktop wallpapers. But NASA doesn’t offer an easy way to grab everything. Command-line tool wget to the rescue! More »







How to Open Two Instances of an Application in OS X [Mac Tip]

Whether you want to look at two PDF pages side-by-side or you want two Twitter accounts open at once, sometimes OS X requires a separate instance of an application to be open. Here’s how to do it with a simple Terminal command. More »







How to Find Hidden Features in Mac Applications [Mac Tip]

Secret Terminal commands in OS X (like the one that enables FaceTime’s autoaccept feature) are great, but they generally stay hidden until someone publishes them on the web. Here’s how to find an application’s hidden features yourself. More »







An Easier Way to Set Up Time Machine to Back Up to a Networked Windows Computer [Step By Step]

Last week I detailed how to set up Time Machine backups to a networked Windows computer that required a lot of somewhat complicated Terminal work. Here’s a much easier shell script that’ll do the trick nicely. More »







Speed Up Terminal by Clearing ASL Logs [Terminal Tip]

Mac OS X: If Terminal is loading slowly on your Mac (for me, slow loading in Terminal is more than five seconds), try clearing out the ASL logs. More »







Change Directories and View Files in One Custom Command [Terminal Tips]

We occasionally enjoy geeking out at the command line, so we love timesaving Terminal shortcuts. Reader the-soup suggests a simple tweak that combines two common commands into one: cd and ls, switching to a directory and listing its contents in one line. More »







How to Hide the Ping Drop-Down in iTunes [Annoyances]

iTunes 10 allows you to hide your Ping sidebar, but not the drop-down menu for its “social network for music” that shows up next to every song you click. Here’s how to kill that Ping button on Windows and Macs. More »







WP Like Button Plugin by Free WordPress Templates