How To

27th March
2012

Thinking of installing a solid state disk (SSD)? Go for it – I doubt you’ll regret the investment.

written by Mark Wheadon

I finally took the plunge and replaced the standard hard drive in my late 2008 MacBook Pro with a solid state disk – a 256GB Crucial M4.

What a transformation! If you’re trying to decide whether to do something similar then take a look at the video below, which shows the Mac booting up and logging in both before and after the transplant.

The machine is now much, much quicker in daily use, a little quieter, cooler, and has better battery life – what more could you ask for circa £240?

 

20th June
2009

Using a virtual machine — perhaps VMware Fusion or Parallels Desktop — can result in way-too-large backups. Here’s one way to make those backups more manageable.

written by Mark Wheadon

If you’re using a product such as VMware Fusion or Parallels Desktop to run another operating system on your Mac (perhaps Windows or Linux), then you may have noticed that your backups are now taking a long time. I documented one approach to solving this problem in an earlier article. Now here’s a different approach, originally suggested by Chris Ryder (thanks Chris).

First, here’s a recap of the problem. It’s written in terms of VMware Fusion but should be equally valid for other VM engines such as Parallels Desktop. If you’ve already read the previous article then you might want to skip to the meat of this article.

Large backups

When you’ve been using Fusion’s virtual machine (in my case, to run Windows), you will find that Time Machine’s backup takes longer than expected — sometimes much longer.

This is because Fusion stores its virtual machines’ disks as a bunch of large files. When you run your virtual machine using Fusion (or Parallels Desktop), the contents of the VM’s virtual disk changes, and even if you haven’t made many explicit changes to files, all sorts of small changes happen to the virtual disk’s contents.

Incremental can still be too much

Time Machine performs incremental backups. That is, it copies only files that have changed since the last backup. Unfortunately those large files that Fusion uses to store the virtual disk’s contents? They’ve probably all changed, at least a little.

backupSo, instead of your incremental being a few megabytes and taking a few tens of seconds, it’s ten gigabytes, takes ages, and rapidly fills your backup disk. (Which causes its own problems: described here.)

One solution: back up the VM in another way

One solution is to keep all your precious files in the Mac file-store, tell Time Machine to avoid backing up your virtual machine(s), and then back them up some other way. This results in the smallest backups and is useful if you don’t need sophisticated incremental backups of your virtual machines.

If this sounds like you, then I’ve shown how this can be achieved in an earlier article.

An alternative solution: use a sparse bundle

If you need proper incremental backups of your VMs, then one approach is to use a sparse bundle. This is a disk image which is stored  as a collection of small files (typically 8MB), so when Time Machine backs up the disk image, it only needs to copy the files that have changed.

This approach still isn’t perfect — when (for example) Windows does anything, it tends to scatter its writes over the disk, so incremental backups are still large, but they’re not as large as when Time Machine backs up the VM directly. Typically, your incrementals may be a few hundred megabytes with no VMs, a few gigabytes with a VM stored on a sparse bundle (for Windows. Linux may be better behaved), and a few tens of gigabytes with the same VM stored in the standard way.

Here’s how

First lets create a new disk image based on a sparse bundle and move our VM onto it. We’ll need to know how large to make the VM, so go to Documents and look in Virtual Machines. In there is one folder per virtual machine and you can find the VM’s size by clicking on the corresponding folder and hitting cmd+I:

VM size

Create the disk image

Now create the sparse bundle. The point-and-click way of doing this is to use Disk Utility, so start that up (I use spotlight to do so):

Spotlight

and click on New Image:

Picture disk utility

Then fill in the details. I made my sparse bundle file-system for the Windows XP VM twice as large as the space it currently occupies, to allow for future expansion — so 50GB in my case (don’t worry: it only uses as much real disk as is needed to store the actual content). Here’s all the fields you need to change:

Bundle settings

  • The Save As is the filename for the sparse bundle whereas the Volume Name is the name the disk will have when mounted — I made them the same;
  • I saved my sparse bundle in Documents->Virtual Machines;
  • Image Format needs to be sparse bundle disk image, as that’s the whole point of the exercise.

Now click on Create, and

Creating image

a few seconds later you have a sparse bundle file-system image.

Mounted bundleNow double-click that file (mine’s called VM disk.sparsebundle).

Mac OS will mount it…

and the new file system will appear on the desktop.

Move the VM into the new disk image

Next, drag the folder(s) corresponding to the VM(s) you’d like backed up by Time Machine onto the new disk. Hold down cmd as you drag and drop, so that you move the folders (rather than copying them):

Move onto diskEnsure the new disk image is mounted at login

The .sparsebundle file needs to be mounted every time you log in, so that the file-store is available. To do that, go into System Preferences->Accounts, click on your username and then on Login items. Now drag your sparsebundle file into the list of login items:

Mount at loginand that’s it.

Using your newly-homed VM(s)

To use your new VM(s), just double-click on the corresponding folder — perhaps put an alias to it on your desktop or in the dock. When you next use it you’ll get a message:

I moved it

Just click on I moved it and you’re sorted.

Warning

As with any method of backup which relies on backing up the virtual machine’s disk image using the host operating system, your backup may not be of any use if it’s made whilst the VM is running, so I suggest you make sure that Fusion/Parallels is not running when Time Machine is backing up your data. If you don’t always manage to do so then some of your backups may not be valid.

Why?

Because if you backup the files that Fusion (or Parallels) is using for a disk image, then you’re backing up what’s on disk, but not what’s in memory, in disk buffers, etc. So when you come to restore from backup, you may find that the disk image is corrupted. In the worst case scenario you won’t be able to start up the VM’s operating system successfully at all, or restore any files contained within the VM’s file-store.

By backing up when the VM isn’t running, you ensure that all data is on disk in a safe, consistent state.

16th May
2009

Windows Vista prompts for you password every time it comes out of sleep / hibernation. If you’d rather it didn’t then here’s how to disable that behaviour.

written by Mark Wheadon

If you have a Windows Vista machine in a secure (enough 🙂 ) environment then you may not want it to prompt for a password every time it comes out of standby. With previous versions of Windows it was pretty obvious how to choose this behaviour (in XP it’s under the Advanced tab of the current power scheme in Power options for example — in fact, it’s still there in Vista but it’s buried deep).

Under Vista it’s far less obvious, but the setting is there if you know where to look for it.

First, go to Power options in the control panel. I find it easiest to do this kind of thing by bringing up the Start menu and then typing (in this case) power, and then selecting Power Options:

start-menuNext, in the Power Options window, don’t click on change plan settings as it’s somewhat buried in there nowadays. Instead, select the Require a password on wakeup link that’s lurking in the top-left of the window:

power-optionsYou will then be presented with a window which looks useful, but in fact the Don’t require a password option you’ve been looking for is greyed out — you can’t select it! This is because you first need to click on Change settings that are currently unavailable:

power-options-system-settingsThen confirm you’re happy for the change to be made:

permission-to-continue

And finally you’re in a position to select the option:

dont-require-passwordThen click on Save changes and you’re done. (I know, it shouldn’t be that hard, but c’est la vie with Vista at times.)

It’s worth repeating that you should only set this option if you’re happy that someone with no knowledge of your login details can walk up to your suspended Vista session, wake it up, and start doing stuff as you.

5th April
2009

Want to use keyboard accelerators to drive dialogues etc. in Mac OS X? Here’s how.

written by Mark Wheadon

The need

Coming from the Windows to Mac OS, I missed being able to interact with dialog boxes etc. without having to use the mouse. There are times, especially with the MacBook, where clicking on an option is fiddly and error prone (in bed with a cup of tea for example 🙂 ) and it would be much better if I could use the keyboard…

without-full-keyboard-accessHere’s an example: here I am quitting from Safari. As is often the case, the dialog has reminded me that I don’t actually want to quit as I have multiple tabs, so I want to cancel the operation. Pressing return will close Safari, but how do I select Cancel? (Yes, I know you can press esc to cancel a dialog, but bear with me — the following solution works for all dialog selections and menus, not just Cancel).

The solution

The answer is to select All controls in Full keyboard access in Settings->Keyboard & Mouse->Keyboard Shortcuts:

full-keyboard-access

Or, much easier 🙂 , type ctrl+F7.

with-full-keyboard-accessNow when that dialog pops up it looks different. Notice that Cancel is surrounded by a blue glow — that’s the dialog option that currently has keyboard focus, and pressing the space bar will select it.

Now you can navigate the dialog box using the keyboard: tab and shift-tab change the currently selected option, space selects that option, and return will always select the solid-blue default option.

So in this example, space will cancel the dialog and return will do the default action (close Safari in this case).

So you can now navigate dialog boxes on a MacBook, in bed, armed with a cup of tea — and I hear tell this even works with coffee, at a pinch 🙂

22nd March
2009

VMWare’s Fusion can lead to slow, large Time machine backups.

written by Mark Wheadon

[This almost certainly applies to most other virtual PC packages as well, so if you’re using Parallels Desktop for example, read on… –Mark]

Are you using the excellent VMware Fusion and backing up your Mac with Time Machine? If so, you may notice a problem.

Large backups

When you’ve been using Fusion‘s virtual machine (in my case, to run Windows), you will find that Time Machine‘s next backup takes longer than expected — sometimes much longer.

This is because Fusion stores its virtual machines’ disks as a bunch of large files. When you run your virtual machine using Fusion, the contents of the VM’s virtual disk changes, and even if you haven’t made many explicit changes to files, all sorts of small changes happen to the virtual disk’s contents.

Incremental can still be too much

Time Machine performs incremental backups. That is, it copies only files that have changed since the last backup. Unfortunately those large files that Fusion uses to store the virtual disk’s contents? They’ve probably all changed, at least a little.

backupSo, instead of your incremental being a few megabytes and taking a few tens of seconds, it’s ten gigabytes, takes ages, and rapidly fills your backup disk. (Which causes its own problems: described here.)

An alternative fix

If you need incremental backups of your VMs, or your VMs are running an operating system that doesn’t have support for accessing theMac OS file-store (Linux, for example), then you’ll likely find this approach is the best for you.

If your VM(s) are running Windows (so you can access the Mac OS file-store from within the VM) and you don’t need a sophisticated incremental backup of your VMs then read on, as the following approach produces by far the most efficient backups.

This fix

The fix described here is to ensure the files you edit in Fusion‘s virtual world are in the Mac’s natural file-store (so they continue to be backed up by Time Machine), stop using Time Machine to back up your virtual machines, and then back up your virtual machines in a different way. I’ll cover each of these steps in turn below.

Put your files somewhere safe

Instead of putting your Windows (or whatever) files in the Windows file-store, place them in the Mac’s file-store (which is available to Windows as the Z: drive by default). This means that your precious files have a proper, incremental backup using Time Machine, and you can restore earlier versions should the need arise.

Stop Time Machine backing up your VMs

Open Time Machine Preferences…, click on Options… and then the small + to add a Folder to the Do not back up list:

add-folderThen navigate to Documents below your home directory and there you will find a folder called Virtual Machines — add that and Time Machine will no longer backup your Fusion VMs.

And backup your VMs in a different way

copying-vm-to-backupIf, like me, your virtual machine is a secondary system, then you probably have no need of an incremental, sophisticated backup. What’s important is the files you edit are protected, and they are now protected by Time Machine as part of the Mac’s natural file-store.

So, simply drag your Documents/Virtual Machines folder onto the backup drive every week or so, and you’re sorted.

Warning

As with any method of backup which relies on backing up the virtual machine’s disk image using the host operating system, your backup may not be of any use if it’s made whilst the VM is running, so I suggest you make sure that Fusion/Parallels is not running when you copy the data.

Why?

Because if you copy the files that Fusion (or Parallels) is using for a disk image, then you’re backing up what’s on disk, but not what’s in memory, in disk buffers, etc. So when you come to restore from backup, you may find that the disk image is corrupted. In the worst case scenario you won’t be able to start up the VM’s operating system successfully at all, or restore any files contained within the VM’s file-store.

By backing up when the VM isn’t running, you ensure that all data is on disk in a safe, consistent state.

17th March
2009

Want to use Safari 4, but put off by the visual editor not working in wordpress? Here’s a fix.

written by Mark Wheadon

All change

As of the the 8th June 2009, Safari 4 is out of beta, and wordpress‘s insert-link dialogue works! So this article is now superfluous — good stuff.

I’ll leave the article here to help clarify what WebKit is and how to use it, but if you’re looking to get wordpress‘s insert-hyperlink dialogue working with Safari 4beta then all you need do is download the full release version of Safari 4 from Apple’s site.

And now for the original article…

(more…)

15th March
2009

How to make Time Machine backup less (or more) frequently.

written by Mark Wheadon

Apple’s Time Machine is a useful beast. Plug a disk into your Mac or buy a Time Capsule and Time Machine does the rest — waking up once an hour and copying anything that’s changed onto your backup.

However, you may not want a backup every hour — the backup disk is a limited resource. If you’re regularly changing large files then Time Machine is regularly writing large amounts of data to the backup disk, and if that’s the case then you won’t have backups going back very far into the past.

So there will be lots of revisions of files that have changed recently, but nothing much from, say, a couple of months ago.

So how do you change the interval?

The standard Time Machine options don’t allow you to change the backup interval (the time between backups), but the preferences are there to be changed if you know how.

From the command line

If you don’t want to install any extra software then you can change Time Machine‘s backup interval from a shell prompt. Start up a Terminal window and then type:

sudo defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 18000

The 18000 above is the required backup interval in seconds — five hours in this example. And note that the above command is all on one line.

Point-and-click

There are several full Mac OS applications out there that allow you to manipulate Time Machine‘s hidden preferences. The two most popular are Time Machine Scheduler and Time Machine Editor. I haven’t used either (being someone who leans toward using the command line), but they look like they’ll do the job. However…

My recommendation was, but is no more:

I did suggest using the Secrets prefPane to change Time Machine‘s backup interval (see below), but unfortunately that turned out to be bad advice. You can set the interval using the Secrets prefPane but it doesn’t stick. Quit the System Preferences application and start it up again and you’ll find the interval has gone back to the default of 3600 seconds.

So it seems Secrets prefPane doesn’t work for this after all! I’ll leave the rest of this article in place and perhaps someone will tell me when the problem’s fixed?

In the mean time, please use one of the options suggested above.

Here’s the rest of the original article, which at the moment doesn’t work: (more…)

1st March
2009

How do you dump the screen in Mac OS X when you can’t reach for a hot-key-chord? The answer is grab.

written by Mark Wheadon

Mac OS X Leopard has a tool to dump all or part of the screen built into the desktop, with handy (if difficult to remember) hot key-chords:

  • cmd+shift+3 to dump the whole screen
  • cmd+shift+4 to select an area of the screen (then press space for a whole window).

However, there are times when the above won’t do. Typically, it’s when you’re already pressing keys to get the image you need — the key chord cmd+shift+4 isn’t going to work if you’re already holding down alt for example.

That’s where grab comes in — it’s what Mac users used before cmd+shift+3/4 came along, it’s still there, and it can dump the screen after a ten second delay.

So, start up grab. I use Spotlight to do that, so I type cmd+space grab:

spotlight grab

Then, to do the delayed screen dump, select Timed Screen from grab‘s Capture menu:

grab timed screen dump

You then have ten seconds to set up the screen as needed, and grab does the rest.

Then select File->Save As… to save the resulting tiff file, and you’re done.

24th February
2009

Need to go back to Safari 3? Here’s how.

written by Mark Wheadon

SafariSo, you’ve tried the new Safari 4beta downloaded from apple.com, and now you need to revert to Safari 3?

That was case for me — as adding hyperlinks in wordpress caused the browser tab to hang (documented by Geek Guides here). However, if you’re thinking about returning to Safari 3.2.1 because you can’t input hyperlinks in wordpress‘ visual editor then think again — you may not need to — as there is now a work-around.

You still need to downgrade?

What doesn’t work

What doesn’t work is downloading Safari 3 and installing that — the installer complains that you already have a newer version on the hard drive and so won’t continue.

What works

Safari 4 installIs to re-run the Safari 4beta installer (fetch it from apple.com if you don’t still have it) and run the uninstall from there.

One reboot later and you’re back running Safari 3.2.1.

Safari image by timmargh.

22nd February
2009

Always open a file with a particular application in Mac OS X — the easy way.

written by Mark Wheadon

press alt

First, the hard way

When you wish to open a file using a particular application, it’s simple. Just right-click on the file (ctrl+click) and select Open With.

open-withHowever, if you’d like that file to always open with the selected application then things are less elegant: right click, Open With, Other…, select the application and tick Always Open With. Fiddly.

The easy way

Fortunately there is an easier way.

Right click on the file as before, but this time depress the alt key. Hey-presto, the Open With option changes into Always Open With.

always-open-withHow’s that for handy?

Changing the default application for all files of a kind

The above method sets the default application for this file only. If you’d like to change the default application for all files of a type (a kind in Mac OS speak) then here’s how to do it.

Previous