Telling Safari NOT to re-open all the windows from my last session

Every restart your Mac and have it boot up only to open all the last Safari windows you had just opened? This feature – introduced a few operating systems ago – is something I personally don’t like at all. Perhaps I’m a “power user” but I often find that I open so many browser windows in the course of my work that I don’t really want them to all re-open

Ostensibly, Safari appears to have a preference to turn this off or on, here:

However in my version of Safari (7.0.6 on Mac OS X 10.9.5), this preference appears to not actually work at all. (annoying)

So here’s how to go into your system defaults and turn it off for real:

defaults write NSQuitAlwaysKeepsWindows -bool false

How can I get my Mac OS X version from the command line?

Under almost all circumstances, you can just go to “About this Mac” or use the system profiler. However, very rarely I am accessing a machine remotely using SSH where I don’t also have the ability to Remote Desktop or VNC to the machine. In these cases, you can get the exact version number of Mac OS X like this:

system_profiler SPSoftwareDataType

On my mac, it returns:

System Software Overview:
System Version: Mac OS X 10.5.7 (9J61)
Kernel Version: Darwin 9.7.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: Fleetwood’s Mac
User Name: jason (jason)
Time since boot: 2 days 23:57

Installing Rails & MySQL On Mac OS X

First, isntall MySQL package installer from

You must download the 32-bit version even if you have a 64-bit machine.

Then I was able to run this. Note: it is important to give the gem installer the -with-mysql-config flag, and point it to the file mysql_config inside the bin/ directory

sudo gem install mysql – -with-mysql-config=/usr/local/mysql/bin/mysql_config

UPDATE: Me thinks the 64-bit version now works with Snow Leopard 10.6 (haven’t tested under 10.5). But you have to set the flags to use 64-bit:

Prior to Leopard:
sudo gem install mysql – -with-mysql-dir=/usr/local/mysql

Leopard on a PPC machine:
sudo env ARCHFLAGS=”-arch ppc” gem install mysql – -with-mysql-config=/usr/local/mysql/bin/mysql_config

Leopard on an Intel machine:
sudo env ARCHFLAGS=”-arch i386″ gem install mysql – -with-mysql-config=/usr/local/mysql/bin/mysql_config

Snow Leopard (only on Intel):
sudo env ARCHFLAGS=”-arch x86_64″ gem install mysql – -with-mysql-config=/usr/local/mysql/bin/mysql_config

If you don’t run this with the right architecture RCHFLAGS, you get this when you try to launch your app:

unitialized constant MysqlCompat::MysqlRes

I had a real hard time with this one on a recent Snow Leopard upgrade, be sure to rebuild all your port installs too:

And finally do this:

cd /tmp
tar xvfz ruby-mysql-0.2.6.tar.gz
cd ruby-mysql-0.2.6
sudo ruby install.rb

Show all hidden files in the Finder windows

Type this in terminal:

defaults write AppleShowAllFiles TRUE
KillAll Finder

To hide the hidden files again:

defaults write AppleShowAllFiles FALSE
KillAll Finder

enable/disable File Access Control List

How does enable/disable File Access Control List on a volume affect whether or not you can “Use Standard POSIX behavior” or “Inherit from parent” when configuring a sharepoint (on that volume) in the AFP protocol configuration.

When ACL is enabled on a volume, the options when configuring a AFP sharepoint on the volume for Use Standard POSIX behavior or Inherit from parent are greyed out, indicating the ACL will be used to determine inheritance.

This does not apply to SMB (Windows sharing), FTP, NFS sharing.

What does “Automatically enable mirrored updates” do, if selected?

– make them all available to users who are using your server to Software Update

Can I use an Apple AirPort with a Windows-based laptop?

– if you don’t already have a wireless PCMCIA card for the laptop you can buy one for about $30 at most computer stores.

– install the software & card into PCMCIA slot on the laptop

– you should see the Airport network in your list of networks; however, if you have encryption on the Airport it might get trickier.

– essentially, if you want to protect your network with encryption, you can try to get the laptop to work with either the 40-bit or 128-bit options of the Airport– they are not all compatible and you may have to enter the encryption string in HEX characters.

( see )

If this doesn’t work, as a work around you can disable the encryption on the network and instead use the “Access Control” list feature in Airport to restrict the Airport to only the computers that use it. This is done by adding the computers Ethernet ID, a 10-digit hex code, to this list in the Aiport Admin Utility.

MAC OS BOOT KEY LIST: Hold down these Boot Keys while the computer is starting up

Key What it does
C boot from optical drive drive (CD or DVD) drive
N boot from NetBoot image
T target disk mode, computer acts as a firewire hard drive and can be connected to another computer, allowing you to run diagnostics
X “X-Ray” key (resets startup disk selection)
Command-S Single User mode
Command-V Verbose Mode
Shift safe boot mode
Option key boot choice mode (also known as boot into open firmware), displays available boot hard drives and give you a choice of which one to boot from
Cmd-Option-O-F open firmware mode, lets you see what the current firmware is
Cmd-Option-P-R reset parameter RAM
Cmd-Option-Shift-Delete bypass internal hard drive
Mouse button eject removable media

Notes on Addresss Book


~/Library/Application Support/AddressBook/



Address Book will exhibit funny behavior if you start messing with its data files. Sometimes it will start up with an error message Data base is corrupted. (I have seen this happen when I move over the four files in Application Support/AddressBook) and sometimes it will launch and immediately quit (I have seen this happen if you delete the four files in AddressBook but leave the AddresssBook folder intact)

The best way is to use the built-in Backup and Restore which will create a single file containing all the data, move the file over, and then Restore from backup (all done in Address Book except for moving the file itself).

If Address Book launches and does not find a AddressBook folder in ~/Application Support and also does not find a plist file in Preferences, it will create both and populate the default data which contains only one record – Apples own address in Cuptertino.

Safari Bookmarks and History

Form Values

– copying over these items to the new ~/Library/Safari folder seems to work