Terminal Hacks I Can’t Live Without
Wherein I discuss two Terminal commands that make me happy.
I use Safari. I have Firefox downloaded and available for those times when something doesn’t work in Safari, but that’s become less and less necessary over the past year. However, I can’t stand the way that Safari opens new window after new window instead of defaulting to simply opening a new tab. That’s what the damn tabs are there for!
For a while I was using SafariStand to switch Safari’s behavior, but it was a hack, and would often be broken with a new update to Safari and almost inevitably broken with an operating system upgrade. So, the first thing I did when I installed Snow Leopard, well nearly the first thing, was to open up the Terminal and enter this:
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
Then hit the return key, close Terminal, and open up Safari to it’s new and well mannered behavior. There are other ways to activate this through programs like Cocktail, but if you want Safari to behave itself and stop opening window after window after window, all you need is that one command. If you decide you like Safari the stupid way, you simply open up Terminal again, enter the same command but replace the word “true” with the word “false” and you’ll be back to normal.
With Snow Leopard’s redesign of the dock menus, I found I prefer seeing the dock in the 2d version, even when keeping it on the bottom of my screen. Mostly because then the dock and the dock menus actually match. I know, I know, me and my aesthetic sensibilities. There’s no simple switch modes in OS X (though there should be, silly Apple) and again, if you have a program like Cocktail you can enable the dock in 2d mode. Once again, however, there is a simple Terminal command that will help us out:
Enter the following:
defaults write com.apple.dock no-glass -boolean YES
hit the return key, then type “killall Dock” (all that is doing is shutting down the dock, which then automatically opens again with the change applied) and return. Once again, if you want to go back to the 3d Dock, simply replace the “YES” with “N0.”
This is basic stuff for some, but I know a lot of Mac users who have never opened up the Terminal. While you always want to be very careful when you do use the Terminal, especially if you aren’t an actual Unix program and don’t really know what you are doing, finding a few of these kinds of commands can make your working environment a bit more suited to how you want to work and not necessarily how Steve Jobs thinks you want to work.
A good source for finding tips like these and other tricks and customizations for the Mac is at MacOSXHints, which is where I got both of these Terminal commands.