Posts with the category Mac OS X 10.6 Snow Leopard

Find Out Why Your Mac OS X based Computer Doesn't Sleep

Running this command will show you if there is something preventing your computer to go to go to standby automatically:

pmset -g assertions



Read on

Install Pandoc on Mac OS X

Installing Pandoc is easy when you have Homebrew installed:

brew install haskell-platform
cabal update
cabal install pandoc

Alternatively use the way described in its installation instructions.



Read on

Colourful SVN Diff on Mac OS X

I do not particulary like SVN but sometimes I have to use it. The diff output on the Mac OS X command line usually is not colored which is annoying. The solution is to tell SVN it should use colordiff instead. You can easily install colordiff using homebrew:


Read on

Downloading Picasa Web Albums

Picasa-Downloader – A simple Python script to get the normal size images

pip install BeautifulSoup
cd ~/Downloads

Pycasa – capable of downloading full size images

This open source software includes a GUI. It relies on PyGTK and it is therefore difficult to get it to work with Mac OS...

Read on


IPython: Productive Interactive Computing

IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are:

  • Powerful interactive Python shells (terminal- and Qt-based).
  • Support for interactive data visualization and use of GUI toolkits.
  • Flexible, embeddable interpreters to load into your own projects.
  • Tools for high level...

Read on

Use the Python Module MacFSEvents to Monitor Directories for Changes on Mac OS X

MacFSEvents is an up-to-date solution to monitor directories for changes on Mac OS X when using the scripting language Python. It is a binding to FSEvents, Mac OS X's filesystem monitoring framework.

Install MacFSEvents

pip install macfsevents


from fsevents import Observer, Stream


Read on

Install matplotlib on Mac OS X

Installation of the pre-built binaries for OS X

Read Installing OSX binaries in the matplotlib Installation FAQ.

Installation via pip

This is a good way if you have an up-to-date Python installation on your computer and pip installed. It takes, however, some time (~ 20 mins for me) to install as it...

Read on

Sniff Serial Connection


Read on

Serial Port Terminal Applications

Mac OS X


Putty works!



install minicom:

sudo apt-get install minicom

use minicom:

minicom -o -s

How it works:

  • -o do not try to initialize a modem first
  • -s...

Read on

Adjust Spindown Time for HDDs on Mac OS X

If you want to adjust the spindown time of the hard disk drives of your Mac OS X based computer, you can simply run the following command (which will set the spindown from the default 10 minutes to 30 minutes for all HDDs on your system):

pmset -a spindown...

Read on

Use Middle Mouse Button in a Parallels 6 Virtual Machine running Linux on a MacBook Pro

Sometimes you have to use the middle mouse button, sometimes it's just convenient to do so. Either way, if you want to use it on a virtualised Linux machine on a Parallels 6 (or any other virtualisation software) you can't out-of-the box on a MacBook Pro as the touch pad...

Read on

Install and setup libusb 1.0 on Mac OS X

If you use Homebrew, installing libusb from the Formula is as simple as

brew install libusb

Usage in Xcode

Using libusb in an Xcode project is easy:

  • Project Settings → Your Target → Build Phases → Link Binary with Libraries and add libusb-1.0.dylib.
  • Project Settings → The Project → Header Search...

Read on

SSHFS on Mac OS X 10.6.8 and 10.7.2 with Fuse4X

Fuse4X is a port of FUSE - The Filesystem in Userspace to Mac OS X and allows you to mount all different kinds of remote / local filesystems on you Mac computer. A very popular 'filesystem' is sshfs, which allows you to mount a directory of a remote...

Read on

PL-2303 Serial Adapter on Mac OS X

You can get the latest driver for PL2303 based USB to serial adapters from the Prolific download page: (Login as GUEST / GUEST).

More information about the use of a PL-2303 chip based USB-RS232 adapter can be found on


Read on

Resize Images from Context Menu on Mac OS X


Read on


Language References

Applescript Language Guide PDF | HTML

Great Tools

The AppleScript Editor shipped with Mac OS X (or XCode...) PreFab UI Browser Script Debugger 4.5 Smile

Run a Terminal Command

set hostname to ""
do shell script "ping -c1 " & hostname


  • Wikipedia...

Read on

Python 2.7 on Mac OS X

Praveen Gollakota shed light on Installing Python 2.7, easy_install, pip, virtualenv and virtualenvwrapper on Mac OS X. He gives you all the information you need if you want to use an up-to-date Python on Mac OS X! Thx!

Alternative way of installing python using homebrew:

brew install python

Read on

Using Python to interact with the Google Spreadsheets API

update 2015-09-08: this is outdated, please refer to my new blog post instead.

Install the Google Data Library (you should consider installing it in an isolated virtualenv environment):

cd ~/Downloads
curl -C - -O
tar -xf gdata-2.0.14.tar.gz
cd gdata-2.0.14
python install

Now you are ready to test the example...

Read on

Mount SSH filesystems on Mac OS X via SSHFS with or without a GUI / Programs for (S)FTP

Mount SSH filesystems

My personal favorite: Fuse4X

Use with this distribution of SSHFS:

See my dedicated blog post on SSHFS on Mac OS X 10.6.8 with Fuse4X!

Deprecated Option: MacFUSE sshfs using command line

First install MacFUSE.

Then get the sshfs binaries:

cd ~/Downloads
svn co sshfs-binaries

Now you...

Read on

IPv6 Privacy Extensions

The privacy extensions as defined in RFC4941 make your device change its IP every now and then.

Privacy addresses are not enabled by default. Their generation is activated via the sysctl directive use_tempaddr that can be set to one of the following values:

  • 0 don't use privacy extensions.
  • 1 generate privacy addresses
  • 2...

Read on

IPv6 6in4 Tunnel via Hurricane Electric ( Automatic IP Update on Mac OS X

Hurricane Electric provides free IPv6 tunnels via the 6in4 protocol on the website After signing up, one can create up to 5 tunnels. When settings up a standard tunnel, one has to provide one's endpoint IPv4 address which may change from time to time (moving around or 24-hour...

Read on

Install Python Library for WordPress XML-RPC integration

cd ~/Downloads
git clone git://
cd python-wordpress-xmlrpc
python install



Read on

Install Markdown Python Module on Mac OS X

easy_install Markdown



Read on

[fix] Wireshark error: There are no interfaces on which a capture can be done.

I got the following error message when trying to open a network interface for capture using Wireshark on Mac OS X (Wireshark 1.5.1 Intel 64 beta and 1.4.6 Intel 64 show this behaviour):

There are no interfaces on which a capture can be done.

To solve the problem open a Terminal and...

Read on

SSD Optimizations on Mac OS X

Firefox Cache

To disable the the Firefox cache on the disk (SSD) and move it to your RAM, follow these steps:

  • Go to about:config and set browser.cache.disk.enable to false
  • as well as browser.cache.memory.enable to true.

You can check what the cache is doing by going to about:cache

Set the noatime option on the root filesystem


Read on

Bind Multiple IPs To One Physical Interface on Mac OS X

Via the System Preferences: Network pane

  • Go to System PreferencesNetwork.
  • Click on Ethernet (or AirPort)
  • Click on the Configuration WheelDuplicate Service...

You can now configure each instance with different settings, and you're done.

On the Terminal

If you just need to quickly assign an IP/subnet alias to an interface, you can do...

Read on

How to run a .sh script (or perl or python script) on Mac OS X by (double) clicking on the file

  • Rename the shellscript from .sh to .command, then associate it with
  • Use Platypus to create a .app from the shellscript
    This is a great tool to turn scripts (shell, perl, python) into an OS X application. Many features supported!



Read on

Fix sshfs with MacFUSE on Mac OS X 10.6.7 and 10.6.8 Snow Leopard

UPDATE 2011-07-12 Use Fuse4X instead of MacFUSE!!! I wrote a new blog post on the topic: SSHFS on Mac OS X 10.6.8 with Fuse4X.. Thanks Markus for your hint to the Fuse4X project.


Read on

Homebrew instead of MacPorts

I chose it because it seems to be more actively developed.

As explained on I installed Homebrew like this:

/usr/bin/ruby -e "$(/usr/bin/curl -fksSL"

I had XCode already installed, but If you don't, you have to install it before following the next steps (in order to have...

Read on

Set up Vim for Python



Read on

Solve jittery Magic Mouse (MBP early 2011, WiFi interference)

I experienced a problem with my Apple Magic Mouse when I wanted to use it with my new MacBook Pro (early 2011, Core i5): The movements became "blurry", jittery. I have an external display connected via Mini Displayport but this does not seem to affect the problem. But when I...

Read on

Set the hostname on an Apple Computer with Mac OS X 10.6

The hostname can be changed with scutil on Mac OS X. scutil provides a command line interface to the “dynamic store” data maintained by configd. [from the scutil manual].

To set a new hostname run:

sudo scutil --set HostName newhostname[.domain]

Read on

Backup Google Contacts

Possible Choices


Read on

Whois for IP on the Command Line and Online

If you want to know who is behind an IP address (or a domain name) you should use the command line tool whois, which Mac OS X, most Linux and BSD distributions ship. For example, if you want to get information on the IP


And the output...

Read on

Firewalls on Mac OS X - alternatives to Little Snitch

Little Snitch is the classic user interface for the Mac OS X firewall. But it has a drawback: it costs ~30 EUR for a single licence.

The three notable alternatives are:

There are also some open source tools:

Read on

Prevent RSI – Enforce Breaks When Working With Your Mac

  • AntiRSI. Donationware.
  • MacBreakZ. Full version costs 24.95 EUR.
  • Time Out Free. It can be found on the Mac App Store. Version 2 Pro (soon to be released) will not be for free.



Read on

Chinese OCR

OCR for Windows

OCR for Mac OS

Read on

Clear inactive memory on Mac OS X

The purge command clears the inactive memory on Mac OS X. Simply run the command with no parameters:




Read on

Fix a problem with NX on Ubuntu 10.10 with the key d (inadvertently minimizing the current window)

Go to System → Preferences → Keyboard Shortcuts and set the shortcut for Hide all normal windows and set focus to desktop to something sane like Alt + D

update 2011-07-13: This happened again when I used Ubuntu 11.04 inside a NX session on a Mac OS X host computer. :(



Read on

Enable Syntax Highlighting etc. with the shipped version of vi (vim)

How to make vim more comfortable (the version shipped with Mac OS X 10.6):

cd /usr/share/vim
sudo vim vimrc

add set:

set ai                  " auto indenting
set history=100     ...

Read on

Custom DNS entries per domain (nice feature for VPN setups)

OS X has a good feature built in: the dns resolver. It allows you to specify different DNS servers for different domains. After creating the /etc/resolver directory, you can create a /etc/resolver/ file with nameserver in it to redirect DNS requests for this domain to that specific nameserver.



Read on

Working With EXIF Data

Correcting EXIF Date of Images

using shootShifter
This is my tool of choice! It does a great job!!!

using exiftool
If your timestamps are wrong by 5 years, 10 months, 2 days, 10 hours and 48 minutes, put all of the images in the same directory ("DIR") and run exiftool:


Read on

Get BT747 to work via Bluetooth with QStarz BT-Q1000P

Pair the device with Mac OS X and open BT747 then connect to the manually entered: /dev/tty.iBT-GPS-SPPSlave



Read on

Fix mapping of non-Apple keyboards

remapping the Command and Option key

If you use a non-Apple external USB keyboard you will notice that the Windows key represents the ⌘ Command Key and the Alt key represents the ⌥ Option key. To invert this key mapping, open the System Preferences → Keyboard → Modifier Keys → Unknown...

Read on

disassamble Mach-O (Mac OS) binaries

also check (or google it, it's also gisted on github) for more ideas


Read on

Show Folder Path In Finder Title

defaults write _FXShowPosixPathInTitle -bool YES

Read on

Auto refresh PDF as it is being changed

using Preview

use the following AppleScript and save it as ReloadPreviewDocument.scpt

Reload Preview Document 1.0
By Trevor Harmon <>

Based in part on the "Checking Accessibility Status" script by Apple.

on UIscript_check()
    -- get the <span...

Read on

Shortcut to Access the Preview Application from Terminal using AppleScript

If you ever wanted to open PDF, JPEG, PNG files etc.

# A simple bash script that uses Applescript to
# open multiple files in Preview. For example:
# "preview hello.png world.gif *.jpg"

if [ -z "$*" ]; then

Read on

Quick Look from Terminal

We as Mac users know that the space bar reveals "Quick Look" the fast preview for folders and files on Mac OS X. But how can you have a "quick look" at a file when using the terminal? The anser is the following command:

qlmanage -p



Read on

Bash Aliases ( bashrc , bash_profile and bash_login )

Edit your ~/.bashrc :

alias firefox="open -a Firefox"
alias l="ls -l"
alias la="ls -la"

and reload the .bashrc file using . ~/.bashrc or source ~/.bashrc

You might want to add the following line to your ~/.bash_profile in order to get the ~/.bashrc loaded at the start of an interactive bash session:


Read on

Terminal Shortcut for Firefox on Mac OS X

Create a terminal shortcut for Firefox:

sudo ln -s /Applications/ /usr/local/bin/firefox

or simply use the open tool with the application option -a Firefox:

open -a Firefox

Read on

Apache Webserver with PHP and MySQL

Mac OS X 10.6 ships with Apache as well as PHP5. This blog post describes how to activate it.


To run Apache: Enable Web Sharing in the System Preferences → Sharing. Websites are stored in /Library/WebServer/Documents/


To activate PHP: uncomment a line in /etc/apache2/httpd.conf:

LoadModule php5_module       ...

Read on

ssh Shortcuts using .ssh/config

To create an ssh shortcut, add the following text (adopted to your setup) to .ssh/config:

# You can add multiple blocks like this to your .ssh/config
Host rudolf
Port 22
User rudolf
Protocol 2
Compression yes
ServerAliveInterval 15
ForwardX11 no
#LocalForward 20001

To connect to that host via ssh you can now simply type the following...

Read on

Check contents and delete resource forks from the command line

Assume we have a file on Mac OS X on a HFS or HFS+ file system named XX.

If you want to see the content of the resource fork for the file do:

cat XX/..namedfork/rsrc

If you want to delete its resource fork:

cat /dev/null >XX/..namedfork/rsrc

Read on

Show Hidden Files in Finder

If you want to see hidden system files (that have a dot at the beginning on UNIX systems) run:

defaults write AppleShowAllFiles -bool true

use false to revert the change.


Read on

Unmount a CD or Volume Via Command Line on Mac OS X 10.6

You can do this on the terminal via the full UNIX device descriptor:

hdiutil eject /dev/disk1s1

you might want to add -force to the command to enforce the operation.


Read on

Context Menu

The context menu actions can be found in the folder ~/Library/Contextual Menu Items


Read on

Apple Remote / Advanced Configuration

Update 2011-12-20: As there is no update of iRedLite for OS X 10.7 Lion so far. You can still use it but the bindings for are broken. A workaround is to set the buttons to actions such as Current App → Cursors Movement → Right to go one slide...

Read on

c't TriggerBackup

Mac OS X TimeMachine is a great system to simplify backup and recovery on the desktop. But it failes if you have to backup your data after each change and not just every hour. So what you need sometimes is a triggered backup: have a look at c't TriggerBackup....

Read on

Check Open Ports on Mac OS X Using `lsof` (similar to `netstat` on Linux)

To list all ports where server software listens to on a computer running Mac OS X, run this in the terminal:

sudo lsof -i -P | grep -i "listen"



Read on

Convert FLAC files to ALAC

To convert the file input.flac (saved using the FLAC) to the file output.m4a (ALAC format) you can use this Terminal command:

ffmpeg -i "input.flac" -acodec alac "output.m4a" -map_meta_data input.flac:output.m4a

This needs the ffmpegX distribution for Mac OS X, which seems, however,...

Read on

Creation of ISO images, Burning of ISO images – Both on the Terminal using Mac OS X

Burning an ISO Image from Terminal

hdiutil burn image.iso

Creating an ISO Image from a Folder

hdiutil makehybrid -o ~/Desktop/[outfile] ~/Desktop/[source]

[source] can be a folder or a disk image.

Creating an ISO Image from a CD

Determine the device that is you CD/DVD drive:

drutil status

Umount the disk:


Read on

Spotlight Search and Indexing

Terminal helpers (command line tools):

  • mdfind : Search Spotlight metadata indices.
  • mdimport : Force Spotlight to import metadata for a specific directory.
  • mdls : List the metadata attributes of a specific file.
  • mdutil : A utility for managing Spotlight indices.

To erase and rebuild the index on the root partition / do:


Read on

Temporarily Disable Spotlight Indexing

Temporarily disable Spotlight indexing is especially useful when connecting a large external HDD for the first time to copy/move/access some files as the Sportlight scanning slows down the drive access a lot.

sudo mdutil -a -i off

to turn it back on:

sudo mdutil -a -i on



Read on - Use the Internal Accelerometer to Operate iTunes on MacBook

If you want to control iTunes by bumping on your MacBook then follow this advice:

Get amstracker and and unpack them somewhere. Open a Terminal in that directory and run:

./amstracker -u 0.1 -s | python



Read on

Change the Login Screen Wallpaper Image on Mac OS X

To change the login screen wallpaper on Mac OS X you can use the some commands on the terminal. They work on Leopard 10.5 and Snow Leopard 10.6:

cd /System/Library/CoreServices
sudo mv DefaultDesktop.jpg DefaultDesktop_org.jpg
sudo cp /path/of/image.jpg DefaultDesktop.jpg

Read on

Important OS X Software

Sites that list good mac software:

Including paid applications:

Text Editors

My favorite text editor on Mac OS X is MacVim as I love both: vim and my Mac.

In order to use it more productively, copy the launcher mvim from the MacVim bundle to an executable directory:


Read on

Mac OS X Resources

Apple List of keyboard shortcuts:

great tips'n'tricks

for Snow Leopard: Snow Leopard Tipps (It's the site of the author of the Growl based Version of TriggerBackup.)

important darwin commands


Read on

Texas Instruments TI-89 Titanium Calculator

Original TI-89 packaging in French (see the full image here ):

Programming SDK for Windows

PedroM - An Alternative Operating System

There is a free OS: PedroM.


Project Site | on SourceForge

sudo aptitude install tiemu-skinedit tiemu

OS rom file download: TI-89 Titanium...

Read on

Look into a Mac OS X installer package

To open a Mac OS X installer package (.pkg) you can right click on the bundle and select Show Package Contents. Inside you will find a packed file in the .zip or .gz format. When you unpack this file you get a pax file and you can unpack that too....

Read on

Symbolic Link to a Folder

For convenience I want a link shortcut to my folder /home/philipp/something/deeply/stapled in the root folder / in order to have faster access to it (on the terminal):

sudo ln -s /home/philipp/something/deeply/stapled /shortcut

Now I can get to /home/philipp/something/deeply/stapled using the short form /shortcut


Read on