Category Archives: Mac OS X

Creating A Linux USB Boot Drive on Mac OS X

I recently needed to boot a laptop from Linux, but didn’t have any of my Linux boot disks with me. Luckily I had my USB flash drive, so I decided to install a mini-version of Linux. A quick Google searched led me to Recovery is Possible, or RIPLinuX.

Here’s how to install the .iso onto the flash drive:

Open Terminal under Applications → Utilities.

We’ll be using the diskutil command to write the .iso contents to the flash drive. So the first thing to do is determine the block device associated with our flash drive.

Before inserting the drive typediskutil listand hit enter. Insert your drive and run the diskutil list command again.

You should get something like this:

Results of the diskutil list command

As you can see, the flash drive is connected via /disk/dev1, though this may be different on your system. Before you can start writing the data to the flash drive, you need to unmount the drive.

diskutil unmountDisk /dev/disk1

Unmounting the flash drive using diskutil

Now, you’re ready to start writing the data to the drive.

sudo dd if=/path/to/linux.iso of=/dev/disk1 bs=1m

Data has been successfully written to the drive

Once the data has been written to the drive, all that remains is to eject it.diskutil eject /dev/disk1

Eject the flash drive

And you’re done! Remember that in order to boot from the USB drive, the computer that you’re using must support booting from USB devices and that you need to change the boot order in the BIOS.


I’ve been playing around with GeekTool for a couple of days and I’ve finally gotten everything I want on my desktop.

Here’s what my desktop looks like at the moment:

My GeekTool Desktop

My GeekTool Desktop

For reference, here’s my list of GeekTool Scripts:

  • Computer Name: hostname -s
  • Login Name: whoami
  • Day: date “+%A”
  • Month: date “+%b”
  • Day (numerical): date “+%e”
  • Time: date +”%I:%M”
  • AM/PM: date +”%p”
  • Mac OS X Version: sw_vers | awk -F’:t’ ‘{print $2}’ | paste -d ‘ ‘ – - – ;
  • Disk Usage: df -H | grep disk0s2 | awk ‘{print “Disk:”, $3, “/”, $2, “-”, $4, “available”}’
  • Uptime: uptime | awk ‘{print “Up: ” $3 ” days”}’
  • Airport Network Name: airport -I | grep -e “bSSID:” | awk ‘{print $2}’
  • Airport Channel: airport -I | grep -e “channel:” | awk ‘{print “Channel: ” $2}’
  • Airport Max Rate: airport -I | grep -e “maxRate:” | awk ‘{print “Max Rate: ” $2}’
  • Airport Link Authorisation: airport -I | grep -e “link auth:” | awk ‘{print “Auth: ” $3}’
  • External IP: echo `curl -s | sed ‘s/[a-zA-Z<>/ :]//g’`
  • Running Processes: ps -c -U pmac -o command,%cpu,%mem -r
  • Airport IP: ipconfig getifaddr en1
  • Calendar: cal
  • Network Location: scselect 2>&1 | grep ‘^ *’ | sed -e ‘s:^[^(]*(([^)]*))$:1:g’

Most of these commands were culled from various websites, while I came up with the rest myself.

“custom_domain is null”error message in Firefox

Problem: When opening a “localhost” address using Firefox, a JavaScript error message is displayed with the error message “current_domain is null”.

Description: Using Firefox version 3.0.11. Error message only appears when connecting to a site hosted on the local machine. Disabling all add-ons resolves the problem. Re-enabled add-ons one by one. Re-enabling LongURL Expander causes the problem to re-appear. Error message is known issue with version 2.0.0 of the add-on.

Solution: As per the comments on the the add-on page, edit the longurlmobileexpander.js file to make the requirement for the second part of the domain name optional.

  • On Mac OS X, open home folder and browse to Library/Application Support/Firefox/Profiles/[profile].default/extension/{a7101e54-830c-4d33-a3ed-bedc17ec44da}/content
  • Open longurlmobileexpander.js in TextEdit.
  • Edit line 78 to read:

var current_domain = document.location.href.match(/^https?://(?:www.)?([^.]+(.[^/]+)?)/i);

  • Save changes.

Thanks to Mathias Jansen for the solution.

Disabling Ethernet Prevents Mac OS X From Waking

Problem: When MacBook lid is closed, fan continues to spin and MacBook becomes very hot.

Description: When in use the MacBook fan behaves as expected. On closing the lid to put the MacBook sleep, the fan continues to spin and the base of the machine becomes very hot.

Opening the lid displays a black screen. No mouse or login screen displayed. Fan continues to spin at what seems to be maximum RPM. Closing the lid again does not stop the fan from spinning.

Only available option is to hold the power button to shut down the system.

On pressing the power button to restart the system, the MacBook starts, displays grey start up screen for a second or two and then restarts automatically. MacBook then starts normally.

Once the user logins, the system works as normal again. Putting the system to sleep, causes the problem to reoccur.

Solution: The user deactivated the Ethernet interface within System Preferences -> Network. Reactivating the Ethernet interface and restarting the machine resolved the problem.

(Who’d have thought that disabling the Ethernet interface would prevent the system from sleeping? Certainly not me when I decided to do so.)

Mac OS Password Assistant

Mac OS has a useful utility for generating secure passwords – Password Assistant. While it’s certainly useful, it’s only accessible from within preference panes that require you to enter a password.

I spent some time with Activity Monitor to see if I could determine if Password Assistant was a separate program being called. No joy there, so I turned to my old friend Google.

That’s how I found a utility from codepoetry that calls Password Assistant directly. It’s small, it works and best of all it’s free.

Copying Mac Address Book to LG Viewty (LG-KU990)

My phone contract was up recently, and as an incentive to sign on for another year, my provider offered me a free upgrade. So I took the LG Viewty also known as the LG-KU990.1 I’ll do a full review later, but for the moment, I want to talk about one issue I’ve experienced with it.

LG Viewty (LG-KU990)

LG Viewty (LG-KU990)

I go through so many phones that I like to keep my address book on my MacBook and sync it with my phone. While the Viewty does have Bluetooth, it’s not supported by iSync. Even worse, Bluetooth File Exchange couldn’t see any of the files or folders on the phone2.

I had the same problem with my Nokia 3120, so I was somewhat hopeful that I’d find an iSync plugin to get me up and running.

After a lot of searching, I discovered that LG use their own OS on the phone which is overlaid with Flash screens to enable interactivity. Worse still, LG don’t implement the SyncML protocol used by the other major manufacturers, and by iSync. So there’s no way to sync my brand new phone with my MacBook.

My only concern is the phone book, I don’t use iCal, and I really don’t want to have to manually enter every name in my Address Book. Luckily, there is a work-around, and here’s how:

  • Open Address Book,
  • Use CMD-A to select all the entries in your Address Book,
  • Navigate to “File” -> “Export” -> “Export vCard…”,
  • When prompted save the vCard.

The next step involves connecting to the Viewty via Bluetooth. If you have not paired the devices before, then you should do so now.3

  • Click the Bluetooth icon in the Menu Bar and navigate to “Browse Device”,
  • Select your phone name from the list and click “Browse”,
  • Tap “Yes” on the Viewty to accept the incoming connection request,
  • On your Mac, click the “Send…” button in Bluetooth File Exchange,
  • Locate the vCards file that you saved earlier, and click “Send”,
  • Once the transfer has completed, the Viewty should prompt you to “Restore Contact backup file”, tap “Yes”.

And that’s it. Your Address Book has now been copied to your phone.

  1. I’d usually link to the official site, but it’s flash based and doesn’t work on Mac OS X – and there doesn’t seem to be a text based version available []
  2. Even though Bluetooth File Exchange won’t display any files or folders, the phone is still connected via Bluetooth and files can still be transferred in the normal manner. []
  3. Short and simple explanation: Turn on Bluetooth on your Mac, turn on Bluetooth on your phone, click the Bluetooth icon in the Menu Bar, select “Set Up Bluetooth Device” and follow the Setup Assistant. []

Using GIMP Brushes with Seashore

I use Seashore as my main image editor on Mac OS. I’m not a graphics designer so I don’t need an uber-powerful, all singing, all dancing graphics editor.

While Seahorse fits my needs, one thing it does lack is a comprehensive set of brushes. However, because it is based around GIMP, you can use brushes created for GIMP.

To add brushes to Seashore you need to do the following:

  • Locate Seashore in your Applications Folder,
  • Cmd-Click on the and select “Show Package Contents”,
  • Browse to “Contents -> Resources -> brushes”,
  • Drag and drop your GIMP brush set into this folder.

There’s plenty of free GIMP brushes available on the net, but deviantART is a good place to start.

“The connection was refused”Error Message When Using Leopard’s Web Sharing

I came across this problem when trying to enable Web Sharing on my Macbook:

Connection Refused Error

Connection Refused Error

Seems that even if the Sharing Preferences Pane shows that Apache is running, it’s not. A simple Terminal command will show you:

$ ps aux | grep httpd
pmac 1796 0.0 0.0 599820 464 s001 R+ 12:52pm 0:00.00 grep httpd

After a lot of searching, I found the solution. There’s an issue with the Leopard Apache upgrade that somehow forgets to create the log files that Apache needs to start. To fix the problem, type the following commands into Terminal:

sudo touch /var/log/apache2/access_log
sudo touch /var/log/apache2/error_log
sudo chmod 600 /var/log/apache2/access_log
sudo chmod 600 /var/log/apache2/error_log

Restart the Web Sharing Service by unticking and ticking the box is System Preferences or by running the following command in Terminal:

sudo apachectl restart

Apache should be up and running and you can test this by clicking this link: http://localhost. If everything goes to plan you should see the following page:

Apache Start Page

Apache Start Page

Using iSync to Connect to a Nokia 3120 Classic

Update 9th November 2009: This is my last attempt at trying to get the Nokia 3120 classic working with iSync in Snow Leopard (Mac OS 10.6).

  • Download the modified iSync plugin here.
  • Unzip the plugin.
  • Open your Applications folder and locate iSync.
  • Right click iSync and select “Show Package Contents” from the menu.
  • In the new Finder window navigate to:


  • Copy the Nokia-3120c.phoneplugin that you download from this site into this folder.
  • When prompted that the plugins folder cannot be modified, click “Authenticate”.
  • Enter your password.

I have no idea if this will work or not, but it’s the best that I can do.

Update 29th October 2009: I’ve had a look at the plist file format for iSync on Snow Leopard (Mac OS 10.6), and there have been some changes. I’ve updated the 3120c.plist file to reflect these changes, but I’m unable to test the new file. If you’d like to test the new file, you can download it here and please let me know how it goes in the comments. Thanks, Paul.

Update 19th October 2009: As posted in the comments below, this plugin no longer works with Mac OS 10.6 (Snow Leopard). As I no longer have a Nokia 3120c to test with, so I’m afraid I have no way to update the plugin. If anyone does have a working plugin for Snow Leopard, let me know and I’ll link to it from here. Thanks. Paul.

I lost my phone a couple of weeks ago, so I went out and bought a new one. I plumped for a Nokia 3120, because it had what I wanted – a basic camera, bluetooth, and a memory slot – and was cheap.

As with all Nokia’s connecting it to your PC is achieved by using Nokia’s PC Suite, however, connecting it to my Mac via iSync didn’t seem to be possible. I could browse the device via Bluetooth, but iSync would report that it could not use the device.

Thanks to James Lloyd, I was eventually able to get it working. James has a great post about using iSync to connect to Nokia’s Series 40 phones, and helpfully provides plugin’s for nearly 40 models.

While the 3120 classic is not listed, I was able to modify one of the plugins to get it to work. You can grab the 3120 iSync plugin here. Just follow James’ instructions and iSync will happily connect to your 3120.

Edit: The original instructions on James’ blog have disappeared, so you can now find the installation instructions here.

  • Right click iSync from the with applications in the finder and “show package contents”
  • Navigate to: ContentsPluginsApplePhoneConduit.syncdeviceContentsPluginsNokia-6131.phonepluginContentsResources

!!! make a backup of MetaClasses.plist !!!

  • replace contents of MetaClasses.plist with the iSync plugin (text file downloaded from here) for your nokia mobile!