MAC OS X TIPS
Document Sample


MAC OS X TIPS
Matt Swain
Mac OS X Tips! 1
This is not a copyright page.
This is a Creative Commons page.
Attribution-Noncommercial 3.0 Unported
You are free to to copy, distribute and adapt this ebook.
In fact, why don’t you send it to everyone you know?
Just make sure you give it to them for free.
You can even take bits and put them on the web, or use them make your own eBook.
Just make sure you leave a link back to Mac OS X Tips.
Send any comments, suggestions or angry rants to matt@macosxtips.co.uk
Mac OS X Tips! 2
TABLE OF CONTENTS
Introduction! 4
Essential applications! 5
Finder! 7
iTunes! 13
iWork! 23
iLife! 26
AppleScript and Automator! 30
Terminal and Utilities! 38
Security! 46
System Preferences! 50
GeekTool! 54
Mail! 59
QuickTime! 62
Dock, Exposé and Dashboard! 63
Preview, Printing and PDFs! 70
Safari! 72
Firefox! 76
General Tips! 79
Mac OS X Tips! 3
MAC OS X TIPS
Matt Swain
Introduction
I started Mac OS X Tips in June 2006, with the first ever tip “Auto-Tab bookmarks,” which ex-
plained how to set a folder of bookmarks to automatically open in tabs when clicked in Safari.
Three years and over 2 million pageviews later, there are now over 200 tips, covering subjects
ranging from getting to grips with Terminal to setting up Mail.
Surprisingly, most of the tips on the site have managed to stay relevant for a long while, so
you’ll find a lot of what’s in this book is also available in the archives of the site. If you are a
regular reader, don’t worry though, there is plenty of new stuff here too.
Who should read this book?
This book is aimed at anyone who wants to get more out of their Mac. It doesn’t require any
previous knowledge, but you should be reasonably comfortable using a computer. It’s not going
to teach you how to open up Safari and load a website, and it’s not going to tell you how to
write a letter in Pages (Although there are whole chapters devoted to both of those applica-
tions). If you are a complete beginner, you will definitely be better off with a manual style
book. The best one, without a doubt, is Mac OS X Snow Leopard: The Missing Manual by
David Pogue. There are also beginners books for specific applications like iMovie and iWork.
This book is for people who want to learn how to use their Mac more efficiently and save time
and effort when doing everyday tasks. It is for people interested in changing hidden settings
and customising their applications. It is for expert Windows and Linux users who want to be-
come just as familiar with a Mac. And finally, this book is for those self-proclaimed Mac ex-
perts. Even if you think you know it all already, I can guarantee you will find something new
here.
The website
Even though everything in this book is completely up to date now, it is unlikely to stay that
way forever. The best way to keep up to date is to visit the Mac OS X Tips site. It is continu-
ously updated with new articles that are just like the tips in this book. If you want, you can
subscribe via RSS, Twitter or email.
Mac OS X Tips! 4
Essential applications
Before we start, here is a quick list of all the applications that I use on a daily basis. Not every-
one will need all of them, but it’s worth having a quick look through. I’ve also included all the
applications that there are tips for in this book but don’t come bundled with your Mac. Pretty
much all of these can be downloaded for free, but at the end I’ve included some you have to
pay for.
PERIAN AND FLIP4MAC
These are two free plugins for Quicktime that add a lot of power by allowing it to open loads
of different file formats that it wouldn’t be able to otherwise.
VLC
VLC is a free video player that can play pretty much everything you throw at it, even cor-
rupted or partially downloaded movies. I use it as a backup for everything QuickTime can’t
handle.
CLICKTOFLASH
This plugin for Safari stops embedded Flash media like adverts, videos and games from loading
automatically when you open a web page. A single click will load the flash you want, and you
can create a list of sites where Flash loads normally.
HANDBRAKE
If you do any video conversion, this is the application for you. It looks a bit daunting at first,
but it’s great for converting random videos from the internet into iPhone or AppleTV format.
GROWL
Growl is a great piece of software that shows you popup notifications from other applications.
For example, it can notify you when Safari has finished downloading a file, or when you have
received an email.
GEEKTOOL
GeekTool allows you to display little bits of text, images or information on your desktop. It is
by no means an essential program, but it fills quite a cool niche and is one of my favourites.
FIREFOX
Eventually you may come across a site that doesn’t work properly in Safari, so it’s worth having
Firefox installed too.
Mac OS X Tips! 5
1PASSWORD
This is is an application that integrates with Safari and Firefox on your Mac (and iPhone) to
remember all your passwords. It has a strong password generator and allows multiple identities
for a single site.
I WORK
The three iWork applications, Keynote, Numbers and Pages aren’t really essential to have on
your Mac, but they make an extremely good alternative to Microsoft Office. I’ve included
iWork here because it’s very popular and there are loads of tips for it later on in this book.
I LIFE
The great thing about the iLife applications is that they come free with your Mac, and should
already be installed. However, upgrades are not free, and even though most tips should work
with past versions, it might be worth upgrading to the latest version if your’s is really out of
date.
MICROSOFT OFFICE
While iWork is quite good at opening and saving files in Microsoft Office format, if you really
want your documents to be 100% Windows compatible you are going to have to go for
Microsoft Office instead.
V M WA R E F U S I O N
If you have some software that only runs on Windows, VMware Fusion will allow you to run it
on your Mac.
MAC OS X SNOW LEOPARD
Finally, if your Mac is more than a year old, chances are you don’t have the latest version of
Mac OS X. The Snow Leopard upgrade is a small one, and most people will get by fine sticking
with Leopard. However, the upgrade is relatively cheap, and it is required for some of the tips
in this book.
Mac OS X Tips! 6
FINDER
Folder previews in Quick Look
This is my favourite hidden feature in Snow Leopard. Once enabled, using Quick Look by se-
lecting a folder and pressing the space bar will show you a preview of that folder’s contents in-
side a translucent folder icon. The previews of the files inside the folder also cycle through so
you can see all of them. To enable it, just open up Terminal (located in Applications/Utilities),
paste the following line and then press return.
defaults write com.apple.finder QLEnableXRayFolders 1
You will need to restart the Finder, either by typing killall Finder into the Terminal or by
Control-Option-clicking on the Finder in the Dock and choosing Relaunch.
Show hidden files
There are a lot of files and folders on your hard drive that are hidden from you by default. If
you want to see these files, use the following Terminal command.
defaults write com.apple.finder AppleShowAllFiles TRUE
For changes to take effect you will need to restart the Finder by typing killall Finder into the
Terminal or by Control-Option-clicking on the Finder in the Dock and choosing Relaunch.
Replace TRUE with FALSE to hide hidden files again.
Mac OS X Tips! 7
Disable File Extension Warning
If you often find yourself changing file extensions, you might be tired of the annoying "Are you
sure you want to change the extension..." dialog box. For example I often end up changing the
extensions of text files from .txt to .html.
Luckily, you can disable this warning quite easily. Just go to the Finder Preferences (under the
Finder menu in the top left) and click on the Advanced tab. In here, un-check the checkbox
"Show warning before changing an extension".
Now whenever you change a file extension, you won't be presented with an "Are you sure"
warning.
Change the default new folder name
When you create a new folder in the Finder, it is automatically named "untitled folder". This
annoyingly buries deep within a list when sorted alphabetically, rather than at the top or the
bottom where it is easy to find. Luckily, it is quite simple to change it.
In the Finder, choose "Go to Folder" from the Go menu located in the menubar at the top of
the screen. In the box that appears, paste the following line:
/System/Library/CoreServices/Finder.app/Contents/Resources/English.lproj/
Find the file named "Localizable.strings" and drag it to the Desktop to make a copy. We are
going to edit this copy on the desktop, and then copy it back into the English.lproj folder to
replace the original version. You might want to make an additional copy of the file as a backup,
just in case anything goes wrong.
Open up the desktop version of the localizable.strings file using TextEdit. You might have to
do this by dragging it to the TextEdit icon in your dock. Scroll down to the line that starts with
N2. it should say the following:
"N2" = "untitled folder";
Now you can change the words "untitled folder" to anything you want. For something at the
start of the alphabet, you could simply put "*untitled folder".
Once you are done, save the file on the desktop and quit TextEdit. Finally, drag the file back to
the English.lproj folder that you copied it from. Click Authenticate and type in your adminis-
trator password.
For changes to take place, you will have to relaunch the Finder, which can be done by holding
down Control and Option, clicking the Finder icon in the Dock, and choosing Relaunch from
the menu.
Mac OS X Tips! 8
Using exactly the same method, you can change the suffixes for duplicates and aliases. The only
difference is that you have to change the line starting with N3 or N4.
"N3" = "^0 alias";
"N4" = "^0 copy";
In these cases, "^0" takes the place of the original file name. So, for a duplicate, the default is
"^0 copy", meaning the duplicate of "file.doc" is "file copy.doc". As above, you can change this
to anything you want. "copy of ^0" would mean the duplicate would work better with file ex-
tensions, giving "copy of file.doc". However, it wouldn't be next to the original file alphabeti-
cally.
Note that any changes you make may not survive a system update, so you may have to repeat
this process again.
Change the Finder's sidebar labels
The labels in the Finder sidebar (Devices, Places, Search for, etc.) can be changed in exactly the
same way as the untitled folder. First, choose “Go to Folder” from the Go menu and type in
the same location:
/System/Library/CoreServices/Finder.app/Contents/Resources/English.lproj/
This time, locate the file localizableCore.strings and drag it to the desktop. Open this up in
TextEdit, and look for the following lines.
"SD5" = "DEVICES";
"SD6" = "SHARED";
"SD7" = "SEARCH FOR";
"SD8" = "PLACES";
You can change these to anything you want, then save the file and drag it back to the
English.lproj folder. As before, relaunch the Finder for changes to take effect.
Make the Most of Quick Look
To use Quick Look, just select a file in the Finder and hit the space bar. It allows you to watch
videos, listen to songs, view presentations and flick through the pages of a PDF document
without even opening it. Here are a few ways to enhance Quick Look.
INDEX SHEET
If you select multiple files before activating Quick Look, you'll just be shown a preview of the
first file. There are buttons to flick forward and backward through the different previews, but
much more interesting is the Index Sheet button. Clicking this is just like using exposé, only
with the previews rather than windows. The previews will shrink down to show you them all in
a grid. Clicking on one of the thumbnails will expand that one.
Mac OS X Tips! 9
PLUGINS
Quick Look works with most file formats straight away, but for those that don't work there are
plugins available. There's a great list of them here. In my opinion, one of the most useful is
Folder Viewer. This makes Quick Look list the contents of a folder, instead of just showing a
huge folder icon.
OTHER WAY S T O A C T I VAT E QUICK LOOK
There are many ways of activating Quick Look. The simplest and most well known is hitting
the space bar, but there is also the official keyboard shortcut, Command-Y. If you would prefer
to use the mouse to invoke Quick Look, you can add a button to the Finder toolbar that does
just that. With a Finder window open, choose Customize Toolbar from the View menu and
drag up the Quick Look button. Quick Look is also available in the File menu and in the Con-
textual menu that appears when you right-click on a file.
JUMP STRAIGHT TO SLIDESHOW MODE
Some people have complained that the slideshow function in the Finder has disappeared. Ac-
tually, it has just become a part of Quick Look. When using Quick Look on multiple images,
there is a play button at the bottom to start a slideshow. However, there is an easier way to
jump straight to slide show mode. Just add in the Option key to the activation methods listed
above. Command-Option-Y will start a full screen slideshow, and if you hold Option when
looking in the File menu you will see Quick Look has changed to Slideshow. If you have acti-
vated the toolbar icon for Quick Look, holding down option changes it to a play button that
starts a slideshow when clicked.
ZOOMING
If you activate Quick Look on an image, there are a number of ways in which you can zoom.
Hold down the Option key and you will notice that the cursor changes to a magnifying glass.
Now, using the scroll wheel you can zoom in and out. Alternatively you can Option-click to
zoom in. To zoom out, hold Option and Shift while clicking. For PDFs this method doesn't
work for some reason. However, you can still zoom using the Command-- and Command-+
keyboard shortcuts.
Mac OS X Tips! 10
KEYBOARD N AV I G AT I O N W I T H QUICK LOOK OPEN
While you are previewing a file with Quick Look, you can still use the keyboard to navigate to
other files. In column view this is easily done with the arrow keys. In the other views, use
Command-DOWN and Command-UP to go into and out of folders.
EXAMINE TRASHED FILES
It is impossible to open files in the Trash without first moving them out onto the Desktop. So
in the past, if you wanted to check through files before emptying the Trash, you had to get
them all out first. Luckily, Quick Look works on items in the Trash, so you can quickly look
through them to check if you are about to delete anything important.
Delete large files from a Time Machine Backup
If you are looking to reduce the size of your Time Machine backup, it's quite easy to go
through you backups and remove files. Just enter Time Machine, locate the file you want to de-
lete, right-click on it and choose "Delete All Backups..." But which files do you delete?
You want to get rid of large files, but not those that are important. The best way to do this is to
use an application called GrandPerspective. Pierce Wetter has created a modified version of
this application specifically for Time Machine backups.
Mac OS X Tips! 11
It searches through your backups, and finds large files that have only been backed up once.
These will be the files that either constantly change by small amounts or were only on your
Mac for a very short time.
It then produces a nice "map" of your backup, so you can easily see which files are taking up
the most space. Hold you mouse over one of large boxes, and make a note of the backup date
and location, shown at the bottom. Then just enter Time Machine, go to the date, and remove
the backup as usual.
If you find that a lot of the files you are removing are in the same location, you might want to
exclude that folder from the Time Machine backup. To do this, just go to the Time Machine
section of System Preferences, click the Options button and then drag the folder into the list.
Some tips for mastering Finder windows
As one of the most commonly used Mac applications, it is worth taking some time to get to
grips with the Finder. There is a wealth of little known features and ways to carry out tasks
more quickly and efficiently using the Finder's settings, menus and keyboard shortcuts.
1. Normally you just double click to open an item, but if you hold option while doing it the
current window will close as the new one opens.
2. Spring loaded folders allow you to easily drag a file wherever you want. If you drag the file
onto a folder icon and hold it there for a while, the folder will spring open, allowing you to drag
the file onto a folder within a folder. You can do this as many times in a row you want, and
when you let go of the file all the windows that have sprung open will close again. Hold the
Space bar while doing this to get rid of the delay before a folder springs open.
3. Look in the Finder Preferences (located in the Finder Menu) for more window options. For
example you can change the delay for spring loaded folders, set the default location for a new
finder window (Command-N) and set folders to always open in a new window.
4. You can change the view of your Finder windows by pressing Command-Option-T. This
shows and hides the toolbar and sidebar.
5. To close every single Finder window, hold option while clicking the red X in the corner. Al-
ternatively press Command-Option-W.
6. In list view you can peek into folders using the expansion triangles. Option clicking one of
these triangles will expand the folder along with any folders it contains. Option clicking again
will collapse all these folders again.
7. Command Clicking on the title bar gives you the path to the current location, allowing you
to jump to any of the enclosing folders.
Mac OS X Tips! 12
ITUNES
Nested rules for smart playlists
As well as the plus and minus buttons for adding multiple rules to a smart playlist, as of iTunes
9 there is now an ellipsis button for adding nested rules. Whereas before you could only set it
to match any or all of the rules, now you can make more complex rule combinations.
For example, you could set the first rule, then add two rules at the first nested level by clicking
the ellipsis button and then the nested plus button. By then setting the top level to match all
rules, and the nested level to match any rules, it will find songs that match both the first rule
and either of the two nested rules.
Automatically Add to iTunes folder
iTunes stores all of your music inside the iTunes Music folder located inside the Music folder
in your user folder. Inside the iTunes Music folder there is also a folder called "Automatically
Add to iTunes". Anything that you drop into this folder will be added to iTunes next time it
opens, or instantly if it is already open.
This folder isn't in a very convenient place, so to use it properly you will want to drag it to the
Dock or Finder sidebar, or create an alias on the desktop by holding Command and Option
and dragging it.
Another great use for this is for copying music across a network to another Mac. Instead of
having to go over to the receiving Mac and opening up iTunes to import the music, you can
just drop the files in this folder directly from the sending Mac.
Organise the iTunes Media folder
The disorganisation of the iTunes Music folder really shows how iTunes has far outgrown its
original purpose. Every time Apple has added a new feature, things have become more mud-
dled. Up until now, Movies, TV Shows, Audiobooks and Ringtones etc. have been added as
subfolders of the Music folder, which doesn't really make sense.
To fix this, you can choose “Organize Library” under “Library” in the File menu. In the window
that appears, click “Upgrade to iTunes Media organization” and when you click OK, iTunes
will sort out the mess in your iTunes Music folder. You will now have an iTunes Media folder,
with subfolders for Music, Movies, Apps, TV Shows etc.
There is one reason you might want to avoid doing this however. Your next Time Machine
Backup will probably take a long time, depending on the size of your media library.
Mac OS X Tips! 13
Customize the column browser
The column browser in iTunes 9 is better than ever. You can enable it by choosing Show Col-
umn Browser from the View menu or by pressing Command-B. The new features that allow
you to customise it are located in the Column Browser submenu of the View menu. You can
position it to the top or to the side of the main music list, and you can choose which columns
appear from Genre, Artist, Album, Composers, and Groupings.
Different way to access the mini player
The green zoom button in the top left corner of the iTunes window switches to the mini player
mode. Alternatively, holding the Option key and clicking the green button maximises the
iTunes window instead. If you want to swap these around, use the following Terminal com-
mand:
defaults write com.apple.iTunes zoom-to-window -bool YES
Just open up Terminal (located in Applications/Utilities), paste in the above line and press re-
turn. Next time you open iTunes, the green zoom button will behave differently.
Home sharing
The new home sharing feature allows you to actually share your music between computers,
rather than just stream it across the network. This makes it a lot more easier to transfer your
purchases between computers without having to use flash drives or email attachments.
When iTunes is open on other computers on the network, they will show up in the sidebar.
Simply click on them, then choose any songs to transfer to your computer. This works with any
media type including Movies and TV Shows, and it doesn't matter if the media was purchased
from iTunes or not. On top of that, you can filter the list to only songs that you don't already
have in your library, and you can set iTunes to automatically copy across any new songs that are
purchased on the other computer.
Mac OS X Tips! 14
However, things become a bit more complicated if you use multiple iTunes Store accounts (i.e.
a different one for each computer). The iTunes Store doesn't have to be logged into the same
account on both, but Home Sharing does have to be set up with the same account. If you find
it isn't working, turn Home Sharing off and then on again from the Advanced menu. Then re-
enter the iTunes Store account username and password, making sure you use the same account
on each computer. Even though you only use one account for home sharing, you should be able
to share songs purchased with either account, as long as both computers are authorised to play
them.
Party with iTunes DJ
iTunes DJ replaced Party Shuffle a while back. It allows iPhones and iPod Touches on your Wi-
Fi network to request and vote for songs to be added to the iTunes DJ playlist (which other-
wise looks just like the party shuffle playlist). The more people vote for a song, the higher up
the list it will move, and the sooner it will play.
The only drawback to this approach is that all the iPhones need to be on your Wi-Fi network,
which is inconvenient if you have an encrypted network. Moreover, everyone has to have the
Remote application on their iPhone, but they can easily download this straight to the iPhone
from the App Store.
To set up iTunes DJ, you first need to open iTunes on your Mac and click on the Settings but-
ton underneath the iTunes DJ playlist. In the settings window, you need to check the box to
allow guests to request songs, and optionally type in a welcome message. Also check the box to
enable voting.
Now, when you open Remote on the iPhone, different things will happen depending on
whether you have previously paired with the iTunes library. Paired iPhones are assumed to be-
long to the host, and therefore have the ability to play, pause, skip song, and rearrange the
playlist, just like they did before.
If your iPhone isn't paired to the iTunes library (i.e. you are a guest at the party) then you don't
have quite as much control. You can view the playlist, but you can't directly change the order.
You can, however, vote for songs to bring them higher in the list, and request new songs to add
Mac OS X Tips! 15
them to the bottom of the list. This works nicely, because if everyone in the room had the abil-
ity to skip songs there inevitably would be chaos.
You can also vote for songs by right-clicking on them in iTunes and choosing "Like It" from
the menu. You can do this as many times as you like, while you can only vote once from a guest
iPhone. This allows the host to manipulate the order if they want to.
Split your iTunes library between two locations
Over the past few months my iTunes library has been filling up fast with movies and TV shows,
and as a result it's taking up more and more space on the small hard drive in my MacBook.
The obvious way around this is to store the iTunes library on an external hard drive, which can
be done quite easily by moving the "iTunes Music" folder over to the new drive and selecting
the new location in the Advanced section of iTunes Preferences. However, this would mean
that I wouldn't have access to my music when I’m moving around without the (not very port-
able) external drive.
An ideal solution for me would be to split my iTunes library between the two locations, storing
large files like movies on the external drive and keeping the rest on my MacBook so I can ac-
cess it at all times. The way to do this isn't entirely obvious, but luckily it is pretty straightfor-
ward.
The first step is to move the large files over to the external drive. You will find the movies
folder in ~/Music/iTunes/iTunes Music/Movies. Just drag this folder over to the external drive,
and delete the copy on your Mac. You can do the same with any music files too, but you will
have to organise them into folders on the external drive yourself.
Next time you open iTunes, try playing one of the movies. It will give an error saying the file
couldn't be found and would you like to locate it. Now you can just point iTunes to the new file
on the external hard drive.
Mac OS X Tips! 16
Of course, this process would be really annoying to have to do multiple times for loads of mov-
ies, so here is a quicker method. First, remove all you movies from the iTunes library by select-
ing them in iTunes and pressing delete. These are just references to files that don't exist any-
way, so you aren't really deleting anything. Now we want to add all the movies files back into
the library, without copying them across from the external hard drive again.
Many of you may have noticed that there is a "Copy files to iTunes Music folder when adding
to library" option in the Advanced section of iTunes preferences. We want to turn this off for
the movie files on the external drive, but leave it on for all other files we add to our iTunes li-
brary. Checking and un-checking this box each time we want to add a movie to our iTunes li-
brary would be really tedious, so here is a quicker way.
Simply hold down the option (alt) key while dragging the movie files onto the main iTunes
window. That way, they will be left on the external drive and not copied back to your Mac. You
can even do the whole folder in one go. Of course, if you don’t hold the option key, iTunes will
behave in the normal way, allowing you to keep your music neatly organised in the iTunes Mu-
sic folder.
Remember though, whenever your external hard drive isn't connected, you will get the "origi-
nal file cannot be found" error if you try and play a movie in iTunes. Don't worry, as soon as
you plug the external drive back in, all the movies will work again. Conveniently, movies synced
to your iPod or AppleTV won't be deleted if you sync while the external hard drive isn't con-
nected, but obviously you won't be able to add new movies to the iPod or AppleTV until you
plug in the external drive again.
Mac OS X Tips! 17
Custom genre artwork in iTunes grid view
Since iTunes 8 was released it has been possible to view your iTunes music, movies and TV
shows in grid view (Command-Option-4 or in the View menu). Once in grid view, if you choose
to group items by genre you will see that Apple has provided some pictures for commonly used
genres. Unfortunately there are not a lot, however Apple has made it so similar genres appear
under the same image. For example, there is no image for Rap, but iTunes automatically gives
this genre the Hip-Hop image.
If you aren't happy with the artwork provided, or you want to add your own genres, you can do
this fairly easily by adding an image to the iTunes package, and then editing a plist file to pair it
to the genre. Here's the step by step process.
Start by going to your applications folder and finding iTunes. Right-click (Control-click) on it,
and choose "Show Package Contents" from the menu. In the folder that appears, navigate to
the Resources folder. This is where you will find everything you need to change.
All the jpg images with names like genre-XXXXX.jpg are the artwork files. Note that all the
movie ones end in M, and ones especially for TV Shows end in T. If you want to edit one, hold
the option key and drag it to your desktop to copy it there. Once you are done editing, save
Mac OS X Tips! 18
the file to the desktop and the drag it back to the Resources folder. I would suggest you don't
replace the old image, just in case you want to go back to it. Simply rename the old one to
oldgenre-XXXX.jpg or something similar.
If you want to create your own genre artwork, note that all the movie genres are 171px x 256px
and all the TV show and music genres are 256px x 256px. If you create artwork that isn’t the
right size, iTunes will automatically scale it for you anyway, so you don’t need to worry about
this too much. Also note that you don't have to round the corners yourself, iTunes does this for
you. When copying the file to the iTunes resources folder, make sure to give it a name different
from any existing genre images.
If creating your own isn't your thing, a quick search on google brought up a flickr group con-
taining artwork others have created.
The next step is to get iTunes to use your image automatically when you use certain genres. In
the Resources folder, look for the file genres.plist. Before we make any changes to this file, you
might want to back it up. Once you've done this, open it up in TextEdit (Right-click and
choose Open With TextEdit). This will pretty much look like nonsense to anyone unfamiliar
with plists, but don't worry. You will notice that most of the file is made up of the following
lines, repeated over and over again:
<dict>
<key>matchString</key><string>action</string>
<key>resourceFile<key><string>genre-actionM.jpg<string>
<key>kind</key><string>movie</string>
</dict>
This one looks out for any "movie" with the genre "action" and gives it the image
"genre-actionM.jpg". You may notice that some other ones are slightly different. Most TV
show and music genres don't have the final line. The one that does is the TV show genre "Clas-
sic" which also has the line <key>exactStringMatch</key><rue/>. This is to make sure it
doesn't get mixed up with the music genre classical.
Say, for example, you created some genre artwork for Gothic Rock, and called it
genre-gothicrock.jpg. After the last </dict> in the file, you would write:
<dict>
<key>matchString</key><string>Gothic Rock</string>
<key>resourceFile<key><string>genre-gothicrock.jpg</string>
</dict>
For movie genres you would also include the line <key>kind</key><string>movie</string>.
Save the file, the quit and re-open iTunes. If everything worked, your genre artwork should
show up in grid view. If it doesn't, the most likely problem is typos in the genres.plist file.
Mac OS X Tips! 19
One more thing to note is that you might lose your changes when iTunes updates. You might
want to keep a backup of your new jpg artwork images and the genres.plist file in a separate
place as items within the package contents are often replaced when the application updates.
Control the visualizer
With iTunes 8 came the first new visualizer for a long while, and it’s pretty neat. As before,
simply hit Command-T to display the visualizer, and Command-F to make it full screen. These
options are both also in the View menu.
Like the previous visualizer, you also have the ability to control this one. While the visualizer is
running, hit the ? key to bring up a list of available functions. They are as follows:
? - Toggle help screen
M - Change mode. As far as I can tell there are 8 or 9 different patterns.
P - Change palette. Changes the colours used.
I - Display track info. Displays information about the current song.
C - Toggle auto-cycle (on by default). Turns on or off automatically cycling through modes and
colours.
F - Toggle freeze mode. Freezes the visualizer while the camera continues to pan around.
N - Toggle nebula mode. Turns on or off the clouds in the background.
L - Toggle camera lock. Holds the camera still while the visualizer continues.
Mac OS X Tips! 20
4 quick podcast tips
1. In iTunes you will see your podcasts in a list, each one with an expansion triangle to reveal
the individual episodes within that podcast. If you Command-click on the triangle, every pod-
cast in the list will expand to show episodes.
2. It's fairly obvious that you can delete single episodes from a podcast by simply selecting it
and pressing delete. However, getting them back is a bit less straightforward. Option-Clicking
the triangle next to the podcast title will bring up the full episode list, including any that you
have removed in the past. Now you can click "Get" to download the episodes again.
3. Many podcasts have excessively long descriptions (well, too long to fit in the description col-
umn of the iTunes window). To bring up a window that contains the episode description and
other details, click the small "i" icon on the right side of the description column.
5. If you come across a podcast on the Internet but you can't find it in the iTunes Podcast Di-
rectory, you can still subscribe to it in iTunes. Choose "Subscribe to Podcast..." from the Ad-
vanced menu and enter the podcast feed URL.
Multiple music libraries
It is possible to have multiple iTunes libraries on the same computer. This works in the same
way that iPhoto has for quite a while. When opening iTunes, press and hold the Option key
immediately after clicking the Dock icon or double-clicking the application in the Finder.
A dialog box will appear instead of the normal iTunes window, and from here you can choose
an existing library or create a new one. Your existing library is in your user folder, under Music
/ iTunes / iTunes Library.
When you create a new iTunes library it doesn't just create this single library database file, it
creates the entire folder, complete with a music folder and Album artwork folder.
This is quite useful for separating off a section of music. For example, you may want a separate
library for your live music, your children's music or the music you don't want to copy to your
iPod.
Mac OS X Tips! 21
In an ideal world it would be possible to access all your music libraries from the sidebar in
iTunes, but currently this isn't possible. Hopefully at some point it will be possible to change
between your libraries without having to quit and load up iTunes again.
Get more iPod/iPhone storage details in iTunes graph
In the iPhone/iPod section of iTunes you can look at all the different kind of files on your de-
vice using the bar graph at the bottom of the page. This shows the total capacity, and how
much of that is being used up by Audio, Photos, Videos and Other files. To see this, plug in
your iPod and open up iTunes. Click on your iPod in the Devices section in the left hand col-
umn.
It gives you the details in terms of the iPods storage capacity, that is, in bytes. However, you
can also use the graph to display a count of how many songs, photos and videos your iPod con-
tains or how long it would take to listen to all the songs and watch all the videos.
Change to this mode by clicking on the graph itself. Clicking once will cycle to the number
count, clicking again will change it to the time count, and clicking one final time will change it
back to the storage capacity.
Mac OS X Tips! 22
IWORK
Get the free trial
Unfortunately most of these tips only work with the latest version of iWork. As well as the
boxed version, Apple offers a free 30 day trial of iWork to download from their web site. One
thing to remember though is if you already have iWork ’08 and you decide not to upgrade after
30 days, remember to save any new or changed files back in the iWork '08 format just in case
they don't work any more once your trial expires. You can do this by choosing iWork '08 from
the "Save copy as" menu in the Save As dialog.
Enable hidden picture frames
Pages, Keynote and Numbers all have various different styles of picture frame that you can
place around any object by choosing it from the stroke menu in the Graphic Inspector. How-
ever, it turns out there are loads of frames that are disabled by default. You just need to edit a
single file to enable them.
Choose the application where you want to enable the hidden frames (Pages, Keynote or Num-
bers), right click and choose "Show Package Contents". Look in the Resources folder for one
of the three following files:
For Pages, look for SLGraphicInspectorFrames.plist
For Keynote, look for BGGraphicInspectorFrames.plist
For Numbers, look for LSGraphicInspectorFrames.plist
Open it up in TextEdit, and notice how the names of the different picture frames are listed.
The new frames available with iWork '09 are Fine_Artist, Jet Set, Moroccan, Nature, Nature2,
Typeset, Venetian, Venetian2, and Venetian3. For example just add Fine_Artist to the end of
the list. As well as these new frames available in iWork '09, there are many more that also work
in iWork '08 listed here.
Temporarily disable guide lines
When moving objects around, all the iWork applications helpfully give alignment guides that
will snap the objects so they are perfectly in line with each other. Sometimes, when you don't
want objects aligned or you want to align them in a different way, this can be quite annoying.
The way to temporarily disable the guide lines is to hold down the command key while you are
dragging the object. Now your shape, image or text box can be freely dragged to whatever po-
sition you want.
Mac OS X Tips! 23
Password protect iWork documents
This is something that has been annoyingly difficult to do on the Mac for a long time. Gener-
ally previous solutions involved creating encrypted disk images, however, now all the iWork
applications have a "Require password to open" option in the Document section of the Inspec-
tor.
Using the keyboard to create formulas in Numbers
When creating functions and formulas in numbers, you almost always want to refer to another
cell or group of cells. In Numbers '08 you had to use the mouse to select these cells, but now
you can use the keyboard to select them. Simply hold down the Option key and use the arrow
keys to move about. To select a group of cells, hold down Shift as well as Option, and continue
using the arrow keys to make the selection. To change the reference from relative to absolute,
just hit Command-K to cycle through all the different possibilities.
Advanced Gradients
The gradient fill options in iWork '08 were fairly limited. In iWork '09 you can now create lin-
ear or circular gradients with as many colours as you like by choosing "Advanced Gradient Fill"
from the Fill menu.
Mac OS X Tips! 24
Display multiple inspector windows at once
Inspector windows are small windows that allow you to change settings for whatever happens
to be the currently selected object. They are the ones that have a thinner title bar, they always
hover above other windows and they disappear when you change to a different application.
In most applications they contain information and settings about whatever object is selected.
As you select different things, the contents of the inspector window will change, so you can
always go to the same place to change the properties of that object.
Now you don't want multiple inspectors popping up, containing settings for different objects,
because they are designed to keep all the information and properties in one location, so you
always know where to find it. However, you might want multiple inspectors that contain dif-
ferent sections of the settings. For example, you might want one inspector for text settings,
and one for graphics settings.
In most Apple applications, there is a single inspector with tabs along the top that allow you to
change between different groups of settings. If you find yourself constantly jumping between
different tabs while you work, there is a simple way to separate each tab out into its own in-
spector. Simply hold the Option key while clicking on a tab, and another inspector window will
appear with the contents of that tab.
Using this, you can arrange the different inspectors around your screen for easier access. For
example, in Pages you might want to keep separate Graphic, Text and Table inspectors always
open.
Mac OS X Tips! 25
ILIFE
Pretty much all of these tips require iLife ’09, which includes iPhoto, iMovie, GarageBand,
iWeb and iDVD.
Speed up iPhoto '09
Many people have noticed the load time for iPhoto increased considerably after upgrading to
iLife '09, especially if they have lots of photos. It turns out you can speed things up by "vac-
uuming" the database that holds all your photos. This is basically just a Terminal command that
does a bit of tidying up. Over time the iPhoto database becomes fragmented, with information
scattered in various places around the database file amongst regions of empty space. The vac-
uum command cleans up the database by removing the unnecessary parts and reorganising the
file structure.
To vacuum your iPhoto library, start by making sure iPhoto isn't open, and then open up Ter-
minal (located in Applications/Utilities). Firstly, you have to point the Terminal to where your
iPhoto Library is using the cd (change directory) command. By default, this should be:
cd "~/Pictures/iPhoto Library"
Paste the above line into the Terminal, then hit return. If your iPhoto Library isn’t in your Pic-
tures folder you will have to adjust the command to your specific needs. Next, to perform the
vacuum, use the following command:
for dbase in *.db; do sqlite3 $dbase "vacuum;"; done
As before, just paste this line in then hit return and you're done.
Enable scrolling zoom in Places maps
The new Places feature in iPhoto allows you to explore your photos on a map. Photos taken on
a GPS enabled camera (i.e. the iPhone) will be automatically geo-tagged, or you can enter the
location information manually. Annoyingly, by default the maps don't allow you to zoom using
the two-fingered scroll on the trackpad or a scroll wheel on your mouse. To enable this, just
open up Terminal (in Applications/Utilities), type the following line and hit enter:
defaults write com.apple.iphoto MapScrollWheel -bool YES
To disable the scrolling zoom again, just repeat the command with NO at the end instead.
Include location information in uploaded photos
The default setting is for iPhoto to remove the geo-tagging information from your photos
when you upload them to the web, presumably so people don't unwittingly broadcast their lo-
Mac OS X Tips! 26
cation to the world. If you want to keep the location information in uploaded photos, go to the
Web section of iPhoto preferences and check the box next to "Include location information
for published photos."
Set a key photo for someone
Changing a person's key photo is exactly the same as changing the key photo for an event. Just
move your mouse from left to right over their photo on the corkboard to cycle through all the
photos of that person. When one you like is displayed, just hit the space bar to make that the
new key photo. If you can't find the one you want this way, just go into that person's photos,
right click on the new key photo and choose "Make Key Photo" from the contextual menu.
Enter information about a person
When you hold your mouse over someone in Faces, an small i appears. Clicking on this will al-
low you to enter a full name and email address for that person. It will also show you the num-
ber of photos with that person in, and the range of dates of photos they're in.
Batch accept or reject faces
If you look at a person's photos in Faces, there will be a group of unconfirmed faces that
iPhoto has identified for you. To confirm a large group of faces at once, just drag across all the
photos. To reject a group of photos, hold the Option key while doing this. You can also just
Option-click on photos to reject them individually.
Corner-anchored resize when adding faces
iPhoto's default behaviour when adding a missing face is a centre-anchored resize. To change
this to the usual corner-anchored resize, just hold down the option key when dragging over a
face.
Easily switch between multiple libraries
iPhoto libraries are now double-clickable from the Finder. If you want to open a different li-
brary in iPhoto, just open up your Pictures folder and double-click a different library file.
iPhoto will then load up with the new library. No need for holding Option on launch anymore.
Create iPhone ringtones in GarageBand
To create a free ringtone from any MP3 or AAC file just choose "Example Ringtone" from the
iPhone Ringtones section in the New dialog. Delete the example that Apple has provided,
then select a song from your iTunes library by clicking on the Media button in the bottom
Mac OS X Tips! 27
right. Drag your chosen song into your GarageBand project. Move and resize the yellow bar at
the top to choose the section of the song you want to loop for your ringtone. Finally, choose
"Send to iTunes" from the Share menu.
Use Learn to Play on PowerPC or Core Solo Macs
The new Learn to Play lessons in GarageBand require a dual core Intel based Mac to run. If
you are running an old PowerPC Mac or Core Solo Mac Mini, you can get around this by going
to /Library/Application Support/GarageBand/Learn to Play/Basic Lessons. Once here, double-
click on one of the .mwand files to open it in GarageBand. Consider closing all the other appli-
cations on your Mac if the lessons run slowly.
Add a location to iMovie travel maps
If you want to use a location in the travel maps feature that iMovie doesn't have listed, you can
add it to the locations file. Find iMovie in your applications folder, right-click on it and choose
"Show Package Contents." In the Resources folder find WorldLocations.txt and open it up in
TextEdit. On a new line, enter the place name followed by a tab, then the region followed by a
tab, then the country followed by a tab, and finally the latitude and longitude separated by a
comma. For example you could add
Duxford Cambridge UK 52.093851,0.184870
Import movies into iMovie from other locations
If the videos you want aren't in the Event Library, just right-click below your list of events to
import videos from anywhere on your hard drive or from within an older iMovie file.
Ditch DVD menus
In iDVD it is possible to create a DVD that jumps straight into the movie without a menu
that displays all the "Play Movie" and "Scene Selection" type options.
This is useful if you just have a single movie without chapters where the only option on the
menu would be a rather pointless "Play Movie". It's also great for if you want to play a DVD in
a kiosk and just have it loop over and over.
Start by launching iDVD from the Applications folder. Create a new project then click on the
DVD map button, located right next to the Play button. In the map that appears, there is a
box that says "Drag content here to automatically play when the disc is inserted". This area is
normally used for the trailers and copyright messages, but you can just as easily drag your
whole movie here.
Mac OS X Tips! 28
Now the menu will only appear after the movie has finished. You can set an option here to play
the movie again, or alternatively you can cut out the menu completely by setting the movie to
loop.
Do this by clicking on your movie in the map view and choosing Loop Movie from the Ad-
vanced Menu. Burn your movie as usual. Now when you put the disc into a DVD player or
your Mac, your movie will automatically play over and over again.
Mac OS X Tips! 29
A P P LES C R I P T AND AUTOMATOR
AppleScript has always been a great way to automate repetitive tasks on your Mac, and
Automator has made it much easier and more user-friendly to get started. One of the great
new features in Snow Leopard is the ability to set applescripts and automator workflows as
items in the Services menu, which you will find in the application menu up in the top left of
the screen. The major benefit of this is that you can now assign keyboard shortcuts to these
scripts, allowing you to quickly run any automated task with the push of a button.
Automatically remove clutter from the desktop
This is a great example of when AppleScript is really useful for automating simple tasks like
moving files around. In fact, you can do it with a script that is only three lines long.
Start by opening up AppleScript Editor, located in the Utilities folder inside the Applications
folder. If you don't have Snow Leopard, the latest version of Mac OS X, this might be called
Script Editor and instead is located in the AppleScript folder in the Applications folder. In the
window that appears, paste the following three lines:
tell application "Finder"
" move items of (path to desktop folder) to folder (path to documents folder)
end tell
If you click Run, you should see all the items on your desktop move into your Documents
folder. Now you have to decide how you will want to run this script in future.
One way is to set it to automatically run every time you shut down your Mac, so the desktop is
nice and clear when you next turn it on. To do this, choose Save As from the File menu, give
the script a name like cleardesktop and change the File Format to Application. Save it some-
where safe where someone won't accidentally delete it. I have a folder inside my Documents
folder called Scripts where I keep all my AppleScripts.
It’s actually pretty tricky to make it run every time you shut down your Mac. A much easier
way is to make the script run when you log in, which will essentially do the same thing. Just go
to System Preferences and click on the Accounts section. Choose your account from the list on
the left, and then click on the Login Items tab. You can now either click the plus (+) button
and locate your script, or just drag the script from a Finder window into the list. Now, when-
ever you turn on your computer, all the clutter left over from the previous user will be auto-
matically moved into the Documents folder.
Alternatively, you may want to be able to run the script by choosing it from the Services menu
or by pressing a keyboard shortcut. The easiest way to do this is using Automator, located in
Applications/Utilities. After opening it, choose the Service template and drag “Run Ap-
pleScript” from the list on the left to the workflow area on the right. Change the “text” drop-
Mac OS X Tips! 30
down menu to “no input” and then paste the script from above into the box. Now save the
workflow with the name you would like to appear in the Services menu and you are done.
If you want to assign a keyboard shortcut, go to System Preferences and click on the keyboard
setting. Under the Keyboard Shortcuts tab, choose Services from the list on the left and scroll
down to the bottom of the list on the right to find your newly created service. Then just
double-click in the area to the right of your service and press the keyboard shortcut that you
want.
The above script is just about as basic as you can get. Here’s an idea for a more complicated
version. Instead of just dumping everything in your documents folder, it instead creates a
folder in there with a name that includes todays date ( e.g. “Desktop 13/01/2010” ) and puts the
items in this folder instead.
set foldername to ("Desktop " & short date string of (current date))
set docsfolder to (path to documents folder) as string
tell application "Finder"
" if not (exists folder (docsfolder & foldername)) then
" " make new folder at docsfolder with properties {name:foldername}
" end if
" move items of (path to desktop folder) to folder (docsfolder & foldername)
Mac OS X Tips! 31
end tell
Alternatively, the following script checks the file extension of all the files on the desktop, and
sorts them into the Movies, Pictures, Applications and Documents folders depending on what
they are. If you are feeling adventurous, you can modify the script to include your own folders
and file extensions.
tell application "Finder"
" set desktopFolder to (path to desktop folder)
" set musicFolder to (path to music folder)
" set appsFolder to (path to applications folder)
" set picsFolder to (path to pictures folder)
" set moviesFolder to (path to movies folder)
" set docsfolder to (path to documents folder)
" set musicExt to {".mp3", ".aac"}
" set appsExt to {".dmg", ".sit", ".app"}
" set picsExt to {".jpg", ".gif", ".tif", ".png", ".psd"}
" set moviesExt to {".avi", ".mpg", ".mov", ".m4v"}
" set docsExt to {".pdf", ".txt", ".doc", ".xls", ".key", ".pages"}
" set allFiles to files of desktopFolder
" repeat with theFile in allFiles
" " copy name of theFile as string to FileName
" " repeat with ext in musicExt
" " " if FileName ends with ext then
" " " " move theFile to musicFolder
" " " end if
" " end repeat
" " repeat with ext in appsExt
" " " if FileName ends with ext then
" " " " move theFile to appsFolder
" " " end if
" " end repeat
" " repeat with ext in picsExt
" " " if FileName ends with ext then
" " " " move theFile to picsFolder
" " " end if
" " end repeat
" " repeat with ext in docsExt
" " " if FileName ends with ext then
" " " " move theFile to docsfolder
" " " end if
" " end repeat
" " repeat with ext in moviesExt
" " " if FileName ends with ext then
" " " " move theFile to moviesFolder
" " " end if
" " end repeat
" end repeat
end tell
Lock screen with a keyboard shortcut
There are a couple of ways to make your Mac require a password when you leave it. The easiest
way is to set "Require password after sleep or screen saver begins" in the Security section of
System Preferences. Here, you can also set a time limit so a password isn't required right away,
but only after 15 minutes for example. If you want, you can then set a hot corner to start your
screensaver, so you can lock the screen by just moving the mouse into one of the corners.
Mac OS X Tips! 32
If you would prefer a keyboard shortcut to lock the screen, you can create this yourself. Open
up Automator (in the Applications folder) and choose a Service template. From the library
choose "Run Shell Script" and drag it across to the workflow area. In the text box paste the fol-
lowing command:
'/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession' -sus-
pend
Finally, change the "text" drop-down menu above the workflow to "no input" and then save
you workflow as "Lock Screen". To add the keyboard shortcut, go to the Keyboard section of
System Preferences and click the Keyboard shortcuts tab. Select Services from the list on the
left, then scroll down to the bottom of the list on the right to find "Lock Screen". Double-click
on the area to the right "Lock Screen", then press the keyboard shortcut you want. I use
Command-Control-L.
Other AppleScripts to run with keyboard shortcuts
Here are a collection of AppleScripts and shell scripts that are well suited to running with key-
board shortcuts. For each of them you create an automator workflow with a Service template
using the “Run AppleScript” workflow item. After saving it, go to the keyboard section of Sys-
tem Preferences to set a keyboard shortcut.
TURN AIRPORT ON AND OFF
The two separate scripts that you need to use are below. It's pretty obvious which is which. As
explained above, make a separate Automator workflow for each of them and save as "Airport
Off " and "AirPort On."
do shell script "networksetup -setairportpower off"
do shell script "networksetup -setairportpower on"
RUN TIME MACHINE BACKUP NOW
do shell script
"/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper &"
EJECT ALL DISKS
To eject all disk images, flash drives, external hard drives, CDs and DVDs (i.e. everything):
tell application "Finder" to eject (every disk whose ejectable is true)
To ignore CDs and DVDs:
Mac OS X Tips! 33
tell application "Finder" to eject (disks where free space is not 0)
To ignore large drives (like a Time Machine backup). This is good to get rid of all the mounted
disk images:
tell application "Finder" to eject (every disk whose ejectable is true and local volume
is true and physical size < 1.0E+9)
SET COLOUR LABELS IN THE FINDER
You will need to create one automator workflow for each colour, and assign a different key-
board shortcut to each (or just the colours you use regularly). Command-Option-1, Command-
Option-2 etc. might work well. The script works with multiple files selected too.
tell application "Finder"
" activate
" set selected to selection
" set colour to 2
" repeat with n_file in every item in selected
" " set label index of n_file to colour
" end repeat
end tell
Replace the number in the fourth line with one of the following:
0 = No colour
1 = Orange
2 = Red
3 = Yellow
4 = Blue
5 = Purple
6 = Green
7 = Grey
SYNC WITH MOBILEME
do shell script
"/System/Library/PrivateFrameworks/DotMacSyncManager.framework/Versions/A/Resources/dotm
acsyncclient sync"
PASTE AS PLAIN TEXT
This script just strips the formatting out of text in the clipboard. So you use Command-C to
copy a load of formatted text, then Control-C (or whatever) to strip formatting, then
Command-V to finally paste it.
do shell script "pbpaste | pbcopy"
Mac OS X Tips! 34
C R E AT E A SHORT URL
This script creates a short URL of the current page in Safari and copies it to the clipboard.
Then all you need to do is paste into where you want it.
tell application "Safari"
" set bigURL to the URL in document 1
end tell
set tinyURL to (do shell script "curl --url
\"http://metamark.net/api/rest/simple?long_url=" & bigURL & "\" ")
set the clipboard to tinyURL
THE B U I LT I N S C R I P T S
Most of the scripts that come with Mac OS X are pretty useless, but some are quite fun. They
are all located in Macintosh HD/Library/Scripts. Here are the ones to look out for:
"Show/hide all" in Finder Scripts
"Create New Message" in Mail Scripts
"New Applications Window" in Navigation Scripts
"Convert to PDF" in the Printing Scripts
"Download Weather Map" in the URLs folder
Batch rename multiple files
Often you might find you have a folder containing hundreds of files, and you want to rename
them all, for example to create a numbered list. In the Finder this would take ages, but luckily
you can use Automator to make the process more efficient.
Simply open up Automator and add the following actions into the workflow. First add "Get
Specified Finder Items" followed by "Sort Finder Items" followed by "Rename Finder Items".
Your workflow should look something like the screenshot below. When you add the "Rename
Finder Items" action, you will be asked if you want to create a copy of the files. Generally you
won't want to do this, so choose "Don't Copy".
What the workflow does is pretty straightforward. When you click Run in the top right, it gets
the files you have added to the list in the first action. You can add the files by clicking the Add
button below the list before you run the workflow. The second action then sorts the files by
name, size, kind, or whatever you specify. The final action takes this list of files and modifies
their file names.
Mac OS X Tips! 35
There are a huge amount of options in the "Rename Finder Items" action. The first drop-down
menu allows you to choose between adding a date or time, adding text, changing uppercase/
lowercase, making a sequential list or performing a find and replace for a string of text.
The second action, "Sort Finder Items" is really optional and only makes a difference if you
have the renaming action set to "Make Sequential". This takes the list in the order it's given
and places sequential numbers before or after the file names depending on the files position in
the list.
Mac OS X Tips! 36
Also, there are a couple of alternatives to the first action. One option is to use "Get Selected
Finder Items" instead, which will perform the renaming on whatever the current selection is in
the Finder. Another is "Ask for Finder Items", which will open up a dialog prompting you to
choose the files each time you run the workflow. This is a good choice if you want to regularly
perform the same renaming on different batches of files. You can then save the workflow as an
application (File, Save As... and then choose Application from the File Format menu) that sim-
ply runs the workflow when you open it, instead of bring up Automator.
Applescript iCal calendar colours
If you create multiple calendars in iCal, they are automatically assigned different colours. This
allows you to easily figure out which events belong to which calendar. The problem is that iCal
only uses six different calendar colours. If you have seven or more calendars, iCal will use these
same colours multiple times making it harder to work out which events are from which calen-
dar.
Now iCal does allow you to set a calendar to a colour other than the seven automatic ones, but
you have to do this to each calendar manually. To do this, right-click on the calendar in the list
and choose Get Info. The problem is that the more calendars you have, the harder it is to
make sure you don't use colours that are too similar to any of the existing calendars.
A more interesting way to solve this problem is by using randomly generated colours. To do
this, we'll need to write a quick, easy AppleScript.
load up AppleScript Editor (from /Applications/Utilities) and paste the following script into
the window that appears:
tell application "iCal"
" set calnum to (count every calendar)
" repeat with currentnum from 1 to calnum
" " set calcolour to (the color of every calendar)
" " set red to random number 65535
" " set green to random number 65535
" " set blue to random number 65535
" " repeat until calcolour does not contain {{red, green, blue}}
" " end repeat
" " set red to random number 65535
" " set green to random number 65535
" " set blue to random number 65535
" " set the color of calendar currentnum to {red, green, blue}
" end repeat
end tell
Now all you need to do is click Run. iCal will load up and each of your calendars will be as-
signed a new colour. It doesn't work perfectly - sometimes two colours will be very similar - but
you can just keep clicking Run over and over again to get a new selection of random colours.
Mac OS X Tips! 37
T ERMI N AL AND UTILITIES
Skip disk image verification
If you often find yourself skipping the verification process that happens when you mount a
disk image, you may want to use this Terminal command to skip it by default. Be warned that
skipping the verification is potentially risky, but it can save you a lot of time if you are sure that
the disk image is fine. To run it, open up Terminal (located in Applications/Utilities), paste the
following line and press return.
com.apple.frameworks.diskimages skip-verify TRUE
To reverse, repeat the command again with FALSE instead of TRUE.
Create a disk image that works in Windows
Most Mac users should be familiar with disk images, and if you aren't, you probably use them
all the time without even realising. Their most common use is for distributing applications
across the internet. If you download an application like Firefox or VLC for example, they come
as a .dmg file. Double-clicking this file will mount a disk image with the application inside on
your desktop.
Disk images have far more widespread uses than this though. They can be used to create a ex-
act copy of any CD, DVD or hard drive and turn it into a single .dmg file. You can then trans-
fer this file around, and then simply double-click on it to mount the disk image. The most
common uses of this are to create backups, to create a file for burning to CD/DVD, or to
transfer the entire contents of a hard drive from one computer to another.
Unfortunately, the dmg type disk images that Mac OS X uses are not really Windows friendly.
The cross-platform standard for disk images is the ISO format. These can be created on your
Mac, and can be read by any Mac or Windows PC. This is especially useful if you want to burn
a CD or DVD and your Mac doesn't have a burner but your PC does.
The first step in creating an ISO image is to make a folder of all the things you want to be in
your disk image. Next, open up Disk Utility, located in the Utilities folder in the Applications
folder. In Disk Utility, choose "New... Disk Image from Folder" from the File menu, or hit
Command-Shift-N. Choose your folder, and then select a name for your image. Choose "DVD/
Mac OS X Tips! 38
CD master" from the Image format pop-up menu, and leave the Encryption as none. Click
Save, and you're almost done.
You have created an ISO image, but strangely Disk Utility gives it the .cdr extension instead of
the standard .iso extension. To avoid confusing Windows PCs, just rename your image with the
.iso extension and you're done.
If you already have a normal Mac .dmg disk image, it's just as easy to convert it to .iso using
Disk Utility. Just select Convert from the toolbar or the Images menu. Use the same settings as
above, and remember to change the file extension to .iso.
For those of you who love the command line, you can convert disk image formats using hdiutil.
This has the benefit of not requiring you to change the extension, but probably won't work out
any quicker as the process is so straightforward in Disk Utility.
To convert from DMG to ISO, open up Terminal (in Applications/Utilities) and type:
hdiutil convert /path/to/image.dmg -format UDTO -o /path/to/newimage.iso
Replace the two paths with the location of the image and the place you want to save the new
image. For example I would use /Users/matt/Desktop/image.dmg. To avoid mistakes, you can
just drag the image to the Terminal and it will enter the path for you.
To convert from ISO to DMG, just use the following instead:
hdiutil convert /path/to/image.iso -format UDRW -o /path/to/newimage.dmg
How to use Network Utility
You'll find Network Utility in the Utilities folder inside the Applications folder. It comes free
with every Mac, and it's great for figuring out what the problem is with a dodgy internet con-
nection. Everything you can do in Network Utility you can actually do in a Terminal window
using unix tools. But why go to all that effort when Apple have created a nice application that
lets you do things much more easily. When you first open up Network Utility you will see eight
tabs along the top. Here's a run through of what you can do in each tab.
1. INFO
The first tab, Info, unsurprisingly gives you general information about your network. The Net-
work Interface drop-down menu shows all the different ways your Mac can connect to the
Mac OS X Tips! 39
Network. Typically these are ethernet, wireless and Firewire. The useful bits of information are
the Hardware Address and IP Address. You will only have an IP address if that network inter-
face is connected, otherwise it will say unknown. The Hardware Address, otherwise known as a
MAC address, can be used to uniquely identify your computer (even though it is possible to
change it). One useful way to use the MAC address is when setting up your wireless router. You
can set most routers to only allow specific MAC addresses to join, meaning other people can't
log onto your wireless and connect to the internet.
2 . N E T S TAT
Netstat is a tool that is really useful to network administrators for troubleshooting, but pretty
useless to the average user. If you choose "Display routing table information" and click Net-
stat, you will get a list that contains all the computers on the network. For example, I get
Matts-Macbook, Matts-iPhone and ChrisG5. If you choose "Display the state of all current
socket connections" and click Netstat you'll see a list of your computer's network connections.
For example, the first items on the list will correspond to any web pages you have open. If you
type the numbers under "Foreign Address" into Safari, the web page will sometimes appear.
3. PING
Ping is a tool to check if an internet address is working. When you "ping" an address, you send
a small bit of data which it sends back. You can use this to check if a website is down if it isn't
loading in Safari. Alternatively, if you think your internet connection is down, you can try ping-
ing sites that almost never go down like google.com and bbc.co.uk to see if you have a problem
on your end.
4. LOOKUP
Lookup allows you to get information about a web site or IP address. The drop-down menu
allows you to choose from a number of different types of information. For example, perform-
ing a Name Server lookup on macosxtips.co.uk will tell you that this site is hosted by Dream-
host, and a MX record lookup will tell you that our email is handled by Google.
5. TRACEROUTE
When you enter an address and click Trace, traceroute will show you the route taken by data
sent between you and the server. It allows you to see all the servers that your data goes through
along the way. You can use this to troubleshoot connection problems by finding out the point
where your data is being blocked. You can also use it when you are downloading a file and have
multiple download mirrors in different locations to choose from. Just type the addresses of the
mirrors into traceroute and you can get a good idea of which mirror is fastest.
Mac OS X Tips! 40
6. WHOIS
The Whois database gives you information about internet addresses and who has registered
them. The default whois server whois.internic.net works quite well for most addresses, but you
might have to type "domain apple.com" for example to get it to work. For .co.uk addresses use
"whois.nic.uk" as the whois server. You will get information like the registrant, their address,
who they registered with, when their registration was started and and when it expires.
7. F I N G E R
Finger, created in 1971, is one of the earliest forms of status updates that are now done using
Facebook and Twitter. It's hardly used anymore, but you can use finger to check if your friends
are online, and you can post .plan files to your profile similar to blog posts. One of the best
ways to use finger is to type in your username or the username of another user on your Mac. It
will tell you if they/you are currently logged in and how long since they/you last logged in.
8. PORT SCAN
The final tab in Network Utility, Port Scan, is for scanning which ports are open at a certain
address. These Network ports are a sort of virtual version of the ports on the side of your
computer, and each port is for a certain type of network traffic. For example, port 80 is used
for web pages. You can use Port Scan to test your own computer by typing in the name of your
Mac followed by ".local". You can find this name in the Sharing section of System Preferences.
Things like iTunes sharing, instant messaging, BitTorrent, AFP and SMB sharing all use differ-
ent ports. If you find that one of these isn't working, it might be because your firewall is block-
ing the port that it uses. Instead of turning off your firewall, you can just set it to open that
port. Just run Port Scan with the application or sharing turned off and then again with it turn
on to see which port appears. You can then set your firewall to open this port and allow net-
work traffic through. Note that the built in firewall that comes with Mac OS X works on a per
application basis rather than a port basis, to keep things simpler for the average user.
Terminal commands for improving Spotlight
Spotlight works great most of the time, but occasionally you may need to do a bit of tinkering
to get it to work properly. Most of us have probably had a problem where Spotlight won’t find a
file you know is there. Here are a few Terminal commands for changing hidden Spotlight set-
tings, performing more complicated searches and updating the index.
ADD A FILE TO THE SPOTLIGHT INDEX
In theory, all files are added to the Spotlight index when they are created. However, every now
and again something goes wrong and a stubborn file might refuse to show up. To manually add
it to the index, you can use the following command. Start by opening up Terminal (located in
Mac OS X Tips! 41
Applications/Utilities). Type in mdimport and then hit the space bar. Next, find the file you want
to add in the Finder, and drag it onto the Terminal window. Terminal should automatically type
in the path to the file for you. Of course, if you know the path you can type it in manually
yourself. Finally, hit return and the file should now show up in you Spotlight searches.
ADD A FOLDER TO THE SPOTLIGHT INDEX
Adding a folder works in exactly the same way as with a file. However, in Mac OS X 10.4 Tiger
and earlier, the command is slightly different if you want the contents of the folder to be in-
dexed too. In that case use mdimport -f instead. You might want to use this to add the System
folder with mdimport -f /System as it isn't searchable by default.
SEARCH SPOTLIGHT FROM THE TERMINAL
Considering Spotlight is so quick and easy to access, you will probably only use this if you are
already working in the Terminal and want to find a file, or if you want some extra options. To
do a search, just type mdfind query where query is what you want to search for. To limit this to
a specific folder, instead use mdfind -onlyin ~/Desktop query replacing ~/Desktop with the path
to your folder. To run a "live" search which will update the results as users add files, use mdfind
-live query. Control-C will stop it updating. To see all the other options, look at the man page
by typing man mdfind into Terminal.
RE-INDEX AN ENTIRE DRIVE
If you are having problems with your Spotlight index, you might want to start over and re-
index your hard drive. In the Terminal, type sudo mdutil -E / and hit return. You may have to
enter your password. The existing Spotlight index will be deleted, and Spotlight will start creat-
ing a new index in the background. You can re-index other hard drives by changing the com-
mand to include their name, like sudo mdutil -E /Volumes/OtherHardDrive.
RE-INDEX A S P E C I F I C F I L E F O R M AT
When Spotlight adds a file to the index, it checks to see if it recognises the file type and then
uses an mdimporter plugin to index the contents if it does. Each file format has it's own plugin,
and most are located in Macintosh HD/System/Library/Spotlight or Macintosh HD/Library/
Spotlight. Double clicking on a plugin will give you the option to re-index all the files associ-
ated with it. Alternatively, you can do this from the Terminal with the command mdimport -r.
Mac OS X Tips! 42
For example, mdimport -r /System/Library/Spotlight/Chat.mdimporter would cause all of your
chat files to be re-indexed.
ADD A N E W F I L E F O R M AT T O T H E SPOTLIGHT INDEX
One of the great things about Spotlight is that it will index the contents of many types of files.
For example you can search for a word written in a PDF document or the telephone number of
one of your contacts. Many third party applications require plugins to make Spotlight index
their file's contents, which are available on the Apple Spotlight plugins page.
MAKE SPOTLIGHT INDEX SOURCE CODE
Apple's developer tools come with a source code mdimporter plugin that allows Spotlight to
search the contents of your source code. However, if don't want to install the developer tools
(it's a big download) then you can just modify the rich text mdimporter plugin to handle the
same job. Go to Macintosh HD/System/Library/Spotlight and find the RichText.mdimporter
file. Right-click on it and choose "Show Package Contents". Inside the Contents folder,
double-click on the info.plist file to open it in TextEdit. Near the top you will see a list that
looks like this:
<string>public.rtf</string>
<string>public.html</string>
<string>public.xml</string>
<string>public.plain-text</string>
<string>com.apple.traditional-mac-plain-text</string>
<string>com.apple.rtfd</string>
<string>com.apple.webarchive</string>
<string>org.oasis-open.opendocument.text</string>
<string>org.openxmlformats.wordprocessingml.document</string>
You can add any of the following lines to the end of this list to enable Spotlight to index the
contents of the specified format:
<string>public.c-header</string>
<string>public.c-plus-plus-header</string>
<string>public.c-source</string>
<string>public.objective-c-source</string>
<string>public.c-plus-plus-source</string>
<string>public.objective-c-plus-plus-source</string>
<string>com.sun.java-source</string>
<string>public.perl-script</string>
<string>public.python-script</string>
<string>public.csh-script</string>
<string>public.shell-script</string>
<string>public.ruby-script</string>
<string>public.php-script</string>
<string>com.netscape.javascript-source</string>
When you are done, you will want to double-click on RichText.mdimporter to re-index all
these file formats.
Mac OS X Tips! 43
If you have another file format that is a really just a text file under the hood, you can find out
what to add to the info.plist file by running mdimport -n -d1 somefile.ext in the Terminal. The
output should contain a "type" that looks something like the items in the list above.
REMOVE SOMETHING FROM THE SPOTLIGHT INDEX
This is really straightforward, but I thought I'd include it for completeness. Simply go to Sys-
tem Preferences and click on Spotlight. In the Privacy tab, click the plus (+) and choose your
file or just drag it from the Finder.
DigitalColor Meter Tips
One application that is extremely useful when doing any kind of design work is the Digital-
Color Meter. It allows you to get the exact RGB values for any pixel on the screen, which is
great for finding out which colours are used in web pages or photos. This is just about the only
thing that it does, but it does it well. You will find the DigitalColor meter in Applications/
Utilities.
You can get the color details in many different ways, the most common being RGB values. In
web design it is useful to have the RGB as an 8-bit Hex value, and in the Mac OS X color
picker you can type in the actual 8-bit RGB values.
Using the DigitalColor meter is pretty straightforward - Move the cursor over the pixel you
want to sample, and read off the values. There are some extra tools to help you do this however.
You can change the size of the area sampled by sliding the "Aperture Size" slider. On the far
left it looks at each single pixel, but to the right it averages multiple pixels to give the overall
effect.
When you are using the mouse to choose the color from an area of the screen, you obviously
can't go up to the menus at the top to choose any options. Therefore everything has to be done
with keyboard shortcuts. (The options are still located up in the menubar, so you can check
what shortcut does what if you forget). They are as follows:
Mac OS X Tips! 44
Command-X : Lock Horizontal Position
Command-Y : Lock Vertical Position
Command-L : Lock Position
Command-Shift-H ; Hold Color
Once you have chosen the colour you want, you can use the following shortcuts to copy it:
Command-C : Copies the Image in large box on the left
Command-Shift-C : Copies the RGB values as text
Command-Option-C : Copies the solid color as an image
It is also possible to save the image as a TIFF file by pressing Command-S.
Hidden Unix Games
These hidden games are accessible from any unix based operating system, including linux and
Mac OS X. To access them, start by opening up Terminal, located in Applications/Utilities. To
see a list of what’s available, paste in the following line and then press return.
ls /usr/share/emacs/22.1/lisp/play
To actually play one the games, open a new terminal window and type emacs and hit return.
Once in emacs, press Esc then x to get to the prompt. Now you can type any of the files in the
list to play them. My favourites are:
snake, tetris and pong, the old classics.
doctor, a shrink in your mac (he/she isn’t that helpful, unless you threaten to commit suicide)
life, one of the first screen savers.
dunnet, an old text based game where you can explore
zone, makes the text on your screen go crazy
Have fun!
Mac OS X Tips! 45
S ECURITY
Disable "Open safe files after downloading"
If you do one thing to make your Mac more secure, this should be it. Unticking just one
checkbox will protect you from most of the few dangerous Mac exploits around on the inter-
net. In Safari, choose Preferences from the Safari menu and then click on the General tab.
Near the bottom, un-check the checkbox that says "Open safe files after downloading". There.
Done.
Disable automatic login
Even if you only have one user on your Mac, requiring a username and password when starting
up is great for security, especially if you have a laptop that can more be easily lost or stolen. You
can do this from the Security section of System Preferences, by checking the checkbox "Dis-
able automatic login". While this isn't going to stop someone who is really intent on stealing
your personal data, regular thieves are more likely to just wipe the hard drive rather than going
through all your personal stuff first.
Lock screen when away
There are quite a few ways to make your Mac lock while you are away. The easiest way is to set
"Require password after sleep or screen saver begins" in the Security section of System Prefer-
ences. Here, you can also set a time limit so a password isn't required right away, but only after
15 minutes for example. If you want, you can then set a hot corner to start your screensaver, so
you can lock the screen by just moving the mouse into one of the corners. Alternatively, the
AppleScript chapter of this book has an explanation of how to set a keyboard shortcut to lock
the screen instead.
Use 1Password to create and store internet passwords
One of the problems with having lots of accounts on the internet is that for them to really be
secure, they should all have a different password. For example, if you use the same password for
your bank account, your email account and some shady disreputable website, you are asking for
trouble.
My solution to this is to use the application 1Password to create and remember all my pass-
words for me. The only three passwords that I remember myself are my email password, my
bank password and a master password for 1Password. All the others - for Facebook, reddit,
Amazon, etc - are randomly generated 20 character strings that are created and remembered
Mac OS X Tips! 46
for me by 1Password. When I go to one of those web sites, 1Password simply prompts me for
my master password, then fills in the rest for me.
Some of this functionality can be replicated for free using Keychain Access, but the real benefit
of 1Password is its automation, and the fact that it works in Safari, Firefox and on your iPhone
so you don't have to save your passwords separately for each.
Turn on the firewall
Mac OS X comes with a built in firewall, but it is actually turned off by default. You can turn it
on in the Security section of System Preferences. The Mac OS X firewall is really simple to set
up - just click start to turn it on. Some applications will have trouble working through the fire-
wall, instant messengers for example. If you find you start having connection problems with an
application, just add it to the allowed list in the firewall preferences.
Encrypt and hide your private files
It isn't entirely obvious how to password protect files or folders in Mac OS X but there are a
couple of ways.
If you just want to protect a single iWork or PDF document, you can do this from within the
specific iWork application or from within Preview. In Pages, Keynote and Numbers '09 you
can choose "Require password to open" from the Document section of the Inspector window.
In Preview, when choosing "Save As.." on a PDF there is a checkbox to encrypt.
If you want to password anything else, you have to password protect an entire folder. The way
this is done is using encrypted disk images. Once created these appear as a single file on your
hard drive with a dmg extension. When you double-click on one, it will ask you for the pass-
word. If you enter the password correctly, it will mount a disk image on your desktop. So while
unlocked, the disk image is just like a temporary folder on your desktop. You can copy files to
it and delete files from it, and as soon as you eject it, the contents will be password protected
again.
To create an encrypted disk image, open up Disk Utility (located in Applications/Utilities), go
to the File menu and choose New - Blank Disk Image. In the dialog box that appears choose a
name for your disk image and where you want to save it. The size is a maximum that the disk
image can hold, so the preset sizes for CDs and DVDs are useful for if you want to burn the
contents when it gets full. Choose AES-128 encryption and sparse disk image from the Format
drop down menu.
Now when you click Create, you will be prompted to enter your password. To really protect
your data, don't choose a password that you use for everything else or something that is easily
guessable. Press the key button next to the password field to open the Password Assistant. This
Mac OS X Tips! 47
will help you choose a password that is both easy to remember and hard to crack. The best
type to choose from the menu is "Memorable" as the others are a bit more complicated. Obvi-
ously longer passwords are more secure, but you have to find the right balance. If you don't like
the password that the assistant suggests, press the down arrow next to the password to see a
list of other suggestions. Alternatively, type in your own password and it will tell you how good
it is and give tips on how to improve it.
Remember to deselect the "Remember Password" option before pressing OK, as that would
really defeat the point of creating the disk image in the first place. Now your encrypted disk
image will be located in where you chose to save it. When you double-click it you will be
prompted for the password, then it will mount on your desktop and also appear in the Sidebar
of every window.
Use FileVault
Personally, I don't use this option, but for those who want to be ultra-secure it is an amazing
feature. It is similar to creating an encrypted disk image for some files, but instead it does this
for your entire user folder. It is much more straightforward and transparent than setting up an
encrypted disk image too. Just turn it on the Security section of System Preferences, and all
your files will be unencrypted and encrypted on the fly when you log in and out of your com-
puter.
Mac OS X Tips! 48
I would say this is probably overkill for most users. If you have an encrypted disk image for
your most sensitive files, then it is a bit redundant to then encrypt your entire user folder. It
also causes some problems concerning Time Machine backups, and also huge problems if you
happen to forget the password…
Secure Empty Trash
More and more people now realise that when you delete something off your hard drive, it
doesn't actually get physically removed from the disk. All references to it are gone, but it stays
there until something else is written over it. For private documents this is a bad situation be-
cause someone with some special software can recover you supposedly deleted files.
To prevent this, you can use the "Secure Empty Trash…" option which is in the Finder menu.
This takes longer than the normal trash emptying, because your computer is actually writing
nonsense data over the top of your deleted files.
Securely erase an entire hard disk
If you have an old Mac you are thinking of selling or throwing away, it might be a good idea to
securely erase all the data from it. To do this you need to start up from the installer CD that
came with your Mac by inserting it and holding the C key while the computer starts up. In the
installer, choose Disk Utility from the menu bar.
If the hard drive you want to erase is not your main hard drive, you can skip starting up from
the install disk and just open Disk Utility from the Utilities folder inside the Applications
folder.
In Disk Utility, choose the hard disk from the list on the left, click on the Erase tab, and then
click on the Security Options button. Now you have four levels of security to choose from.
Each higher level of security takes longer to erase, so the 35-pass erase will take upwards of 24
hours and is only for the truly paranoid.
Of course, if you are throwing away the Mac or even just the hard drive, nothing works better
and is quite as satisfying than the physical destruction option. Just take the hard drive out of
the Mac and completely destroy it with a hammer.
Mac OS X Tips! 49
S Y STEM PREFERENCES
Easily remove preference panes
You can quickly remove preference panes from System Preferences by right-clicking (or
Control-clicking) on them and choosing remove preference pane. Of course this only works on
the preference panes that you have installed yourself, i.e. the ones that appear in the “Other”
section.
Even though you can just Trash the preference pane file yourself, this is quite a good timesaver
if you can’t remember if you installed the preference pane for all users or just your user. De-
pending on which you chose, the file could be located in the Library folder in Macintosh HD
or the Library folder in your user folder. It’s much quicker just to do it straight from System
Preferences. Just like if you were Trashing the file, System Preferences will ask you for your
administrator password when removing preference panes for all users. These are the extra
preference panes I have isntalled:
Flip4Mac and Perian for video formats
Growl for notifications
GeekTool for displaying data on the desktop
Secrets for tweaking all those hidden settings.
Customize section titles
All the System Preferences panes are grouped into five categories - Personal, Hardware, Inter-
net and Wireless, System and Other. It is quite easy to change these category names by going
inside the System Preferences package. In the Finder, choose “Go to Folder” from the Go
menu and paste the following line:
/Applications/System Preferences.app/Contents/Resources/English.lproj/
In here, find a file named NSPrefPaneGroups.strings and drag it to your desktop. Now open
this file up in TextEdit and you'll see the following lines:
"personal" = "Personal";
"digitalHub" = "Digital Hub";
"hardware" = "Hardware";
"net" = "Internet & Wireless";
Mac OS X Tips! 50
"system" = "System";
"addons" = "Other";
Don't change the words on the left, these are the ones used by System Preferences. You can
change the words on the right. These are the ones displayed in the System Preferences window.
Just make sure you don't delete any quotes or semicolons. Also, ignore the "Digital Hub" entry.
This isn't used anymore and is probably just left over from a previous version of the operating
system.
Once you are finished, save the file and drag it back to the English.lproj folder from the Desk-
top. You will have to authenticate this action with your administrator password.
Globally enable Text Substitutions
You may have realised that the new text substitutions feature in Snow Leopard isn't enabled in
all applications by default, most noticeably in Safari. To enable it , you need to right-click on a
text box and choose Substitutions then Show Substitutions. Annoyingly, using this method you
have to do this for each individual application.
To globally enable text substitutions, you can use three Terminal commands. Start by opening
up Terminal (located in Applications/Utilities) and paste each of the following three commands
one at a time, each followed by return.
defaults write -g WebAutomaticTextReplacementEnabled -bool true
defaults write -g WebAutomaticDashSubstitutionEnabled -bool true
defaults write -g WebContinuousSpellCheckingEnabled -bool true
The first one will enable substitutions, while the second will enable dash replacement and the
third will enable spell checking. If you decide there are some specific applications where you
want to disable these again, you can do it in the normal way. As always you will need to restart
each application for the changes to take effect.
Set a screen saver as the desktop background
Unfortunately this is more of a novelty than a practical solution for you desktop, but it’s fun
nonetheless. First, make sure you have a cool screen saver chosen in the Desktop and Screen
Mac OS X Tips! 51
Saver section of System Preferences. Then open Terminal (located in Applications/Utilities)
and paste the following line.
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Content
s/MacOS/ScreenSaverEngine -background
Press return and then look at your desktop. To stop the whole thing and return to your normal
desktop, go back to Terminal and press Control-C. There are a few reasons why I wouldn’t
really recommend running this full time. Firstly, depending on which screen saver you are run-
ning and what Mac you are running it on, this make take up a large CPU load. Also, your nor-
mal background will be shown when pressing F9 or F10 to activate exposé. Finally, if your
screen saver starts (from a hot corner or by inactivity for a certain time) it will cancel the
screen saver on your desktop.
Keyboard Shortcuts to access System Preferences
To quickly go to the display, audio and keyboard preferences, you can hold down the option
key and press the relevant F-key.
On most new Apple keyboards this is printed on the keys - keyboard brightness, sound volume
and display brightness. On my Macbook, F1 and F2 control the display brightness, so pressing
Option-F1 (or F2) will takes me to the display preferences.
Create your own keyboard shortcuts
Using the mouse is not always the quickest way of getting things done. Keyboard shortcuts are
great timesavers, but not every command has one. Luckily you can create your own keyboard
shortcuts from the System Preferences to speed things up.
To do this, open up System Preferences and go to the Keyboard section. From the "Keyboard
Shortcuts" tab you can view and edit all existing keyboard shortcuts for the system. To change
any of them, double click on the current key combination then type your own. If the one you
set clashes with any others, a warning icon will appear next to it. To disable a shortcut, un-
check the box next to it on the left.
Note that this list does not contain any application specific shortcuts. At the bottom there is a
section for "Application Shortcuts" but this is probably empty. The only ones that appear here
are the shortcuts that you create. Click the small plus (+) button below the list to bring up a
dialog box that allows you to choose an application and menu command and assign a keyboard
shortcut to it.
The drop down menu contains all the applications in the applications folder, but if you want
another one, choose other from the bottom of the list. Next enter the exact name of the menu
item you want to create the shortcut for. This can be anything that appears in an application's
Mac OS X Tips! 52
menus, but don't forget to include the "..." at the end if the item has it (e.g. Customize Tool-
bar...").
The keyboard shortcut can use a combination of the Command, Control, Option and Shift
keys, as well as any of the function keys (F1, F2 etc.). For some of the nested menu items it isn't
obvious what to type. For example, to choose the menu item "Arrange by --> Kind" you have
to type "By Kind".
After entering all the details, click add and your shortcut will be added to the bottom of the
list under "Application shortcuts". You will have to quit and reopen the application for every-
thing to start working. To do this for the Finder, Control-Option click on its Dock icon and
choose Relaunch.
Mac OS X Tips! 53
G EEKTOOL
GeekTool is a preference pane that allows you to display little bits of text, images or informa-
tion on your desktop. Start by downloading it from here, and install it by double-clicking on
the preference pane. You can now access it by going to System Preferences and looking in the
bottom row. You can now display little bits of information, known as “Geeklets” on your desk-
top. Here’s an example screenshot, with todays date, iCal events and to do items, unread mail,
and top processes shown. There is a community at macosxtips.co.uk/geeklets where you can
download and share geeklet files. I’ve included my favourites in this book, along with some
general tips for GeekTool.
Date and time
Here’s an introductory example to get you started. Once you click on the GeekTool section in
System Preferences, you will see a window with three different icons. Drag the one called
“Shell” to a position on the desktop behind the window. A black “Properties” inspector window
will appear, where you can enter the settings for this geeklet. The bits you need to change are
the Command and Style sections. In the command box, paste date +"%I:%M" and click the
button below to set the font and colour to something that complements your background and
make it a bit bigger. It should display the current time. You can then repeat the same process
to make other geeklets using different commands and fonts. There are loads of different varia-
Mac OS X Tips! 54
tions of the date command so you can make a collection of different geeklets to show you the
current date and time. Here are some
more examples:
Date: date +%d
Month: date +%B
Day: date +%A
Time: date +"%I:%M"
AM/PM: date +"%p"
date
date +"%a %e %B"
date +"%A %d %b"
date +"DATE: %Y-%m-%d%nTIME: %H:%M:%S"
Today’s iCal events and to do list
Here’s a way of quickly checking what you need to do that day without having to open iCal,
Dashboard or any other application. You do however have to
have iCalBuddy installed, but this is really easy. Start by
downloading iCalBuddy from http://hasseg.org/icalBuddy/
and then double-click on the file to unzip it. Then double-
click the install.command file, and enter your administrator
password when the window appears. You can now close the
window and go back to GeekTool to create some geeklets
with the following commands:
usr/local/bin/icalBuddy -nc eventsToday | sed -e "s/
*/--/" | sed -e "s/!/!!/"
and
/usr/local/bin/icalBuddy -nc uncompletedTasks | sed -e
"s/*/--/" | sed -e "s/!/!!/"
If you want to add some titles like those shown in the screen-
shot on the right, the easiest way is to use the echo com-
mand. Just create a new geeklet and use something like the
following:
echo To Do List
Another thing you will want to change with these geeklets is
the refresh rate. Although running these geeklets shouldn’t
be too intensive, it’s wasteful to have the updating very regu-
larly. I often set most of my geeklets to refresh every 3600
Mac OS X Tips! 55
seconds, or once per hour. Of course you can’t really do this with the current time or anything
that changes more often, but for things like today’s events or the current month it’s much bet-
ter.
Activity monitor on the desktop
You may be familiar with the Activity Monitor application (located in Applications/Utilities)
that shows you a list of all the running applications on your Mac and lets you sort them by how
much CPU or memory they are using. This command displays the top 10 process sorted by
their memory usage. Just create a geeklet for it like usual, but you will probably have to use a
fixed-width font like Courier so the columns line up correctly.
ps -amcwwwxo "command %mem %cpu" | head -11
Alternatively, if you want to sort the items by CPU usage, use the following command.
ps -amcwwwxo "command %cpu %mem" | head -11
For both versions you can change the number at the end to make the list longer or shorter.
Display basic computer info
This command displays the following basic system stats:
Computer name (e.g. Matt's MacBook)
OS version (e.g. Mac OS X 10.6.2 10C540)
Amount of RAM (e.g. 2GB RAM)
Processor (e.g. Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz)
This is really useful if you have lots of computers that look identical and you want to quickly
tell which one is which. Each line is actually a separate command, but they should all work to-
gether in one geeklet.
scutil --get ComputerName;
sw_vers | awk -F':t' '{print $2}' | paste -d ' ' - - -;
sysctl -n hw.memsize | awk '{print $0/1073741824" GB RAM"}';
sysctl -n machdep.cpu.brand_string;
Free disk space and capacity
This command shows how much free disk space you have left. "disk0s2" in the command is the
identifier for the hard drive. Your's might be different, so you can check using Disk Utility (lo-
cated in Applications/Utilities). Just click on the hard drive in the list on the left and choose
Get Info... from the File menu (Command-I). The Disk Identifier property is near the top of
the info window.
Mac OS X Tips! 56
The second part of the command is awk which rearranges the output. You can change this
around. Just make sure all text is inside double-quotes, and all variables (e.g. $2) are outside. $2
gives the capacity, $3 gives the used, $4 gives the free, and $5 gives the percentage used.
df -hl | grep 'disk0s2' | awk '{print $4"/"$2" free ("$5" used)"}'
A single line weather forecast
This command gives you a weather forecast in a single short sentence. As with most of the
weather scripts, this requires a US zip code. In the command you will need to replace 12345
with your zip code.
curl -s http://www.wunderground.com/cgi-bin/findweather/getForecast?query=12345 | awk
'/Today is/ || /Tomorrow is/' | textutil -convert txt -stdin -stdout -format html
You will want to increase the refresh time to at least 3600 for this geeklet to avoid slowing
down your computer.
Some general GeekTool tips
1. SET STACKING ORDER
If you have overlapping Geeklets, you might find that the wrong one is on top. Just right-click
on the Geeklet and change the order by choosing “Send to back” or one of the other options.
2. DON’T SET REFRESH TO ZERO
By default, GeekTool sets the refresh time to 0, which means it continuously refreshes as
quick as it can. It is best to avoid this as it can take a considerable toll on your system, hogging
resources and slowing things down. For things that really have to be updated very regularly,
consider a refresh time of 5 or 10 seconds instead.
3. GROUP YOUR GEEKLETS
By putting your Geeklets into separate groups, you can quickly and easily enable and disable
them based on their grouping. Note that Geeklets can be in multiple groups - as long as one of
the is enabled, the Geeklet will be shown.
4. USE THE MENUBAR ITEM
GeekTool now has a menubar item that you can enable from the preference pane. From here
you can enable and disable groups, force a refresh on all Geeklets, disable GeekTool, and ac-
cess the preference pane.
Mac OS X Tips! 57
5. CHECK OUT OTHER PEOPLE’S GEEKLETS
This is just a selection of my favourite geeklets. For more visit the Geeklets web site. There are
loads of different ideas submitted by different members of the community, along with screen-
shots and ideas for fonts and layouts.
Mac OS X Tips! 58
MAIL
Fix "Copy Address" in Snow Leopard Mail
You can copy a person's email address in Mail by clicking on their name and choosing "Copy
Address from the contextual menu. For some reason, Snow Leopard will copy the email ad-
dress in angle brackets, instead of just the address. So when pasting you will get
<matt@macosxtips.co.uk> instead of just matt@macosxtips.co.uk.
This might be useful for some people, but I really prefer the previous behaviour. To change the
behaviour of Mail back to the old way without angle brackets, just use the following Terminal
command:
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool NO
To run it, open up Terminal located in Applications/Utilities. Paste in the line, then hit return.
Quit Mail if it is open, and now when you next open it you won't get any angle brackets when
copying addresses.
Customize default fields for new messages
When you create a new message in Mail, you will specify who the message is to and the Sub-
ject. However, there are a lot of other fields that aren't enabled by default. You can change
what appears by clicking on the button in the bottom left of the toolbar and choosing "Cus-
tomize..." from the list.
You can enable a signature drop down menu, a priority drop down menu, a Reply to field and
drop down menus for choosing which account to send from. For me, Cc and Bcc were already
enabled, and I chose to disable them as I almost never use them.
Mac OS X Tips! 59
Get Windows Live Hotmail in Mail
I get a lot of people sending in questions asking how to set up Hotmail with the Mail applica-
tion in Mac OS X, and until recently it has been a real pain to do. Now, however, it is a lot eas-
ier to set up and doesn’t require any third party software. Start by opening up Mail and going
to the Preferences. Click on the Accounts tab and create a new account by clicking on the plus
(+) at the bottom. Enter your name, email address and password, then click continue to set the
incoming mail settings. Enter the following:
Account Type: POP
Description: Hotmail (or whatever you like)
Incoming Mail Server: pop3.live.com
Username: Your email address
Password: Your password
In the next section, you should leave the Use SSL checkbox checked and Authentication as
Password. For the outgoing mail settings, enter the following:
Description: Hotmail (or whatever you like)
Outgoing Mail Server: smtp.live.com
Check “Use only this server”
Check “Use Authentication”
Username: Your email address
Password: Your password
As before, leave Use SSL checkbox check and Authentication as Password.
Now you should be able to both send and receive email from the Mac OS X Mail application.
Link to Mail messages in Stickies
Stickies is great for keeping notes and reminders on your Mac without having to go to the has-
sle of opening up iCal and creating a to do list. Often you will receive an email message which
you need to respond to or do something with. You can flag it in Mail (Command-Shift-L) but
this doesn't allow you to add any extra text to remind you what you actually wanted to do with
the email.
If you use Stickies a lot, a great way to keep a reminder of the email is to just drag it to a sticky
note. A link will automatically be created that takes you back to the exact message in Mail
when you click it.
Mac OS X Tips! 60
If the message has a subject, that will be the link text. Otherwise it will be something like
message:%2DC4DABB48-CEC9-4301-B56D-249C041CDBEA@mac.com%3E (which is the
actual link — try pasting it into Safari). You can change the link text by selecting it and typing
something new. However, if press delete at any time while writing the new text, everything you
write from then on won’t be linked.
So if you keep a To Do list in Stickies, and you have to do something like “Reply to Bob”, you
can now add a link to that To Do item so you don’t have to search through your inbox for the
message.
Force all Mail to be displayed as plain text
If you really dislike HTML emails that take ages to load all their images, the following Termi-
nal command is for you. Just open up Terminal (located in Applications/Utilities), paste the fol-
lowing line and press return.
defaults write com.apple.mail PreferPlainText -bool TRUE
Next time you open Mail, all your mail will only be displayed in plain text. Most HTML mes-
sages have a link at the top to view in a browser that you can click if the message isn’t displayed
properly. Repeat the command with FALSE instead of TRUE to reverse.
Mac OS X Tips! 61
QUICKTIME
Autoplay movies
One of the weird things about the new version of QuickTime is that it has no Preferences.
Luckily you can still change things using the Terminal. To make a movie automatically start
playing when you open it, open Terminal (located in Applications/Utilities), paste the following
line and press return.
defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen 1
Keep in full screen when switching applications
If you are watching a movie in full screen in QuickTime and you use Command-Tab to switch
to another application then the movie will automatically exit full screen. To make it stay full
screen in the background, use the following command:
defaults write com.apple.QuickTimePlayerX MGFullScreenExitOnAppSwitch 0
Disable Rounded corners
If the slightly rounded corners of movies in QuickTime bug you, use the following command
to disable them:
defaults write com.apple.QuickTimePlayerX MGCinematicWindowDebugForceNoRoundedCorners 1
Automatically show closed captioning and subtitles on opening
This turns on subtitles and closed captioning automatically when you open a movie that sup-
ports them.
defaults write com.apple.QuickTimePlayerX MGEnableCCAndSubtitlesOnOpen 1
Mac OS X Tips! 62
D O C K, EX P O SÉ AND DASHBOARD
Make list view stacks work like grid view Stacks
This command slightly changes the behaviour in Stacks in list view. Once enabled, they act
more like grid view Stacks, but with a single list of files and icons on the left. The main differ-
ence is when "drilling-down" through folders within the Stack. To run the command, open up
Terminal (located in Applications/Utilities), paste the following line and press return.
defaults write com.apple.dock use-new-list-stack -bool YES
You will need to restart the Dock for changes to take effect. The easiest way is to use killall
Dock in the Terminal.
Enable mouseover highlight in stacks
If you want items in grid view stacks to highlight when you move the mouse over them, use the
following command. Also, note that you can get the highlight behaviour in Snow Leopard
without using this command by using the arrow keys to select items in a stack, or by clicking
and holding on a stack before dragging the mouse up onto the grid.
defaults write com.apple.dock mouse-over-hilite-stack -boolean yes
You will need to restart the Dock for changes to take effect. The easiest way is to use killall
Dock in the Terminal.
Mac OS X Tips! 63
Exposé and Spaces tricks
Most people are aware of the different application and window switching tricks in OS X, but
real power in tools like Exposé and Spaces is when you start combining them and using them
together to really save time.
Firstly lets quickly go through the different ways to switch between applications and windows.
The most basic way is to use the keyboard shortcut Command-Tab to cycle through your open
applications, and Command-~ to cycle through the open windows of the current application.
On top of this, you have the three different options for Exposé: Show all windows (F9), show
current application windows (F10) and show desktop (F11). Your function keys may be different
if you have one of the newer MacBooks, or if you have changed them in System Preferences.
Finally, there is Spaces (F8), which allows you to switch between collections of applications and
windows that you have organised into workspaces.
Using some of these techniques simultaneously is a great way to save time. My personal favour-
ite is combining Exposé and Command-Tab. Start by invoking Exposé for current application
windows (F10). Once all your windows are shown, you can hit Tab to make Exposé cycle
through showing windows for each application individually.
If you are anything like me, when you have applications running in lots of Spaces you occasion-
ally lose track of things. If you have completely lost a window, a great way to find it is to first
invoke Spaces (F8) and then Exposé for all windows (F9). First, all of your spaces will appear,
then Exposé will rearrange all the windows in every space so you can see them all. You can still
drag windows between spaces, and as you do, other windows will automatically rearrange so
you can still see them all. And as always with Exposé, hovering your cursor above one of the
windows will give you its name.
The best way to find out what combination tricks work best for you is to just try hitting the
different function keys in different situation. If you find any other great time-saving combina-
tions, let us know in the comments.
Quickly kill accidentally opened applications
If you are clumsy like me, you will often accidently click the wrong icon in the Dock. Or
maybe you occasionally want to stop iTunes opening up when you plug in your iPod. If you are
quick enough, you can just right-click (Control-Click) on the icon in the Dock and choose
Force Quit. If you are too late, pressing the Option key will change Quit to Force Quit so you
can close the unwanted application even faster.
Mac OS X Tips! 64
Diagnostics on the Dock
One of the great features of Safari on the Mac is the way it handles a network outage. If you’re
somewhere with an unreliable connection, say because you’re using a distant wireless network,
then Safari will give you a message if it can’t connect to the internet with a button to click to
open the network diagnostics window. What’’s more, it automatically loads pages if the net-
work becomes reconnected.
The diagnostics window is great because it gives you clear red/green indicator lights that show
what’s working and what isn’t so you can quickly diagnose connection issues and find out
whether it’s something wrong with your computer or with the network.
But what if your browser of choice isn’t Safari, or if you have to deal with tricky or unreliable
network issues when using Mail or and instant messenger? Well, you don’t need to go and use
Safari, you can just open the Network Diagnostics application directly. The problem is, it’s not
in the Applications or Utilities folder, it’s buried in /System/Library/CoreServices. For a quick
convenience diagnostics tool this is not so handy.
To make the Network Diagnostics application more accessible, first navigate to /System/
Library/CoreServices. Look in this folder for Network Diagnostics, and drag it to the Dock.
Now, whenever you have problems connecting to the internet via an application other than Sa-
fari, you can simply click on the icon in the Dock to find out what’s wrong.
If you don’t like a whole dock space being taken up with it, then you could make a shortcut to
the application and add it to a folder of other applications stored in a neat stack at the docu-
ments end of the dock.
Add Spacers to the Dock
If you want to divide the applications in your Dock into groups, the best way is to add spacers.
A common method is to create "fake" applications with an invisible icon to fill the space, but
that is a bit inelegant. A much better way, available in Leopard and Snow Leopard, is to use a
Terminal Command. Each time you run the command it inserts a blank "space" into your
Dock, which you can then drag around to where you like.
Mac OS X Tips! 65
Start by opening up Terminal, located in Applications/Utilities. Type the following line and
then hit enter:
defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-
type="spacer-tile";}'
For the changes to take effect you will have to restart the Dock, either by logging out and in
again or by running the killall Dock command in the Terminal. The spacer appears at the end
of the icons that are permanently in the Dock. You can then drag it along to where you want it.
The above command inserts the spacer on the applications side of the Dock. To insert a spacer
on the right hand side, use the following command:
defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-
type="spacer-tile";}'
As always, you will have to run killall Dock for changes to take effect. To add multiple spacers
just run the command again and again. Note that you can use the "up" arrow in terminal to cy-
cle through the recently used commands.
If you want to remove a spacer, treat it like any other icon in the Dock. Either drag it off and
let go to get a nice puff of smoke, or right-click on it and choose "Remove from Dock".
Make the Dock appear when it refuses to show
If you have you Dock set to automatically show and hide, you make have noticed that occa-
sionally it refuses to appear when you are dragging an icon onto it. This drives me crazy when I
am trying to eject disk images. I drag the icon down to the bottom of the screen, but the Dock
simply doesn't appear. Normally my solution is to give up, right-click on the icon and choose
eject, which takes far too long.
A much quicker way is to simply use the keyboard shortcut Command-Option-D, which turns
on/off Dock hiding. You don't even have to stop dragging your icon to do this, and it works
whatever application you are in.
Next time the Dock fails to appear, while still dragging your icon, simply hit Command-
Option-D and the Dock should spring up. Drop your icon onto the trash (or eject icon, or
whatever you want), and then just hit Command-Option-D again to make the Dock disappear
again.
Mac OS X Tips! 66
Disable the Dock icon for any Application
There are many applications on your Mac that don't need a Dock icon. Having a Dock icon for
applications that are accessed through a menu bar item or constantly run in the background
would just waste space and clutter up your Dock. Many applications like this automatically
hide their Dock icon (Google Notifier, Quicksilver) however some don't (Launchbar, Hard-
wareGrowler).
Luckily, if it is a cocoa application, you can hide the Dock icon yourself. To see if it is possible,
find the application in your Applications folder and right-click (Control-click) on it. If "Show
Package Contents" is in the menu that appears, you can hide the icon in the Dock.
If this is the case, select "Show Package Contents" and look for the "Info.plist" file inside the
Contents folder. Open this file using TextEdit by right-clicking on it and choosing "Open With
- Other" from the menu.
In the file, paste the following two lines just after <dict> on the 6th line:
<key>LSUIElement</key>
<string>1</string>
Save the file and close it. For the changes to take effect, you need to move the application to
the desktop and them back to its original location (OS X keeps a cache of the file, so you need
to trick it into checking it again).
Now when you open the application, no icon will appear in the Dock. I wouldn't recommend
doing this with your regular applications like iTunes and Safari as this also has the side-effect
of disabling the menu bar. This means that you will have to quit the application using the key-
board shortcut Command-Q. If the application doesn't have any windows, you will have to quit
it from Activity Monitor (in Applications/Utilities).
To bring back the Dock icon, simply open up the Info.plist file and remove the lines you
added.
Drag Chunks of Text onto Dock Icons
You probably know that you can drag and drop chunks of text around Mac OS X. For example
you could select and drag a paragraph from Safari to TextEdit. It's also fairly well know that
you can drag files onto application icons in the Dock to open them in that application. Less
well known is what happens when you drag bits of text onto Dock icons.
Doing this with different applications will produce different results. If the application will ac-
cept the text, it will darken when you hold the selection over it. Note that some applications
will only accept the text if it is in a certain format (a web address for example). Here are the
results with a few common applications. If you know of any more, add them in the comments.
Mac OS X Tips! 67
Safari - If you drop a web address (i.e. something that starts with http://) on Safari, it will load
up that address. If you drag any other bit of text, it will perform a Google Search on it. This is
mainly useful if the text is from a non-cocoa app that doesn't have the "Search in Google" item
in the right-click context menu.
Firefox - If dropped text is a web address, Firefox will load it. This is helpful if you want to
view a site in a browser other than your default browser.
Mail - A new message will load up with the dropped text as the main message body. Annoy-
ingly the text is placed in the body even if it is an email address.
TextEdit - As expected, this loads a new document containing the dropped text.
Skype - If the dropped text is a phone number, Skype will call it. This will also work with
nicknames in your contact list.
AppleScript Editor - A new script window will open up containing the dropped text. Script
Editor will then attempt to compile it.
iTunes - If you drop a podcast address onto iTunes, it will subscribe to it. If the address isn't a
podcast, iTunes will attempt to do it anyway (and fail).
NetNewsWire and Newsfire - Adds a new feed with the text as the address. (Why not try it
out with http://feeds.feedburner.com/macosxtipsfeed )
Stickies - This will make a new Stickies note containing the text open up.
Dictionary - This will show you the definition of the dropped word. If you drop a selection of
words, Dictionary will display the definition of the first.
Most of these also work if you drag the text to the desktop to create a text clipping first, and
then drag it to the Dock icon.
Make hidden applications' dock icons translucent
When you a hide an application using Command-H or the menu item, all its windows are hid-
den from view until you click on it in the Dock or switch back to it using Command-Tab. By
looking at the Dock, you can’t tell which of your applications are hidden and which aren’t. To
make hidden applications’ icons slightly faded and transparent, open up Terminal (located in
Applications/Utilities) and paste the following line into the window:
defaults write com.apple.Dock showhidden -bool YES
Press return and then restart the Dock by logging out and in again or running killall Dock in
the Terminal. To reverse this, run the command again with NO at the end instead of YES.
Mac OS X Tips! 68
Drag Dashboard widgets onto the desktop
The following command allows you to drag widgets out of Dashboard onto the desktop. Open
up Terminal (located in Applications/Utilities), paste the following line and press return.
defaults write com.apple.dashboard devmode YES
It requires you restart the Dock by logging out and in again or running killall Dock in the
Terminal. Now, if you click and hold onto a widget in the dashboard and press F12 (or whatever
your Dashboard key is) to return to the desktop, the widget won't disappear with the rest. Put
NO at the end to reverse.
Mac OS X Tips! 69
PR E VI EW, P RINTING AND PDFS
Crop multiple pages in PDFs at once
If you find you have a multi-page PDF with huge margins on every page, you can use Preview
to crop those margins down. With the PDF open in Preview, make sure that the sidebar is visi-
ble (in the View menu) and set it to display thumbnails using the button at the bottom. Change
to the select tool using the toolbar button, the Tools menu or by pressing Command-3. Drag a
box around the region you want to keep, then click in the sidebar and press Command-A to
select all pages. If you have some pages that are a different orientation (i.e. landscape), you can
hold Command and click on these pages to de-select them. Finally, choose Crop from the
Tools menu, or just press Command-K.
Quickly Trash Images
While viewing an image in Preview, pressing Command-Delete will move it to the Trash, just as
if you had selected its icon in the Finder. This is useful if you want to cycle through a collection
of photos using the Up and Down arrows, and press Command-Delete to Trash the unwanted
ones. You can also drag the thumbnail from the sidebar to the Trash.
Mac OS X Tips! 70
Open a Folder of Images
Dragging a folder onto Preview's icon in the Dock will cause it to open up every image in the
folder. Be careful when doing this with a folder with lots of images in. If you do this with your
Pictures folder for example, it will open your entire iPhoto Library. If you are adventurous,
have a go at doing this with an application (they are just disguised folders anyway). Strangely,
Preview can "open" itself.
Image Correction Tools
Preview offers a lightweight alternative to iPhoto's image correction tools. This is accessible
from the Tools menu by choosing “Adjust Color”, and offers almost everything iPhoto does. Be
warned through, there is no undo option for these changes, so the only way to go back is to
revert to the last saved copy.
Bookmark Images and PDF pages
This feature was originally designed for long PDF files. If you want to save a certain page for
reference or are half way through a long ebook and want a break, you can bookmark the page
by pressing Command-D or by choosing Add Bookmark from the Bookmarks menu. Interest-
ingly you can also bookmark images that you use often so you don't need to locate them first.
Drag 'n' Drop Printing
In Mac OS X there is a way to print documents right from the desktop, without having to
open up the application first. This is done by creating a "Desktop Printer," essentially an alias
that you can drag and drop files on to print them.
Start by opening up System Preferences and going to the Print and Fax section. Now all you
have to do is select your printer from the list on the left and drag it to the desktop. This cre-
ates an icon for your printer on the desktop.
To print a file, just drag and drop it onto the icon. Many documents will just instantly print,
however others will launch the application and open up the Print dialog for you.
Mac OS X Tips! 71
SAFARI
Drag and drop onto "Choose File" buttons
When a website prompts you to upload a file to the internet, it will probably use a "choose
file" or "browse" button. For example when choosing an attachment in Gmail, or when upload-
ing a photo to Facebook. In Safari, you can speed things up by simply dragging and dropping
files onto this button, instead of first clicking on it and then looking around your hard drive for
the file you want. Simply drag your file from the Finder, hold it over the button and then let go.
Enable Single Window Mode
If you use Safari regularly, you may notice that certain links refuse to open in the same window.
If a link is set to open in a new window, normally holding down Command while clicking it will
make it open in a tab instead. However, in certain places (like Gmail messages) links open in a
new window no matter what you do.
The following Terminal command changes the behaviour such that links that would ordinarily
open in a new window now open in a new tab instead. Start by opening up Terminal (located in
Applications/Utilities), and paste in the following line:
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
Press return, and quit and reopen Safari. Now all links targeted for a new window will open in
tabs instead. To change back to the normal settings, use the same command but with false at
the end instead of true.
Mac OS X Tips! 72
Enable URL Tooltips on links
Tootips are the little yellow boxes that appear when you hold your mouse over certain inter-
face elements. For example, if you hold the cursor over an image in Safari, the alt text will ap-
pear. To make it disappear, just hit return.
When you hold your mouse over a link in Safari, nothing happens. But using a simple Terminal
command, you can make it display a tooltip containing the address of the link. Open up the
Terminal application (in the Applications/Utilities folder) and paste the following line:
defaults write com.apple.Safari WebKitShowsURLsInToolTips 1
Then press enter. You will need to quit and reload Safari for changes to take effect. Repeat with
a 0 at the end instead of a 1 to reverse this.
Merge Windows
In Safari you can now drag and drop tabs. You can drag a tab off the bar to create a new win-
dow or drag it onto an existing window to add it. You can also use this to rearrange the order
of your tabs. If you have lots of open windows each with different numbers of tabs, there is an
easier way to get them all into one instead of dragging and dropping. In the Window menu you
will find the "Merge All Windows" command. This will instantly combine all your open win-
dows into one tabbed window.
The Activity window
The Activity windows is accessible from the Window menu in Safari or by using the keyboard
shortcut Command-Option-A. When you first open the Activity window, it will show a list
containing the titles of every Safari window you have open. Clicking the disclosure triangle
next to one of the names will expand it to list every item on the page. As well as the HTML
files and scripts, this includes media such as images and movies that are on the page.
One of the best uses of the Activity window is to check the cause of a problem. If you are
browsing a page and it fails to load, or it is taking ages to open, try taking a look in the Activity
window. Down the right hand side you will see the size of each item. If an item is still loading
this will show you how much has loaded, and if there is a problem you will see "not found" or
"timed out".
Mac OS X Tips! 73
Another use of the Activity window is to download embedded media such as YouTube videos
or PDFs. When these files are embedded in a page, it is not always easy to download them. If
there was a link to the file, you could just hold the Option key and click it, but what do you do
if there isn't?
For Quicktime movies and MP3 files, this is easy. Open up the Activity Window and locate the
file. it should be a relatively large file with something like a .mov, .mpg or .mp3 file extension.
Once you have found it, simply hold Option and double-click on it. Alternatively, pressing
Option-Return will download whatever item is selected in the list.
For flash videos, you will want the .flv file. It's not always obvious which file this is. It should be
the largest file on the page, and may still be loading. For YouTube videos, it is called get_video
and doesn't have the .flv extension. Double-clicking this file will start it downloading. If the file
doesn't have the .flv extension, you will have to add it on after the download has finished.
Enable Web Inspector
The Web Inspector is a great tool for web developers, as it allows you to see the HTML and
CSS code that creates a web page. You can inspect various elements of the web page and view
their style, metrics and properties. To get to it, just right-click on any web page and choose
“Inspect Element” from the menu.
Mac OS X Tips! 74
Quickly Jump to Address Bar
When you start Safari or open a new Safari window, normally the address bar is highlighted.
This means that you can start typing an address straight away. However, if you have Safari set
to automatically display your home page when opening a new window, the address bar is not
highlighted.
For example, if you have Google as your home page, when you load up Safari or open a new
window the Google home page will load and the search box will be highlighted instead of the
address bar. If you type an address and press enter, it will Google search the address rather
than just going to it.
So how do you solve this? The answer lies with keyboard shortcuts. As you only use the key-
board when typing in a web address, you don't want to have to move your hands to the mouse
and click on the address bar before typing. Instead of doing this, simply hit Command-L be-
fore typing the address. You will notice that the address bar automatically highlights, ready for
you to type away. The command is actually located in the File menu, as "Open Location..." and
conveniently the same keyboard shortcut works in Firefox.
If you don't have any Safari windows open, Command-L will open up an empty window and
highlight the address bar. This is similar to the function of Command-N for a new window, but
Command-L has the added benefit of opening an empty window, even if you have Safari set to
automatically open your home page.
As a bonus tip, hit Command-Option-F to quickly jump to the Google search box in the top
right.
Auto-Tab Bookmarks
If you visit the same collection of website every day, this will save you making multiple trips to
the bookmarks menu.
In Safari, click on the bookmarks button and create a new folder, giving it a descriptive name.
Copy/Move all your favourite bookmarks into it, and drag it to the bookmarks bar.
Then enable the "Auto-Click" option next to the folder. Now a small square will appear next to
your bookmark folder instead of a downward arrow, and when you click it, each site will open
in a separate tab.
Mac OS X Tips! 75
F IREFOX
Multi-touch tab switching in Firefox
Using a hidden setting you can switch tabs in Firefox by making a twisting motion with your
fingers. This will only work if you have a multi-touch surface like the trackpads on newer
MacBooks. You will also need to make sure you have the latest version of Firefox.
To change the setting, just type about:config into the address bar. A warning will appear telling
you that these are advanced settings. Click the “I’ll be careful, I promise” button to continue.
Don’t worry about breaking anything, you can right-click and choose reset on anything you
change.
Type “twist” into the filter box to filter down to just the settings we want. Find
browser.gesture.twist.right and double-click on it. Change the value to Browser:NextTab. Do
the same for twist left, but use Browser:PrevTab instead. The gesture should work right away.
Try putting one finger down and rotating another around it.
If you find that it is a bit slow to respond, you can change browser.gesture.twist.threshold to a
lower value.
Changing the filter to “gesture” will let see all the other gestures that are available. Pinching is
set to zoom, and swiping is set to go back and forward. You can change any of these to do
something else if you want. For example, the twist gesture is a bit awkward, you might prefer
to have tab switching set to the swipe gesture instead.
Mac OS X Tips! 76
Some more about:config settings
In addition to the multi-touch tab switching explained above, there are loads more hidden
Firefox settings you can change on the about:config page. Here are 12 of my favourites.
As explained above, to get these options type about:config into the Firefox address bar. Once
you hit return, click "I'll be careful, I promise!" to bring up a huge list of preferences, most of
which aren't accessible from the normal Preferences dialog. As the list is so long, the best way
to find things in it is to start typing the name of the preference into the "Filter" box at the top.
Once you have found the one you want, double-clicking it allows you to change it.
BROWSER.URLBAR.CLICK SELECTSALL
The default behaviour, true, means that when you click the address bar, it automaticall selects
all. Changing this to false stops this, and just inserts the cursor where you clicked.
BROWSER.TABS.CLOSE BUTTONS
By default, Firefox displays a close button on every tab. Setting this preference to 0 will only
display a close button on the currently open tab. Setting it to 3 will move the close button to
the far right end of the tab bar, and setting it to 2 will get rid of all close buttons.
BROWSER.SEARCH.OPENINTAB
Double-clicking this will set it to true. This makes searches from the box in the top right open
in a new tab rather than the current one.
BROWSER.URLBAR.MAX R I C H R E S U LT S
Determines the maximum number of results that drop down from the URL bar when you start
typing. Default is 12.
B ROW S E R . F I X U P . A LT E R N AT E . S U F F I X
Allows you to change the suffix that is automatically added when you don't specify one. For ex-
ample you might want to change this to .co.uk so you will be directed here if you only type
www.macosxtips.
BROWSER.TABS.LOAD FOLDERANDREPLACE
If you open a whole folder of bookmarks at once using "Open All in Tabs", they replace all of
your open tabs. Setting this preference to false will cause the new tabs to only replace the cur-
rent tab and add in the rest after it.
Mac OS X Tips! 77
ACCESSIBILITY.TYPEAHEADFIND.CASESENSITIVE
Setting to 1 Makes the Find function (Command-F) case sensitive.
UI.CLICK _HOLD_CONTEXT_MENUS
Set this to true to enable the click-and-hold way to open contextual menus.
BROWSER.TABS.TAB MINWIDTH
If you open lots of tabs in Firefox, they shrink down so they all fit across the screen. After a
certain limit, your tabs don't get any smaller and you have to scroll to the left and right to view
other tabs. This preference allows you to set the minimum width. Default is 100, lower values
will give smaller tabs.
BROWSER.CHROME.TOOLBAR _TIPS
Setting this to false disables the yellow tooltips that appear when you mouse over the book-
marks bar.
L AYO U T . S P E L L C H E C K D E FAU LT
Changing this value to 2 makes the spell checker work in all text boxes, not just the large text
fields.
BROWSER.BACKSPACE _ACTION
This changes the behaviour of the backspace key. setting it to 1 makes the backspace key scroll
up a page in the current window. Shift-Backspace will scroll down. 2 to make the backspace key
do nothing. Except delete when text is selected, of course. Changing to 0 will change back to
the default behaviour of going back a page.
Mac OS X Tips! 78
G ENERAL TIPS
Ignore Software Updates
It's really convenient that you get get all the updates for the Apple software on your Mac by
going to the Apple menu and choosing "Software Update...". However, occasionally you might
want to skip an update, and you don't want Software Update to carry on reminding you to up-
date. A common example is a printer drivers update for a printer you don't use very often or
not at all any more.
To ignore an update, just select it in the list and choose "Ignore Update..." from the Update
menu. Alternatively you can just press the delete key. Now the update will stop showing up in
the list of new software.
If you change your mind, you can all you ignored updates back by choosing "Reset Ignored
Updates" from the Software Update menu. Unfortunately this will bring back all of your ig-
nored updates, so if you only want to bring back one you will have to ignore all the rest again.
Make rectangular selections (Cocoa apps only)
This is one of the best tricks for saving time when you are moving round chunks of text. If you
want to select a column in a table or remove the numbers from the start of each line in a list
you would normally have to go through every line individually. This can be hugely time con-
suming if you have a long list. To get around this, just hold the Option key while making the
selection. Now you can draw a box around the stuff you want to copy or delete etc. and not
worry about having to select entire lines.
Create double-clickable dvdmedia movie bundles
When you rip a DVD to your Mac you end up with a VIDEO_TS folder, which can be dragged
to DVD player icon to play the DVD (you might find some stubborn DVDs will only play in
VLC though). As the DVD media is a folder, obviously you can't double-click it to open it in
DVD Player. Instead you have to do the cumbersome open-the-app-then-drag-and-drop-to-
icon procedure.
Mac OS X Tips! 79
The way around this is to rename the folder with the .dvdmedia extension. This will turn the
folder into a bundle, and add a nice DVD icon as well. Double-clicking this will automatically
open it up in DVD player, but you can easily change this to another app like VLC for example.
The easiest way is to choose Get Info on the bundle, choose the new app from the "Open
with" section, and click the "Change All..." button. While you are in the Get Info window you
might also want to click “Hide Extension” and rename the bundle to the name of the movie.
You can also change the icon to the artwork for the movie which you can get from a site like
Get Video Artwork.
One annoying side effect of this is that Front Row won't recognise dvdmedia bundles, whereas
it will recognise VIDEO_TS folders. Of course, to get your movies to work well in the Finder,
Quicktime iTunes, Front Row and iPhone all at the same time you might prefer to run them
through a tool like HandBrake. This can also save you some space depending on how you en-
code them.
Change or disable the Front Row shortcut
In case you don't have a remote handy, Apple have created a keyboard shortcut to enable Front
Row. By pressing Command-Escape you can load up Front Row and navigate using the arrow
keys.
This isn't very well publicised, and the only reason I know about it is that I keep accidentally
pressing it when I go to Force Quit an application (Command-Option-Escape). People with
American keyboard layouts also report accidentally activating Front Row when going for
Command-Tilde (cycle through windows). As Front Row often takes a few seconds to load up
and it takes over your entire screen, this can be pretty annoying.
If you are as clumsy as me, you might want to change the keyboard shortcut for Front Row.
This is easily done by going to the Keyboard and Mouse section of System Preferences. Under
the Keyboard Shortcuts tab you should find a list of all the keyboard shortcuts you can change.
Simply double-click on the shortcut for "Hide and show Front Row" and press the new combi-
nation you want. I went for Command-Control-Escape, as it's almost the same but much
harder to accidentally press.
Alternatively, if you want to disable the shortcut completely, just un-check the box to the left
of "Hide and show Front Row". Even if you do this, Front Row is still accessible via the remote.
Debug menu in Address Book
The debug menu has been available in Address Book for some time, but there are some new
additions in Snow Leopard. If you don't already have it enabled, open Terminal (located in
Applications/Utilities), paste the following line and press return.
Mac OS X Tips! 80
defaults write com.apple.AddressBook ABShowDebugMenu -bool true
Restart Address Book, and then click Debug in the menu bar to see the new options. You can
enable reflections under contacts pictures, get to the "People Picker Panel" and enable a debug
panel called "Ye Olde Debug Settings".
Get the most out of your laptop battery
If you know the right tricks, you can maximise the lifespan and battery life of you MacBook or
MacBook Pro. The way you charge the battery, the conditions is which you use and store your
laptop and the way you have your energy saver preferences set all have an effect on how long
your battery will last and how well if performs.
Over time, your battery holds less and less charge, meaning your laptop doesn't last as long be-
tween charges. Apple claims that their batteries are designed to retain 80% of their original
capacity after 300 cycles.
You can check how many cycles your battery has done by looking in System Profiler. You can
find this by clicking on the Apple menu in the top left and choosing About This Mac. In the
window that appears, click the "More Info..." button. In the sidebar of System Profiler, click
on Power to bring up all the details about your battery. The interesting part is the Health In-
formation. (Note that the stats shown below are for a fairly new battery).
Charge Information:
Charge remaining (mAh): 4940
Fully charged: Yes
Charging: No
Full charge capacity (mAh): 4940
Health Information:
Cycle count: 21
Condition: Good
If it says "Check Battery" under Condition, there is likely a problem with your battery. The
good news is that if the cycle count is under 300, Apple are likely to replace the battery for
free. If your laptop is under one year old, they will almost definitely do so. However, before
seeking out a new battery, make sure to completely charge and discharge the battery at least
one to check it is not a temporary problem.
If your battery is in good condition or is starting to show signs of aging, you will want to make
sure you get the most out of it before you have to replace it. Here are a few tips to prolong the
lifespan and battery life of your battery.
The best way to use your laptop on a day to day basis is to keep it fully charged as much as pos-
sible (i.e. plugged in), but run down the battery fully at least once per month. Doing this will
make sure that your battery will continue to recharge to the maximum capacity for as long as
possible.
Mac OS X Tips! 81
If you are going to store your laptop for a long time, Apple recommends you remove the bat-
tery from the laptop and store it at 50% charge. If you leave it fully charged or fully discharged
you may find the battery loses a lot of capacity.
A simple method that can make your battery last a lot longer between charges is to tweak your
System Preferences. Firstly, go to the Energy Saver Pane. Here, make sure the optimization
menu is set to Better Energy Savings for when the laptop is powered by the battery. This will
put the hard disk to sleep whenever possible, and reduce the laptop's CPU performance.
One trick that I often use if I am trying to squeeze an extra half an hour out of my battery is to
reduce the brightness of the display. The simplest way to do this is to use the F1 key (F2 will
increase the brightness again). Dim the screen to the lowest comfortable level, which should
be pretty low especially if you are indoors.
You might also want to eject any CDs or DVDs you aren't using, quit as many applications as
possible, disconnect any unused peripherals and turn off Bluetooth and Airport.
10 tips for Stickies
Stickies is a simple note taking application that has been included on every Mac since 1994.
The current version looks almost identical to the version that was released in 1994, however it
has gained a huge amount of new functionality over the past few years.
If you aren't familiar with Stickies, you'll find it in the Applications folder. Once opened, it will
display a number of differently coloured "notes". You can write in each of these, and any that
you leave open when quitting will still be there next time you open up Stickies.
Here are 10 tips for getting the most out of Stickies.
1. MAKE STICKIES F L OAT A B OV E A L L W I N D OW S
With the note you want to float selected, press Command-Option-F. This will cause the Sticky
note to appear above all other windows no matter which application you are in. This is great if
you are switching between multiple windows and application while writing or referring to a
single sticky note. If you can't remember this keyboard shortcut, you'll find the command in
the Note menu.
Mac OS X Tips! 82
2. MAKE STICKIES TRANSLUCENT
If you look in the Note menu, you will also see an option for a translucent window, with the
keyboard shortcut Command-Option-T. This goes well with the floating window option, as it
stops the floating sticky note getting in the way too much.
3. ADD SCROLL BARS TO STICKIES
This one might just be for the pros, as it is a bit tricky and requires you to have the Developer
Tools installed (find them on your Mac OS X Install Disc).
One thing that may annoy you is the inability to quickly scroll through long notes, as you have
to use the arrow keys to move through the text line by line. The way to fix this is to modify the
Stickies application by using Interface builder to add scroll bars to the side of long Sticky
notes.
First make sure Stickies isn't running, and make a backup of it by holding the option key and
dragging it to another folder (just in case anything goes wrong). Next, right-click (Control-
click) on the Stickies icon and choose "Show Package Contents" from the menu that appears.
Inside the contents navigate to Resources/English.lproj and double click on
StickiesDocument.nib to open it on Interface Builder.
If you are using Interface Builder for the first time, welcome to the wonderful world of how
applications are made. A window called StickiesDocument.nib should be open. In this window
there are a number of icons with various names including "File's Owner" and "First Re-
sponder". Double-click on the icon called "Window" which should open up a mostly empty,
white window called "Stickies". Also, open the Inspector by pressing Command-Shift-I or by
choosing it from the Tools menu.
Mac OS X Tips! 83
The title of the Inspector window should be "Stickies Window Attributes". Clicking ONCE
on the Stickies window will change the title of the Inspector window to "Scroll View Attrib-
utes". Amongst the options in the inspector, you want to check the checkbox that says "Show
Vertical Scroller" and the checkbox that says "Automatically Hide Scrollers".
That's it, you're done. Save the file (Command-S) and quit Interface builder. Next time you
open Stickies, long Stickies notes should have scroll bars.
4. PLACE OTHER MEDIA IN STICKIES
Not many people know that the contents of Stickies is not restricted to text. You can put al-
most anything in them. Dragging a Quicktime movie onto a Sticky note will embed the movie
in the note, complete with the usual play/pause controls. You can do the same for images and
PDFs too. Sometimes Stickies will ask if you want to create an alias rather than a copy of the
file within the Sticky. An alias will stop your Stickies database getting too big (especially with
movies) and will mean that the contents of the Sticky will automatically be updated if the em-
bedded file is updated.
5. BACK UP YOUR STICKIES L I B R A RY
If you use Stickies a lot, or you keep any important information in your Sticky notes, it is
worth keeping a backup of the Stickies database in case anything goes wrong. All your Stickies
are stored in one file that, as noted above, is fairly small unless you have embedded lots of mov-
ies in your notes. The file is named StickiesDatabase, and is located inside the Library folder in
your user folder. Simply create a copy of this file somewhere else to make a backup.
6. CHANGE D E FAU LT N E W N O T E S E T T I N G S
To set the default font, text size, note size, note colour and translucency, create a new note and
customize it to what you want. Then choose"Use as Default" from the Note menu. You can
change even more settings by editing the Stickies preferences plist. Go to your user folder and
Mac OS X Tips! 84
navigate to Library/Preferences and find com.apple.Stickies.plist. The most interesting thing
here is the WindowFlags item. Setting it to different values gives the following default notes:
0 - standard Sticky note
1 - minimized note (just title bar)
2 - floating note
3 - floating minimized note
4 - translucent note
5 - translucent minimized note
6 - floating translucent note
7 - floating translucent minimized note
7. S E A RC H
Using Command-F you can search for words in a single note or all notes. You can also perform
a Find and Replace.
8. DASHBOARD STICKIES
If you frequently use the Dashboard, then the widget version of Stickies might be more useful
for you than the application version. Note that you can create as many different sticky notes as
you want, simply by dragging another one up from the bottom bar. You can also change the
fonts and colours by clicking the i button, however you are more limited than in the Applica-
tion version.
9. DISCOVER A S T I C K Y N O T E ' S C R E A T I O N A N D M O D I-
F I C AT I O N DAT E S
This is a simple one - just hold your mouse still over any part of a sticky note to see a tooltip
containing the Creation and Modification dates and times of the note.
1 0. C R E AT E A STICKY NOTE FROM SELECTION
Due to the Services menu in Mac OS X, you have access to Stickies whatever application you
are in. Simply select any block of text anywhere and hit Command-Shift-Y to create a Sticky
note with that selection.
To be honest, this is quite possibly the most powerful feature of Stickies. Never mind the abil-
ity to embed movies and have translucent windows. Being able to create a quick note of any
text with one keyboard shortcut is the easiest and most useful aspect of Stickies there is.
Volume Change Shortcuts
All Apple keyboards now come with volume keys, so you can easily increase, decrease and mute
the volume. But did you know there is more functionality to these keys.
Mac OS X Tips! 85
Holding down the Option key while pressing one of the volume change keys will bring up the
Sound System Preference pane. Here you can change the alert sound, alert volume, and when
different sound effects are played. You can also change the sound input and output, incase you
have an external microphone or speakers.
Holding down the Shift key when pressing the volume keys will disable the sound that is nor-
mally played when you change the volume. You can disable this permanently from within the
Sound Preference Pane by un-checking the box "Play feedback when volume is changed". Now,
when you hold shift it does the opposite, temporarily enabling the volume change sound.
Unfortunately, this one is Leopard only. If you hold down both Option and Shift while pressing
the volume keys, you can change the volume more accurately. The entire volume spectrum is
divided into 65 instead of the usual 17 (by my count). This means you can adjust the volume by
just a tiny amount if it is not quite right.
To disable the startup sound that plays when you turn on your mac, simply hold down the
mute button while pressing the power button. Keep it held down for a while, until after the
sound would have normally played.
Tips for taking screenshots
KEYBOARD SHORTCUTS
The quickest way to take a screenshot is to use a keyboard shortcut. Annoyingly, these aren't
particularly intuitive. There are two main ones:
Command-Shift-3 - Take a screenshot of the entire screen.
Command-Shift-4 - Allows you to click and drag around the area you want a shot of.
Each of these will save a file to the desktop named something like “Screen shot 2010-01-21 at
23.32.09.”
Mac OS X Tips! 86
Now there are a few extra things you can do. If you press Space after pressing Command-Shift-
4, you will notice that the cursor changes to a picture of a camera. You can now just click on a
window, icon, widget or almost any other interface element to take a screenshot of it. You can
also add Control into the keyboard shortcut to put the image in the clipboard instead of saving
it to the desktop. For example, pressing Command-Control-Shift-3 would allow you to then
paste the image into another document.
T H E G R A B A P P L I C AT I O N
If you can never remember keyboard shortcuts, the Grab application is for you. It is located in
Applications/Utilities and it has many more options for screenshots than the keyboard short-
cuts do. The two main advantages (in my opinion) are timed screenshots and being able to
change the pointer type.
You can create a timed screenshot by going to the Capture menu, or by pressing Command-
Shift-Z. Using this, you can achieve screenshots that are supposedly “impossible”. One example
is the login window. To change the pointer type, go to the Preferences.
DISABLE SHADOW
If you use the Command-Shift-4 Space method to take a screenshot of an entire window, you
will find that the shadow is in the screenshot. This was added in Leopard because without the
shadow, windows don't actually have a border if they have no scrollbars. However, if you prefer
no shadows, you can disable them with a Terminal command. Simply open up Terminal (lo-
cated in Applications/Utilities), paste in the following line and hit return.
defaults write com.apple.screencapture disable-shadow -bool true
Afterwards you will need to log out and in again for changes to take effect. To enable shadows
again, simply repeat the command but with false at the end.
C H A N G E I M AG E F O R M AT
The default image format for screenshots is png, which gives a nice, high quality picture. How-
ever you can change this if you want. As before, use the following Terminal command:
defaults write com.apple.screencapture type png
Simply replace png with your file format of choice. The available options are jpg, tiff and pdf.
Changing to jpg gives a lower quality but smaller file. Some people prefer this for quick snaps,
but others dislike the slightly blurry results it gives. As before, log out and in again for changes
to take effect.
Mac OS X Tips! 87
Add a message to the login window
You can add a string of text above the list of users in the login window. To do this, start by
opening up Terminal, located in Applications/Utilities. Once it has loaded, paste in the follow-
ing line and press return.
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Hi"
Replace "Hi" with your text. To remove the text, type the following line and press return.
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText ""
Hide accounts from the login window
If you find yourself with an overly long list of users in the login window or you just want to get
rid of that annoying scroll bar down the side, you can stop accounts appearing in the login
window.
Start by go to the Accounts pane in System Preferences, and find the "short name" of each user
you want to hide. Once you have these, open up Terminal and enter the following:
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-
add shortname1 shortname2 shortname3
Replace shortname1 2 and 3 with the short names of the user accounts you wish to hide. You
can hide as many as you like, just separate each with a space. To make a hidden name appear
again, type the command with no names in it, therefore resetting the list of hidden users:
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array
Notice that hiding users adds an extra option to your login window - "Other..." When you se-
lect this, you will be presented with text boxes to enter a username and password, so you can
still login as a hidden user.
Get useful system stats in the login window
When you start up your Mac and the login window pops up, you have a big shiny apple logo
and the words Mac OS X. Below these words you usually see the name of your mac, whatever
that may be. For most people that isn't very useful, as you have to have a lot of the same mod-
els knocking around to get confused between computers, but luckily you can change it to
something more informative.
Simply click on the name of your Mac to show different statistics about your machine. Each
time you click, it will cycle through different bits of information that are particularly useful
when troubleshooting problems.
Mac OS X Tips! 88
The order of the statistics are as follows:
One click: Your OS X version number (e.g. Version 10.4.7)
Two clicks: Your OS X build number (e.g. Build 7M271)
Three clicks: Your Mac's serial number (e.g. WN1511LHKNW)
Four clicks: Your Mac's IP address (e.g. 196.254.0.1)
Five clicks: The status of any networked account
Six clicks: The date and time (e.g. Saturday, January 20 2007 4:02:31 AM GMT)
Seven clicks: Back to where you started, the name of your computer.
So you can click a few times and set the information line to your favourite thing, but next time
you log in it will have changed back to the name of your Mac. To change the bit of information
that appears first, you need to do a bit of tinkering in the Terminal (located in Applications/
Utilities). Open Terminal and type the following command:
defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo info_name
Depending on which piece of information you want displayed, replace info_name with one of
the following:
SystemVersion
SystemBuild
SerialNumber
IPAddress
DSStatus
Time
After doing this, hit return, and the next time you view your login window the information you
chose will be displayed.
Reset a Lost OS X Account Password
Lots of people contact Mac OS X Tips asking how to reset a forgotten Mac OS X user account
password. Depending on the circumstances, this task could take 5 minutes or could even be
completely impossible. Here is a run through of the different ways you can reset an account
password depending on the type of account, whether FileVault is enabled and whether you
have the Mac OS X Install Disc.
IF YOU STILL KNOW THE A D M I N I S T R AT O R P A S S WO R D
If you still know the password to an administrator account, it is very simple to reset any stan-
dard or managed user's password. While logged in as the administrator, open up System Pref-
erences and click on the Accounts section. All the accounts on the computer should be listed
down the left hand side. Under each account name it should say Admin, Standard or Managed.
If the lock at the bottom of the window appears locked, click on it to allow changes to the
preferences.
Mac OS X Tips! 89
The next step is to select the user whose password you want to change and click on the Reset
Password button. Enter the new password and click Reset Password. If you have created mul-
tiple Administrator accounts, you can use this method to reset their passwords too, as long as
you know the password for the original administrator account.
RESETTING AN A D M I N I S T R AT O R P A S S WO R D
Obviously, if you don't have access to an administrator account, you can't carry out any of the
above steps. If you have forgotten the Administrator password or you can't log into your Mac
at all, you will need to use the Mac OS X Install Disc.
Enter the Mac OS X Install Disc that is the closest version to that running on the Mac. For
example, if you are running Mac OS X 10.6 Snow Leopard, you should enter the Snow Leopard
install disk, not any earlier ones. Restart the computer, and hold the C key as it starts up. This
might take longer than usual, and you can release the C key as soon as the Apple logo appears
on the screen. When the window appears, choose your language and click the right arrow.
The next step depends on what version of Mac OS X you are using. Generally you need to
choose Reset Password from the Utilities menu. For earlier versions of Mac OS X, choose Re-
set Password from the Installer menu.
Choose your Hard Drive from the top and then choose the Account from the drop down
menu. Be careful not to select System Administrator, as this is actually the root user, not the
administrator account on your Mac. Now enter the new password, click Save, quit the Installer
and restart the computer.
Note that there are a few issues with this method. Firstly, it does not reset your keychain pass-
word. You will have to do this separately. Secondly, do not attempt this if you have FileVault
enabled. To reset an FileVault protected account, you need the master password.
RESETTING A F I L E V AU LT U S E R ' S P A S S WO R D
If you have enabled FileVault to encrypt your Account, you need to know the master password
that you set when you enabled it. This is the password that the administrator should know that
allows you to reset any password on the computer. If you have forgotten the master password,
unfortunately your data is lost forever.
If you know the master password, start by attempting to log into your account. When you get
the password wrong three times, you will be able to click "Forgot Password". Now you will
have to enter the master password and then a new login password for your account.
Mac OS X Tips! 90
Address Book Tips
The Mac OS X Address Book is a neat little application that is often under-appreciated. As a
seemingly boring application it has loads of features that are overlooked by most users. While
useful on its own for organising your contacts, Address Book's real power is that it works with
so many other applications. Here are a few tips to save you time and let you make the most of
Address Book.
ADD CONTACTS TO YOUR SAFARI BOOKMARKS
If lots of your contacts have their own web sites, you might be interested to know that you can
automatically add these to your Safari bookmarks bar. Open up Safari go to the Preferences (in
the Safari Menu). In here click the Bookmarks tab and check the box that says "Include Ad-
dress Book" in the Bookmarks Bar. Now a new folder will appear at the far left of your Book-
marks bar. In here will be the web sites of all you contacts who have a home page set in their
Address Book entry.
C H AT TO YOUR CONTACTS
Address Book integrates quite well into iChat, the Mac OS X instant messenger. If a person in
your Address Book is online and using iChat, a little green dot will appear next to their picture.
Clicking on the dot will open up iChat, where you can start a new conversation with the per-
son.
PUT YOUR CONTACTS IN THE SPOTLIGHT
In Address Book, select which contact you want to search, right-click on their name and
choose "Spotlight [name]". The spotlight window will pop up, and show documents, photos,
iCal events, mail messages and iChats related to this person. This is one of my favourite fea-
tures of Spotlight - it allows you to use it as a personal organiser and links together Address
Book, iCal, Mail and iChat.
Mac OS X Tips! 91
If you don't have Address Book open, you don't need to bother opening it up to Spotlight
search someone. Simply type their name into Spotlight for the same results.
Moreover, Spotlight remembers files that people have sent you. When searching for one of
your contacts, Spotlight will list any files they sent as attachments to you, providing you re-
ceived them in Mail.
HIGHLIGHT GROUPS
If you hold down the Option key while you are viewing a contact, all the groups that they are
in are highlighted in a lovely yellow.
MERGE TWO CONTACTS
If somehow you end up with two entries in your address book for the same person, you can
easily merge the two. Select the two entries by clicking on one in the list and then Command-
clicking on the other. Now click on the Card menu and choose "Merge Selected Cards". If you
have a huge contact list and you suspect some duplicate entries, you can also choose "Look for
Duplicate entries" from the Card menu.
LARGE TYPE
If you want to read a person's phone number off the screen while dialling it across the room,
you can make it display in large numbers across the screen. To do this, click on the number and
choose "Large Type" from the pop-up menu.
ADDRESS BOOK SHARING
If you want to share your address book (for example with your family or secretary) you can do
so via MobileMe, Yahoo!, Google or an exhange account. In Address Book just go to the Pref-
erences and click on the Accounts tab. Be careful with the Google and Yahoo synchronisation
though, you might end up accidentally adding everyone you ever sent an email to into your ad-
dress book.
PRINTING ENVELOPES
You can print an envelope addressed to a contact by choosing Print from the File menu with
the chosen person selected. In the print dialog you might have to click the blue disclosure tri-
angle to show all the settings, and choose Envelopes from the Style drop-down menu.
Playing with Half Minimized Windows
This is great fun, and also a little weird. Hold down the Shift key and click the yellow minimize
button on a window. It should minimize into the Dock in slow motion. Now open up Terminal,
Mac OS X Tips! 92
type in killall Dock but don’t press return yet. Minimize another window whilst holding shift,
then quickly change to Terminal and press return. The shrinking window freezes in it's
squished state, while still allowing you to scroll in it and click links. Drag it around, scroll up
and down, browse web pages.
Word Completion in Cocoa
Here's a nifty tip that should work in all Cocoa apps (Mail, TextEdit, Safari etc.) If you can't
remember how to spell a word, type the beginning and hit Escape for some word suggestions.
There are a number of different ways of doing this however. In certain places it isn't possible to
press escape, because it does something else (like clearing the Google search box in Safari). In
these cases you can use Option-Escape, or just press F5. These two alternatives may take a lit-
tle longer, but seem to work everywhere.
So now if you can't spell something, you don't have to attempt the whole word, just put in the
first few letters and let the system spelling dictionary do the rest.
Easy Dictionary Access
It is possible to access the Mac OS X Dictionary and Thesaurus from any Cocoa application
(Mail, TextEdit, Safari, etc.) using a simple keyboard shortcut.
To access the dictionary, place the mouse cursor over the word you want to look up., and press
Command-Control-D. A small window pops up giving you a quick definition, and you can eas-
ily click the Thesaurus or More buttons for more information on a word.
Mac OS X Tips! 93
To look up multiple words you can just move the mouse whilst keeping command and control
held down (you can release D).
Character Swap
In all cocoa applications (TextEdit, Mail etc.), two adjacent characters can be swapped by posi-
tioning the cursor between them and pressing Control-T.
This can be useful if you often end up typing "teh" and "becuase".
Mac OS X Tips! 94
Related docs
Get documents about "