VirtualBox – Installing Windows XP

To install Windows XP from a CD when using VirtualBox:

  • Create a virtual machine for Windows XP but don’t start it.
  • Machine > Settings > Storage > CD/DVD-ROM
    • Mount CD/DVD-Drive
    • Select drive
    • Enable Passthrough
  • Machine > Settings > General > Advanced
    • Temporarily change the boot order to CD only
  • Start the virtual machine

Removing VirtualBox

(For OS X)

If you want to remove VirtualBox completely from your machine you need to do a couple of thngs in addition to running the ‘VirtualBox_Uninstall.tool’ script supplied in the distribution.

  • Remove ~/Library/Preferences/org.virtualbox.app.VirtualBox.plist
  • Reboot

TinyMCE – disabling paste (as in copy-and-paste)

To disable copy from clipboard – aka the paste in ‘copy/cut and paste’  – in TinyMCE, use the following fragment in ‘tinyMCE.init’

setup : function(ed) { ed.onPaste.add( function(ed, e, o) {
return tinymce.dom.Event.cancel(e);
}
) },

Interestingly enough, if you have ‘Paste from Word’ enabled, that paste process still works.

OS X – Running two copies of Firefox at the same time

The essential trick to running two copies of Firefox at the same time on OS X is to run them both with the commant line options ‘–no-remote’.

/Applications/Web/Firefox.app/Contents/MacOS/firefox -no-remote

I chose to do serveral more things to create a really clean solution.

Create a new profile – say ‘FirefoxTest’

/Applications/Web/Firefox.app/Contents/MacOS/firefox -ProfileManager

Create a new copy of the Firefox application

rsync – a  /Applications/Web/Firefox.app/  /Applications/Web/FirefoxTest.app

Create script files to start both copies of Firefox

In /Applications/Web/Firefox.app/Contents/MacOS, create a executable script file with contents similar to:

#!/usr/bin/env bash

# firefox-single

# Run a standard Firefox setup, but disable single application locking

/Applications/Web/Firefox.app/Contents/MacOS/firefox -P default --no-remote &

And for the second copy of Firefox, in /Applications/Web/FirefoxTest.app/Contents/MacOS something similar to

#!/usr/bin/env bash

# firefox-test

# Run a test Firefox setup, but disable single application locking

/Applications/Web/FirefoxTest.app/Contents/MacOS/firefox -P FirefoxTest --no-remote &

Change the application ‘Info.plist’ file

(in Firefox.app/Contents or the equivalent location)

Key Value
CFBundleExecutable firefox-single
CFBundleIdentifier org.mozilla.firefox.single

For the test copy, use something similar to the following:

Key Value
CFBundleExecutable firefox-test
CFBundleIdentifier org.mozilla.firefox.single-test

The ‘CFBundleExecutable’ entry links the startup Icon (also the command-line ‘open’ command) to the new script file you’ve created to run Firefox.

The ‘CFBundleIdentifier’ ensures that OS X sees separate applications running when managing the applications.

Recache the ‘Info.plist’ file

The last, critical step, is to force OS X to recache the ‘Info.plist’ file (where it caches I don’t know):

touch /Applications/Web/Firefox.app

and

touch /Applications/Web/FirefoxTest.app

Conclusion

Now you’ve got two nice icons you can drag to your toolbar to click, you’ll be running two copies of Firefox side by side – and you’ll forget you had to do this.

Apple Macbook Pro – Recalibrate battery

To recalibrate the battery on an Apple Mackbook Pro (from Calibrating your computer’s battery for best performance)

PowerBook G4 (15-inch Double-Layer SD), MacBook (all models), MacBook Pro (all models), MacBook Pro (17-inch) (all models) and MacBook Air

The battery calibration for the PowerBook G4 (15-inch Double-Layer SD) and any model of MacBook or MacBook Pro has been updated because of a new battery released with this computer. With these computers, follow these steps to calibrate your battery:

  1. Plug in the power adapter and fully charge your PowerBook’s battery until the light ring or LED on the power adapter plug changes to green and the onscreen meter in the menu bar indicates that the battery is fully charged.
  2. Allow the battery to rest in the fully charged state for at least two hours. You may use your computer during this time as long as the adapter is plugged in.
  3. Disconnect the power adapter with the computer still on and start running the computer off battery power. You may use your computer during this time. When your battery gets low, you will see the low battery warning dialog on the screen.
  4. Continue to keep your computer on until it goes to sleep. Save all your work and close all applications when the battery gets very low, before the computer goes to sleep.
  5. Turn off the computer or allow it to sleep for five hours or more.
  6. Connect the power adapter and leave it connected until the battery is fully charged again.

Tip: When the battery reaches “empty”, the computer is forced into sleep mode. The battery actually keeps back a reserve beyond “empty”, to maintain the computer in sleep for a period of time. Once the battery is truly exhausted, the computer is forced to shut down. At this point, with the safe sleep function introduced in the PowerBook G4 (15-inch Double-Layer SD) computers, the computer’s memory contents have been saved to the hard drive. When power is restored, the computer returns itself to its pre-sleep state using the safe sleep image on the hard drive.

Apple Macbook Pro Reset SMC

To reset the System Management Chip (power etc.) on the new Apple Macbook Pro 17 inch (from Apple Portables: Resetting the System Management Controller (SMC)).

MacBook Air (Original), MacBook Air (Late 2008) and MacBook Pro (17-inch, Early 2009)

  1. If the computer is on, turn it off by choosing Shutdown from the Apple () menu.
  2. Connect the power adapter to a working power source.
  3. On the built-in keyboard, press (left) Shift-Control-Option along with the power button once.
  4. Wait 5 seconds and press the power button to start the computer.

Note: You must use the keys on the left side of the built-in keyboard.

You should only perform an SMC reset when the MacBook Air or MacBook Pro (17-inch, Early 2009) has been properly shutdown. This prevents issues from occurring to the file system.

While the power adapter does not need to be connected to reset the SMC, it may be necessary in situations where the battery needs charging or if the computer has been without power for an extended period of time.

OS X Disable all interface sounds

To disable all interface sounds in OS X:

System Preferences > Sounds > Sound Effects

Uncheck all the boxes, alert volume slider all the way to the left.

WordPress Themes