<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Professional PHP &#187; Mac</title>
	<atom:link href="http://www.procata.com/blog/archives/category/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.procata.com/blog</link>
	<description>PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.</description>
	<pubDate>Tue, 27 May 2008 05:57:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Working with PHP 5 in Mac OS X 10.5 (Leopard)</title>
		<link>http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/</link>
		<comments>http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 00:48:44 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[php-5]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/</guid>
		<description><![CDATA[Mac OS X is a great development platform for working with PHP.  Leopard comes with Apache, PHP and many other development tools, such as subversion already installed.  Leopard brings a much needed upgrade from Tiger&#8217;s tired PHP 4 to a very modern version of PHP 5.2.4.  This is a guide for setting [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.procata.com/blog/wp-content/uploads/2007/10/php-med-trans-light.gif' alt='PHP' align="right" />Mac OS X is a great development platform for working with PHP.  Leopard comes with Apache, PHP and many other development tools, such as subversion already installed.  Leopard brings a much needed upgrade from Tiger&#8217;s tired PHP 4 to a very modern version of PHP 5.2.4.  This is a guide for setting up a PHP development environment under 10.5 using the version of PHP that ships with leopard.</p>
<p>You may prefer to use one of the 3rd party distributions of PHP, such as <a href="http://www.mamp.info/en/index.php">MAMP</a>, <a href="http://www.apachefriends.org/en/xampp-macosx.html">XAMPP</a> or <a href="http://www.entropy.ch/software/macosx/php/">Marc Liyanage</a>.  This is a guide to using the version of PHP that comes with 10.5.</p>
<h3>Enable Developer Tools</h3>
<p>These steps may not be strictly necessary for this process, but I find it useful to do them.<br />
First, <a href="http://docs.info.apple.com/article.html?artnum=106290">enable your root password</a>.<br />
You may also want to install XCode Tools from your Leopard disk (or grab the latest from <a href="http://developer.apple.com/tools/">Apple developer tools</a>).  The tools are required is you are going to compile any extensions for PHP.</p>
<h3>Editing Configuration Files</h3>
<p>We will have to edit several configuration files that exist as part of the unixy underpinnings of OS X.  I&#8217;m going to recommend the free text editor, <a href="http://www.barebones.com/products/textwrangler/">TextWrangler</a> for this purpose.  Normally, the finder hides the configuration files from view.  However, in the finder, you can use the &#8220;Goto Folder&#8230;&#8221; option under the &#8220;Go&#8221; menu to view these files.  This option if available via command-shift-G.  Actually, this option is available in any file open dialog in OS X via command-shift-G.  In addition, Text Wrangler will allow you to browse these files with its &#8220;open hidden&#8230;&#8221; option.  But, the much easier option is selecting &#8220;Open file by name&#8230;&#8221; (command-D) and just typing the full path and filename.  To save many of these files, you will need to enter your root password.  Be Careful.</p>
<h3>Enabling PHP</h3>
<p>PHP is installed in Mac OS X by default, but not enabled.  To enable it, we must edit the apache 2 configuration file, which is located at <samp>/etc/apache2/httpd.conf</samp>.  Find the line which loads the PHP 5 module, which looks like this:<br />
<code><br />
#LoadModule php5_module        libexec/apache2/libphp5.so<br />
</code><br />
The line is currently commented out.  All we have to do is remove the comment symbol, <samp>#</samp>, so the line looks like this:<br />
<code><br />
LoadModule php5_module        libexec/apache2/libphp5.so<br />
</code><br />
Save.</p>
<h3>Starting Apache</h3>
<p>Go to the sharing panel in system preferences and enable &#8220;Web Sharing.&#8221;  This will start the apache server.<br />
<a href='http://www.procata.com/blog/wp-content/uploads/2007/10/web-sharing.png' title='Sharing Panel'><img src='http://www.procata.com/blog/wp-content/uploads/2007/10/web-sharing.png' alt='Sharing Panel' /></a><br />
Another way to do this is to type the following in the Terminal application:<br />
<code><br />
sudo apachectl start<br />
</code><br />
You will be prompted to enter your root password.  After that, your apache server should now be running.  If you need to restart the server from the terminal, you can type this:<br />
<code><br />
sudo apachectl restart<br />
</code><br />
If you find this tedious to type, there is a script that you can download to do this later in this post.</p>
<h3>Visiting our Web Site</h3>
<p>Now, lets check our work.  In the sharing panel, you can click on the URL under &#8220;Your computer&#8217;s website.&#8221;  Alternatively, in the web browser, go to the url <a href="http://localhost/">http://localhost/</a>.  localhost is a special name that means &#8220;My computer.&#8221;  If your web server is working, you should see a page titled &#8220;Test Page for Apache Installation.&#8221;  If you go to <a href="http://localhost/manual/">http://localhost/manual/</a>, you can read an Apache 2.2 manual, hosted from your own server.  But, this don&#8217;t tell you that PHP is working.<br />
For that, we&#8217;ll have to create a very simple php program.  Create a new file in TextWrangler and type the following:<br />
<pre class="php">&nbsp;
&lt; ?php <a href="http://www.php.net/phpinfo"><span style="color: #000066;">phpinfo</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;</pre><br />
(Don&#8217;t just copy and paste this.  Note that there should be no space between the <samp>&lt;</samp> and the <samp>?php</samp>.  The WordPress software I use for this blog inserts an extra space.)<br />
Save this using the file name <samp>info.php</samp> in the <samp>/Library/WebServer/Documents/</samp> directory.  (start from the top level directory of your hard drive, not the library directory in your home directory.  Now you should be able to visit the PHP page you just created by visiting <a href="http://localhost/info.php">http://localhost/info.php</a>.  You should see the PHP logo and a big table of configuration information.</p>
<h3>Showing the World</h3>
<p>For security purposes, you should consider that anything you put in your <samp>WebServer/Documents</samp> folder will be available across the web.  If you have information that you want to keep private, think twice about putting it there, unless you know how to protect it.<br />
But, if you want people to see the pages that you are sharing, there can be a few obstacles.  You can give out the URL that is listed in the sharing control panel under &#8220;Your computer&#8217;s website.&#8221;  However, if you are behind a <a href="http://en.wikipedia.org/wiki/Network_address_translation">NAT</a> router, such as I am, this IP address based url will only work for other computers on your network and not for the internet as a whole.  You may have to configure network router or firewall in order to discover your true ip address and to route web server requests to that IP to your computer.  Doing this is beyond the scope of this tutorial.<br />
Additionally, IP address based urls don&#8217;t make good urls to share.  IP addresses can change.  If you plan to host a permanent web site, you may want to purchase a domain name and point it to your Mac.  This also, is beyond the scope of this tutorial.<br />
Perhaps the best option is to purchase both a domain name and professional hosting.  Apache based PHP Hosting is widely available and cheap.  You can get support from a good host on uploading your files to the remote server.  I&#8217;m going to presume that you will use one of the many excellent PHP hosting options and are only configuring PHP on your own machine for education, testing or development purposes.</p>
<h3>Enabling a Personal Website</h3>
<p>If you clicked on the URL under &#8220;Your Personal Website,&#8221; you might have gotten a page that says forbidden.  This is because in the default configuration in Leopard, unlike in Tiger, does not allow Apache to serve documents from home directories.  If you want to enable this feature, you have to create a new Configuration file.<br />
Create a new file with the following contents and save it to <samp>/etc/apache2/users/jeff.conf</samp>.<br />
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;directory</span> <span style="color: #ff0000;">&quot;/Users/jeff/Sites&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/directory<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre><br />
Replace &#8220;jeff&#8221; with your user name, which is also the name of your home directory.  Exact capitalization is imporant.  This tells the Apache server that it is ok to serve web content out of the <samp>~jeff</samp> directory.  You will have to restart Apache for this to take effect.<br />
You may also have to create a <samp>Sites</samp> folder in your home directory to hold the files you want to serve.  Leopard will automatically bless this folder with a special Icon.</p>
<h3>Virtual Hosting</h3>
<p>If you want to experiment with or work on more than one site at a time, the single directory in WebServer Documents and the Personal Websites configuration don&#8217;t work well.  Projects collide and files outside of your home directory can be harder to work with.  The answer to this is to setup virtual hosting.  Lets turn our Personal Website sharing solution into a virtual hosting solution that allows us to work with multiple websites as subdirectories of our Sites folder.<br />
So, lets create a sample site, called mysite.  We&#8217;ll create a folder called &#8220;mysite&#8221; as a sub folder of our Sites folder.  Capitalization is important.<br />
Now, we are going to want to access our site with an easy to use domain name, so that our url is <samp>http://mysite/</samp>.  There is an easy way to create new domain names that are only for personal use.  To do this, we can add it to our <samp>/etc/hosts</samp> file.  Add the following lines at the end of this file:<br />
<code><br />
# My local aliases<br />
127.0.0.1	mysite<br />
</code><br />
127.0.0.1 is a special IP address designation that never changes and corresponds to localhost to mean this computer.  We are telling our Mac that the name mysite is hosted on the local computer.  This rule is only in effect on the same machine.  If you go to a different machine, you cannot use the <samp>http://mysite/</samp> url.<br />
Now we need to configure apache for virtual hosting.  We are going to have to edit our <samp>/etc/apache2/users/jeff.conf</samp> file.  Change the contents of this file to the following:<br />
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;directory</span> <span style="color: #ff0000;">&quot;/Users/jeff/Sites/*/&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/directory<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
NameVirtualHost *:80
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;virtualhost</span> *:<span style="color: #cc66cc;">80</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    DocumentRoot /Users/jeff/Sites/mysite
    ServerName mysite
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/virtualhost<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre><br />
Remember to replace &#8220;jeff&#8221; with your user name.  Place your <samp>info.php</samp> test file into the mysite directory and rename it to <samp>index.php</samp>.  Now, restart your apache server.  When you visit <samp>http://mysite/</samp>, you should now see the familiar php logo and information page.<br />
If you want to add another site, just add a second line in your hosts file, another subdirectory of Sites and append the following to your apache configuration file:<br />
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;virtualhost</span> *:<span style="color: #cc66cc;">80</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    DocumentRoot /Users/jeff/Sites/myothersite
    ServerName myothersite
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/virtualhost<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre></p>
<h3>Sharing with the World, Part II</h3>
<p>Sharing your virtual hosted sites with the world is more complicated if you don&#8217;t have a domain name setup.  You can, however, add your hosts files entries to other computers that you want to share with.  However, you have to change the 127.0.0.1 IP address to the IP address of your computer, taking into account any NAT.<br />
There is a special case of this.  If you are using parallels, perhaps for test viewing your pages in internet explorer, you may want your virtual hosted sites to be available.  The good news is that Windows also supports a <a href="http://en.wikipedia.org/wiki/Hosts_file">hosts</a> file. Here is how to <a href="http://www.mvps.org/winhelp2002/hostsfaq.htm">edit your windows hosts file</a>.  The big problem is knowing what IP address to use.  You can&#8217;t use 127.0.0.1 on the windows side because that is the virtual windows machine, not your Mac&#8217;s address.   You can use the IP address shown on your network system preferences panel, 192.168.1.100 for me.  But, this number is subject to change and you will have to re-edit your hosts file on the windows side.<br />
If you are using Parellels, be sure to upgrade to the new <a href="http://www.parallels.com/en/products/desktop/beta/">beta version</a> for Leopard, build 5540.  Once you&#8217;ve done that, if you visit the network panel in system preferences and select the &#8220;Parallels Host-Guest&#8221; network, you will see the IP address that parallels assigns to your host machine.  (assuming you are using Shared Networking.)  You can then use this IP address in your windows hosts file.  You may also be able to change &#8220;Using DHCP&#8221; to &#8220;Using DHCP with Manual address&#8221; and re-entering this number if you have a problem with the number changing.  Here, my number is 10.37.129.3:</p>
<p><img src='http://www.procata.com/blog/wp-content/uploads/2007/10/parallels.png' alt='Network Preferences panel' /></p>
<h3>Installing MySQL</h3>
<p>MySQL has a binary distribution for Mac OS X.  They also have reasonably good documentation on <a href="http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html">installing MySQL on Mac OS X</a> for their distribution.  Note that Leopard specific packages for MySQL have not been created yet.</p>
<h3>Starting MySQL</h3>
<p>So far, the MySQL preferences panel from the Tiger release is broken and does not correctly start and stop MySQL (<a href="http://bugs.mysql.com/bug.php?id=31889">bug report</a>.  You can do this from the terminal window with<br />
<code><br />
sudo /usr/local/mysql/support-files/mysql.server start<br />
</code><br />
To shutdown the server type:<br />
<code><br />
sudo /usr/local/mysql/support-files/mysql.server stop<br />
</code><br />
If you find this tedious to type, you can download <a href="http://www.procata.com/software/WebDevCP.dmg">WebDevCP</a>, which is a small AppleScript application that I made. Launching WebDevCP launches both Apache and MySQL.  Quitting the application shuts them both down.  usually.  Launching and quitting requires a password.  No warranty on this thing.  It was just something I was using personally and figured others might find useful.</p>
<h3>Bring the mysql.sock to PHP</h3>
<p>One problem that has come about with MySQL and Leopard is the location of the <samp>mysql.sock</samp> file.  Previously, the default location for this file was in the <samp>/tmp</samp> directory.  That location has now moved to the <samp>/var/mysql</samp> directory.  PHP will look for it there.  Unfortunately, the default location from the MySQL will still place it in the old location.  We can fix this by creating a <samp>my.cnf</samp> configuration file in the /etc directory.  Save a file with the following contents to <samp>/etc/my.cnf</samp>:<br />
<code><br />
[client]<br />
socket = /var/mysql/mysql.sock</p>
<p>[mysqld]<br />
socket = /var/mysql/mysql.sock<br />
</code><br />
In the terminal window, type the following commands to create the directory for the sock file:<br />
<code><br />
sudo mkdir /var/mysql<br />
sudo chown _mysql /var/mysql<br />
</code><br />
One drawback to this is that if you have installed the MySQL GUI tools, they will look for the <samp>mysql.sock</samp> file at the old location.  You can enter the new socket in the connection dialog under More Options, there is a box labeled &#8220;connect using socket.&#8221;  Just enter <samp>/var/mysql/mysql.sock</samp>.<br />
Another solution is to change the <samp>php.ini</samp> file to expect the socket in a different location.  I&#8217;m going with the <samp>my.cnf</samp> option because I expect the MySQL will have a Leopard version out in a few days that changes the default location.</p>
<h3>Where is PEAR?</h3>
<p>OS X has traditionally had problems with <a href="http://pear.php.net/">PEAR</a>.  Many point updates would overwrite the included version of PEAR with an older, and perhaps insecure version.  Sadly, Apple has fixed this by not including PEAR at all in their OS.  This is a big inconvenience for people wanting to use Apple&#8217;s default version of PHP, versus a third party distribution.  So, lets get PEAR installed.  Type the following in the terminal window to download the PEAR installer:<br />
<code><br />
curl http://pear.php.net/go-pear > go-pear.php<br />
</code><br />
after that, type<br />
<code><br />
sudo php -q go-pear.php<br />
</code><br />
To run it.  Hit enter to select the default locations.  PEAR will be installed, but it won&#8217;t be ready to use until we modify our <samp>php.ini</samp> file.</p>
<h3>PHP .ini configuration</h3>
<p>Now we need to make some changes to our php configuration file.  Leopard has an empty configuration file by default, but provides a file which you can use as a template.  From the terminal window, type:<br />
<code><br />
sudo cp /etc/php.ini.default /etc/php.ini<br />
</code><br />
Now, edit the <samp>/etc/php.ini</samp> file.  Find the <samp>include_path</samp> setting:<br />
<code><br />
;include_path = ".:/php/includes"<br />
</code><br />
And change it to<br />
<code><br />
include_path = ".:/usr/share/pear"<br />
</code><br />
This enables our PEAR installation.  You may also want to make some changes which will improve your ability to debug PHP.  FInd the line that says<br />
<code><br />
log_errors = Off<br />
</code><br />
and change it to<br />
<code><br />
log_errors = On<br />
</code><br />
You have to then restart Apache for these PHP changes to go into effect.</p>
<h3>Errors and Omissions</h3>
<p>Thats all there is to using the version of PHP delivered with OS X.  If you find this confusing, you are probably better off with something like XAMPP or MAMP.  I&#8217;ll probably end up compiling my own versions of PHP, but that is a different blog post.  I&#8217;ve already had problems with this configuration when I tried to install XDebug via PECL.  One last thing, if you run into problems, you can check the apache2 error_log file using the Console application.</p>
<p>For support, try the <a href="http://www.sitepoint.com/forums/">Sitepoint forums</a> or Apple&#8217;s <a href="http://discussions.apple.com/">Discussion Forums</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-105/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mighty Mouse Kryptonite and Exceeding Expectations</title>
		<link>http://www.procata.com/blog/archives/2007/09/18/mighty-mouse-kryptonite-and-exceeding-expectations/</link>
		<comments>http://www.procata.com/blog/archives/2007/09/18/mighty-mouse-kryptonite-and-exceeding-expectations/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 17:50:39 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/09/18/mighty-mouse-kryptonite-and-exceeding-expectations/</guid>
		<description><![CDATA[I&#8217;m a fan of Apple&#8217;s Bluetooth mighty mouse.  I cart my laptop all over and I like the ability to have a full sized mouse with a scroll wheel and right click without the hassle of cable management on some narrow coffee shop table.
Imagine my horror when just such a table caused the chain [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a fan of Apple&#8217;s <a href="http://www.apple.com/mightymouse/">Bluetooth mighty mouse</a>.  I cart my laptop all over and I like the ability to have a full sized mouse with a scroll wheel and right click without the hassle of cable management on some narrow coffee shop table.</p>
<p>Imagine my horror when just such a table caused the chain of events that killed my Mighty Mouse.  Oh, it wasn&#8217;t a table at my familiar neighborhood <a href="http://www.westbranchjavajunction.com/">coffee shop</a>.  It was the very much narrower and much less familiar table at Taco Bell.  Well, that and the tile floor in the dining area.  Well, that and stiff backed mouse pad that turned out to be flexible. A narrow table, a slightly overhanging and flexible mouse-pad, and a tile floor together form Mighty Mouse kryptonite.</p>
<p>And yes, it is a sign of our times when Taco Bell has free WiFi.</p>
<p>After my mouse took the plunge off the table and hit the floor, it separated into three separate pieces where there should be only one.  Perhaps, I thought, all was not lost. If only I could rejoin the pieces, I would have the power of right click once more.  I needed to gather a couple of items to help me on my quest.  After wandering a maze of twisty passages, otherwise known as the Wal-Mart across the street, I managed to collect an x-acto knife and super glue.  My surgery was a success and the Mighty Mouse was once again functional.</p>
<p>Alas, the recovery was not to last.  After traveling to php|works in Atlanta, I found the mighty mouse dead in my bag.  The strain of travel proved too much for its little plastic innards.</p>
<p>As soon as I was able, I went to the Apple Store for a replacement.  But, I&#8217;m a short man and the wireless mice were on the top shelf, so I was forced to seek out a store employee for assistance.</p>
<p>&#8220;How can I help you?&#8221; he asked.  </p>
<p>I put the broken corpse of the Mighty Mouse on the table, &#8220;I need a replacement for this mouse.&#8221;</p>
<p>&#8220;Oh,&#8221; he replied.  And then to my surprise asked, &#8220;Did you buy it with your computer?&#8221;</p>
<p>&#8220;Yes, I did.&#8221;  I told him.</p>
<p>&#8220;When did you buy your computer?&#8221; he wanted to know.</p>
<p>&#8220;January,&#8221; I replied, hardly daring to believe where this conversation could lead.</p>
<p>&#8220;It should be covered under warranty,&#8221; he informed me, &#8220;Let me check with my manager.&#8221;</p>
<p>Sure enough, after producing the serial number for my laptop, I was sent home with a brand new Mighty Mouse and a stunned smile on my face.</p>
<p>Now, I&#8217;m sure that there is a specific clause in the warranty covering Taco Bell floors.  And, mostly likely, if any Apple lawyers ever read this post, they won&#8217;t even make it this far before writing up some kind of memo.  I doubt my case was typical of company policy.  The MBA-wielding consultant urging companies to &#8220;exceed expectations&#8221; is almost a cliche, but those organizations with no soul never seem to internalize the advice.  I have to say that at least one heroic employee in one company in one place has exceeded my expectations and created one very grateful and impressed customer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/09/18/mighty-mouse-kryptonite-and-exceeding-expectations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Firefox Extensions for Web Developers</title>
		<link>http://www.procata.com/blog/archives/2007/03/08/firefox-extensions-for-web-developers/</link>
		<comments>http://www.procata.com/blog/archives/2007/03/08/firefox-extensions-for-web-developers/#comments</comments>
		<pubDate>Thu, 08 Mar 2007 13:11:14 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[firebug]]></category>

		<category><![CDATA[firefox]]></category>

		<category><![CDATA[firefox-extensions]]></category>

		<category><![CDATA[tamper-data]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/03/08/firefox-extensions-for-web-developers/</guid>
		<description><![CDATA[I prefer Safari for my casual web browsing on the Mac, but for web development, nothing beats Firefox.  (Firefox beats IE hands down on Windows.)  Firefox&#8217;s openness and the Firefox plugin architecture means that there is little that you cannot find out about a web page with a Firefox add-on.  I&#8217;ve tried [...]]]></description>
			<content:encoded><![CDATA[<p>I prefer Safari for my casual web browsing on the Mac, but for web development, nothing beats Firefox.  (Firefox beats IE hands down on Windows.)  Firefox&#8217;s openness and the Firefox plugin architecture means that there is little that you cannot find out about a web page with a Firefox add-on.  I&#8217;ve tried a bunch of different Firefox extensions for web development.  Here are the ones that I find most useful and that I use on a regular basis.</p>
<h3>DOM Inspector</h3>
<p>Yes, yes, it comes installed with Firefox, but lets not forget the basics.  The DOM Inspector allows you to see what is actually going on in your web document.  The DOM Inspector lets you browse DOM nodes, style sheets, or Java Script objects.  You select a node by either drilling down, by searching, or by clicking on it.  Although, the UI for selecting a node with your mouse is just plain lousy.  Once you&#8217;ve chosen your subject, the DOM inspector can show you the box model information for that node, the style sheets associated with the node, the computed CSS styles, or the Javascript object.</p>
<h3>Web Developer Extension</h3>
<p>Chris Pederick&#8217;s <a href="http://chrispederick.com/work/webdeveloper/">Web developer extension</a> has been out for a long time and is the plugin I am most familiar with.  This is really the swiss army knife of web developer tools. It is so feature packed that I am still finding new things that it does.  Unfortunately, the UI is also so cluttered that I am still finding new things that it does.</p>
<p>This add-on can slice and dice a web page every which way.  It can outline a variety DOM elements, for example drawing an outline around all block elements on a page.  This can be nice for lining things up.  The Display Line Guides option is also a good way to verify alignment, not to mention Display Ruler, or Display Page Magnifier for fine detail.</p>
<p>This extension has dozens of reports, each one geared toward diagnosing a particular kind of problem.  Some of them are external, such as sending your URL to a validation service.  Some are internal, such as showing a dump of all of the page&#8217;s active cookies.  Unfortunately, many of these option open up in a new tab, taking the focus off of the page that you are trying to work with.  It can be hard to tell which options do this.  There is an option for having the tabs open in the background, but this is not the default.</p>
<p>The View Style Information option is particularly nice.  You can point to any element on the page and the extension will display the element tree along with ids and classes.  If you click on an element, it will display only the style rules that apply to that element.  This beats the drill down approach in the DOM inspector, although it doesn&#8217;t show box model information or computed style information this way.</p>
<p>The web developer extension can change things as well as inspect them.  You can go into a mode where you can edit your CSS or HTML in real time for immediate feedback.  This is great for testing out small changes. For the PHP developer, the extension has a variety of options for manipulating cookies and forms.  There are also a variety of ways to enable or disable certain elements on the page.</p>
<p><a href="https://addons.mozilla.org/firefox/60/">Install Web Developer Extension</a></p>
<h3>Tamper Data</h3>
<p><a href="http://tamperdata.mozdev.org/">Tamper Data</a> is live HTTP headers on steroids.  Tamper data records the HTTP request headers and HTTP response headers for each request that the browser makes.  Not only that, It allows you to &#8220;tamper&#8221; with the requests before they are sent out, editing headers or form values behind the scenes.  Tamper data can present a graph of the requests involved with loading a web page.  Tamper data is great for security testing and page loading performance tuning.</p>
<p><a href="https://addons.mozilla.org/firefox/966/">Install Tamper Data Extension</a></p>
<h3>FireBug</h3>
<p><a href="http://www.getfirebug.com/">FireBug</a>, ah what can I say but wow!  According to their web site:</p>
<blockquote><p>
Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.
</p></blockquote>
<p>Firebug has considerable overlap with the extensions I&#8217;ve mentioned so far.  It doesn&#8217;t necessarily duplicate all of their functions, but the ones it does, it does really well.  It goes way beyond in some cases.  There is really no point in me talking about Firebug&#8217;s features, because the <a href="http://www.getfirebug.com/">website</a> already does such a good job at it.  They&#8217;ve impressed this jaded old developer.</p>
<p>If you haven&#8217;t tried this one yet, seriously, go get it right now.</p>
<p><a href="https://addons.mozilla.org/firefox/1843/">Install FireBug Extension</a></p>
<h3>ColorZilla</h3>
<p><a href="http://www.iosart.com/firefox/colorzilla/">ColorZilla</a> adds a small eyedropper tool to the bottom left corner of the window.  You can use this tool to inspect colors on the current web site.  Double clicking it brings up a color picker and some other color related tools.</p>
<p><a href="https://addons.mozilla.org/firefox/271/">Install ColorZilla Extension</a></p>
<h3>Multiple Profiles</h3>
<p>Ok, I lied.  There are a few situations where I use FireFox for casual browsing.  Some web sites just won&#8217;t work with Safari, or don&#8217;t work well with Safari.  For these, I pull up Firefox.  I don&#8217;t want my casual browsing tools to clutter up my web development experience and I don&#8217;t want my web development tools to clutter up my casual browsing experience.  The solution is to create <a href="http://lifehacker.com/software/firefox/geek-to-live--manage-multiple-firefox-profiles-231646.php">multiple profiles</a> in FireFox. I have one for web development and another for normal surfing.  I have safari ask me to select a profile on start up.  This extra step would be annoying for a primary browser, but it doesn&#8217;t seem too bad for a secondary browser.</p>
<h3>Setting up my Mac series</h3>
<p>Firefox is not mac specific, but this is actually the latest installment in my setting up my Mac series.</p>
<ol>
<li><a href="http://www.procata.com/blog/archives/2007/02/16/how-to-transfer-mac-os-x-application-data-between-computers/">How to Transfer Mac OS X Application Data between Computers</a></li>
<li><a href="http://www.procata.com/blog/archives/2007/02/22/free-software-for-mac-os-x/">Free Software for Mac OS X</a></li>
<li><a href="http://www.procata.com/blog/archives/2007/03/08/firefox-extensions-for-web-developers/">FireFox Extensions for Web Developers</a></li>
<li>UPCOMING: Configuring Boot Camp and Parallels</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/03/08/firefox-extensions-for-web-developers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Free Software for Mac OS X</title>
		<link>http://www.procata.com/blog/archives/2007/02/22/free-software-for-mac-os-x/</link>
		<comments>http://www.procata.com/blog/archives/2007/02/22/free-software-for-mac-os-x/#comments</comments>
		<pubDate>Thu, 22 Feb 2007 19:08:47 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[freeware]]></category>

		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/02/22/free-software-for-mac-os-x/</guid>
		<description><![CDATA[The software that comes with OS X is very capable.  The mundane applications that come with OS X, such as the Finder, Preview, and Disk Utility can do some surprising things.  I&#8217;ve been using Macs for 20 years and I&#8217;m still learning new tricks for these programs.
But, the installed apps can&#8217;t do everything. [...]]]></description>
			<content:encoded><![CDATA[<p>The software that comes with OS X is very capable.  The mundane applications that come with OS X, such as the Finder, Preview, and Disk Utility can do some surprising things.  I&#8217;ve been using Macs for 20 years and I&#8217;m still learning new tricks for these programs.</p>
<p>But, the installed apps can&#8217;t do everything.  As part of setting up my new Mac, I&#8217;ve had to install a small set of very useful, dare I say essential software.  This is the list of everything that I installed on my Mac for one reason or another.</p>
<p>Everything on this list is Free as in beer.  These are only things that are perpetually useful.  If it is a limited version it is at least useful.  Nothing expires.  These are not the things that I think you should look at, or any kind of best of or exhaustive list.  These are just the things that I actually use.  (With a noted exception or two.)</p>
<p>This is Part II in my &#8220;Setting up my Mac&#8221; series.  See Part I: <a href="http://www.procata.com/blog/archives/2007/02/16/how-to-transfer-mac-os-x-application-data-between-computers/">How to Transfer Mac OS X Application Data between Computers</a>.</p>
<h3>Video Codecs For Quicktime</h3>
<p>QuickTime is the native video format for the Mac.  However, there are many different video file formats floating around on the web.  Fortunately, QuickTime is modular and there are many free components available for playing these formats.  I think this list covers the most popular.</p>
<dl>
<dt><a href="http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx">Flip4Mac</a></dt>
<dd>Plays Windows Media Player files in QuickTime (Except those that have DRM).</dd>
<dt><a href="http://perian.org/">Perian</a></dt>
<dd>Plays some .avi files in QuickTime.</dd>
<dt><a href="http://trac.cod3r.com/a52codec/">A52Codec</a></dt>
<dd>Adds support for AAC audio.</dd>
<dt><a href="http://www.divx.com/divx/mac/">DivX</a></dt>
<dd>Maybe this is redundant with Perian?</dd>
</dl>
<h3>Video Players</h3>
<p>In a rare show lameness, the built-in QuickTime player cannot play QuickTime Video Full Screen unless you pay to upgrade to QuickTime Pro.  This has always bugged me.  Can you say nickel &#038; dime?  I&#8217;d rather they roll the price into the cost of OS X or my computer, if necessary.  Fortunately, this is a restriction on the player, and not on the QuickTime Framework.  Third players can play full screen, although perhaps at the expense of some QT player niceties like the remote control.  I&#8217;ve installed these additional players.</p>
<dl>
<dt><a href="http://www.mikeash.com/software/qtamateur/">QTAmateur</a></dt>
<dd>This tiny player plays quicktime full screen and not much else.</dd>
<dt><a href="http://niceplayer.sourceforge.net/">Nice Player</a></dt>
<dd>This is a more capable QuickTime player.  I&#8217;ve had the video and audio tracks get of of sync, tho.  Still evaluating.</dd>
<dt><a href="http://www.real.com/player">Real Player</a></dt>
<dd>Necessary to play the anything in Real format, or to play Real streams in your browser.</dd>
<dt><a href="http://www.videolan.org/vlc/">VLC</a></dt>
<dd>A very capable player that does not rely on QuickTime or its plugins.</dd>
<dt><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Flash Player</a></dt>
<dd>OS X comes with flash player installed, but you might want to upgrade.  <a href="http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15507">View your current flash version number</a>.</dd>
</dl>
<p>I don&#8217;t do much with video, but these players and the prior QuickTime plugins have handled everything that I&#8217;ve ever wanted to do.</p>
<h3>Productivity</h3>
<p>At $400 and without the typical Windows PC OEM discounts or the student discounts available to some, Microsoft Office represents a significant investment, especially if you just need occasional word processing, or you just want to view Microsoft Office documents that people send you.  <a href="http://www.neooffice.org/">NeoOffice</a> is a mac native version of OpenOffice.  I have Microsoft Office, but NeoOffice is still useful to open the OpenOffice formatted documents that people from the open source community sometimes send me.</p>
<p>BBEdit has been around in the Mac community for a long time.  <a href="http://www.barebones.com/products/textwrangler/">TextWrangler</a> is its free but commercial quality and very capable little brother.</p>
<h3>Compression</h3>
<p>The finder does a pretty good job compressing and uncompressing zip files.  (You knew it did that, right?)  However, there are about a zillion different compression formats that might arrive at your doorstep via the magic of the internet.</p>
<dl>
<dt><a href="http://www.stuffit.com/mac/expander/">Stuffit Expander</a></dt>
<dt>
<dd>Stuffit is the time-honored way to uncompress stuff.  However, this long standing Macintosh institution has fallen into disrepute lately.  To download Stuffit, you have to surrender your email address, and they do use it.  I&#8217;ve installed it anyway, thanks to a throw away email address.</dd>
</dt>
<dt><a href="http://wakaba.c3.cx/s/apps/unarchiver.html">The Unarchiver</a></dt>
<dd>I&#8217;ve switched to the free and open source Unarchiver as my primary de-compressor.  So far, so good.</dd>
</dl>
<h3>Chat Programs</h3>
<p>iChat is nice, but there are more chat protocols out there than AOL and Jabber.  I&#8217;ve also managed to collect a few different online profiles.  You can reach me at procatajeff on AOL.</p>
<dl>
<dt><a href="http://www.adiumx.com/">Adium</a></dt>
<dd>Allows you to connect to multiple chat protocols and multiple accounts at the same time.  It doesn&#8217;t have all of the features of the native chat programs, but it is worth it to just have to run one program.</dd>
<dt><a href="http://colloquy.info/">Colloquy</a></dt>
<dd>IRC client for Mac OS X.</dd>
<dt><a href="http://messenger.yahoo.com/mac.php">Yahoo Messenger</a></dt>
<dd>The Yahoo Messenger for the Mac has many fewer features than its Windows cousin, but its not as loaded with advertisements as the windows version, either.</dd>
<dt><a href="http://www.microsoft.com/mac/default.aspx?pid=msnmessenger">MSN Messenger</a></dt>
<dd>I don&#8217;t use MSN at all, but if you did&#8230;</dd>
<dt><a href="http://www.aim.com/get_aim/mac/latest_macosx.adp">AOL Messenger</a></dt>
<dd>Again, there are some AOL features you can&#8217;t get through iChat.  I almost always use Adium instead of AOL Messenger or even iChat.</dd>
</dl>
<h3>Web Browsers</h3>
<p>I use Safari for 99% of my web browsing.  However, I install the major alternative browsers, too.</p>
<dl>
<dt><a href="http://www.mozilla.com/en-US/firefox/">FireFox</a></dt>
<dd>There are still some sites that do not work with Safari.  For those, Firefox can usually get you in.</dd>
<dt><a href="http://www.caminobrowser.org/">Camino</a></dt>
<dt>
<dd>Same rendering engine as FireFox, but a more &#8220;mac-like&#8221; user interface.</dd>
</dt>
<dt><a href="http://www.opera.com/">Opera</a></dt>
<dd>I only use it to check web pages to see if they&#8217;re rendering correctly.</dd>
<dt><a href="http://www.newsgator.com/NGOLProduct.aspx?ProdId=NetNewsWire&#038;ProdView=lite">NetNewsWire Lite</a></dt>
<dd>Great feed reader.  I&#8217;m a registered user of the full versions.  This was probably the best valued software purchase I&#8217;ve ever made.  I started with the Lite version, although I&#8217;ve forgotten what the differences are by now.</dd>
</dl>
<h3>File Transfer</h3>
<dl>
<dt><a href="http://cyberduck.ch/">CyberDuck</a></dt>
<dd>The finder will do FTP, but CyberDuck does more.  I use it for the synchronization capability.  This program has always been a little buggy and never quite reached the level of stability that I would like, but I use it anyway.</dd>
<dt><a href="http://www.bittorrent.com/index.html">BitTorrent</a></dt>
<dd>I don&#8217;t do much with Torrents, but when you run across them, use this.</dd>
<dt><a href="http://transmission.m0k.org/">Transmission</a></dt>
<dd>An alternative BitTorrent client.  I haven&#8217;t used this one yet, but I&#8217;m gonna give it a try next time I want to download a torrent.</dd>
</dl>
<h3>Utilities</h3>
<p>There are tons of haxies, so called maintenance utilities, and customizers for OS X.  I don&#8217;t use any of them.  Bad memories from the System 6 extension days, I guess.  Here are a couple utilities I do use.</p>
<dl>
<dt><a href="http://www.ragingmenace.com/software/menumeters/">Menu Meters</a></dt>
<dd>Monitor CPU, Memory and Disk usage as well as network activity in the menu bar.  Very nice.  Running this on my old machine was a major contributor to my decision to purchase a new one.</dd>
<dt><a href="http://www.derlien.com/">Disk Inventory X</a></dt>
<dd>A graphical breakdown of how your disk is being used.  A kinda shaky 1.0, but be prepared to get an education after you run it and see where your disk space is going.  Keep it around for when you need to find some free space.</dd>
</dl>
<h3>Associating Files with Applications</h3>
<p>Most of the applications on this list overlap in terms of the file formats that they can open.  Sometimes, though, the wrong program will open when you double click on a file or download something.  <a href="http://www.rubicode.com/Software/RCDefaultApp/">RCDefault</a> allows you to edit the associates between file types and data types and with the applications that can use them.  You can do this in the Finder to a certain extent, but RCDefault gives you more options and puts it all in one place.</p>
<h3>Anything Else</h3>
<p>I put this list together to keep track of what I need to install after I rebuild my machine.   Take a look at part I of my setting up a Mac series.</p>
<p>If there is something you think I should take a look at let me know in the comments.  (But keep it in the free or perpetually useful spirit of this post.)</p>
<p>Best of Luck</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/02/22/free-software-for-mac-os-x/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Transfer Mac OS X Application Data between Computers</title>
		<link>http://www.procata.com/blog/archives/2007/02/16/how-to-transfer-mac-os-x-application-data-between-computers/</link>
		<comments>http://www.procata.com/blog/archives/2007/02/16/how-to-transfer-mac-os-x-application-data-between-computers/#comments</comments>
		<pubDate>Fri, 16 Feb 2007 15:14:49 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[clean-install]]></category>

		<category><![CDATA[migration-assistant]]></category>

		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/02/16/how-to-transfer-mac-os-x-application-data-between-computers/</guid>
		<description><![CDATA[Its been a long time coming, but I finally got a new Mac. I&#8217;ve personally owned a Mac of one sort or another since 1987, but I didn&#8217;t start using a Mac full time for work until around 2000.  I&#8217;ve been going through the process of setting up the new machine.
I decided to start [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.procata.com/blog/wp-content/uploads/2007/01/macosx.jpg" alt="Mac OS X" align="right" height="128" width="128" />Its been a long time coming, but I finally got a new Mac. I&#8217;ve personally owned a Mac of one sort or another since 1987, but I didn&#8217;t start using a Mac full time for work until around 2000.  I&#8217;ve been going through the process of setting up the new machine.</p>
<p>I decided to start from scratch on the new machine, rather than use the migration assistant.  The previous machine had been the subject of countless experiments and upgrades. I wanted to start from a clean slate.  I chose to reinstall all software and just transfer data files form the old machine to the new one.</p>
<p>I am recording the process on this blog to remind myself for next time and also hoping it might help someone else trying to do the same thing.  I&#8217;ll probably do this again when I migrate from Tiger (OS X 10.4) to Leopard (OS X 10.5).</p>
<p>This guide may favor the Unix geek, but I&#8217;ll try to keep it non-geeky.  If you&#8217;re uncomfortable with anything here, use the <a href="http://docs.info.apple.com/article.html?artnum=25773">Apple migration assistant</a> instead.  These instructions represent what I actually did to move between machines.  Your situation may be different.  Use these instructions at your own risk.  When in doubt, <a href="http://www.oreillynet.com/pub/a/mac/2005/05/17/tiger.html">use the Apple supplied migration assistant</a>.  Always make backups of your old data.</p>
<p>I&#8217;ll assume that you can get your old mac and your new Mac <a href="http://docs.info.apple.com/article.html?artnum=106658">talking on a network</a> (You don&#8217;t even need a <a href="http://docs.info.apple.com/article.html?artnum=42717">cross over cable</a>), and that you can figure out how to <a href="http://docs.info.apple.com/article.html?artnum=106461">enable file sharing</a> on your old system so you can transfer your files over.</p>
<h3>Do a Clean Install</h3>
<p><img src="http://www.procata.com/blog/wp-content/uploads/2007/01/installer.jpg" alt="Installer" align="right" height="128" width="128" />My Mac came ready to go.  All I had to do is turn it on and answer a few networking and registration questions and I was, um productive, making comic books for the kids and playing with the iSight.  However, I decided to wipe the hard drive and do a complete re-install.  </p>
<p>There were a few reasons for this.  One was to be able to play with impunity for a period of time, knowing that I could wash away my mistakes and experiments.  Another was to be able to do a custom install.  This laptop drive is fairly small for what I want to do with it.  During my custom install, I omitted a bunch of printer drivers, trial apps and language translations to save a gig or two.  Its never going to be easier to do this than now.  Third, I just wanted to make sure that I could rebuild the system from scratch, while I still had a warrenty and tech support available.</p>
<p>I&#8217;m extremely conservative with my work system.  I rely on it and I want it to work when I need it.  I feel its better to allocate a fixed amount of time now to learn how to rebuild, rather than have spend an indeterminate amount of time with it in the event of some mishap.</p>
<p>When I re-installed, the first user I created on the new machine had the same short name as the primary user on the old machine.  I haven&#8217;t tested these techniques for moving user accounts with different names, but overall I think they should work.</p>
<h3>Moving your keychain</h3>
<p><img src="http://www.procata.com/blog/wp-content/uploads/2007/01/keychain.jpg" alt="Keychain" align="right" height="128" width="128" />The first thing to do after to get your machine is to copy your keychain from your old computer to the new one.  The keychain contains all of your passwords.  Its also one of the few centralized databases on the Mac that you can&#8217;t just regenerate.  Its best to migrate it before you launch any programs on the new machine that might require authentication.</p>
<p>You can open the Keychain Access application to view and manage your passwords.  Each User&#8217;s keychain is stored in their <samp>~/Library/Keychains</samp> directory.  (The <samp>~</samp> means this directory is a subdirectory of your user home directory.)  </p>
<p>I just copied the <samp>login.keychain</samp> file from the old system and replaced the one on the new system.  I would recommend logging out and logging back in after replacing the old file.</p>
<p>You may also want to migrate your system level keychain.  This is located in <samp>/Library/Keychains/system.keychain</samp>.  Notice that this is not in your user directory, but is a subdirectory of your main hard drive.  I didn&#8217;t bother to migrate this one, but rather to enter the handful of passwords that it contained.  If you do overwrite this file, make sure you look at its ownership &#038; permissions via get info in the finder first, and restore the permissions after you are done.</p>
<p>You may want to do Keychain First Aid on the File menu of the Keychain Access application after this process, just to make sure everything is ok.</p>
<h3>Move your Cookies</h3>
<p><img src="http://www.procata.com/blog/wp-content/uploads/2007/01/cookie.jpg" alt="Cookie" align="right" height="128" width="128" />I could never figure out why some people are so paranoid about cookies. Here is your chance to get rid of them all.  Well, I don&#8217;t wear a tin foil hat;  I want to keep my cookies.  My cookies only take up 1.5MB after years of browsing on my mac.  Having a smaller cookie file probably won&#8217;t make my browsing experience any better, and there are so many it really isn&#8217;t worth trying to sift through them.  For me, the best option is to migrate the whole cookie file.</p>
<p>Safari and WebKit cookies are stored in <samp>~/Library/Cookies/cookies.plist</samp>.  Copying this file from the old machine to the same location on the new machine will transfer all of your cookies.</p>
<p>I don&#8217;t do anything cookie-worthy in any browser except Safari, so I didn&#8217;t bother migrating any of the cookies in the alternative browsers I have installed.  If you have FireFox cookies that you want to preserve, I believe they are located in FireFox&#8217;s <samp>Application Support</samp> folder and will migrate just fine using the generic Migrating a Mac OS X Application instructions below.</p>
<h3>Migrating User Data and Documents</h3>
<p><img src="http://www.procata.com/blog/wp-content/uploads/2007/01/home.jpg" alt="Home" align="right" width="128" height="128" />Moving your User data is easy.  Just open your home folder on the old machine and copy all of the subdirectories you see to the new machine except for the <samp>~/Library</samp> direcctory.  Actually, you could copy the <samp>~/Library</samp> directory wholesale, too, but the purpose of this post is to start with a clean slate of application settings and support files and most of these live in the <samp>Library</samp> directory.</p>
<p>The typical folders you will copy over are <samp>~/Desktop</samp>, <samp>~/Documents</samp>, <samp>~/Movies</samp>, <samp>~/Music</samp> and <samp>~/Pictures</samp>.  There shouldn&#8217;t be anything of consequence in these directories on the new machine.  You can probably just replace them.  You may also want to copy your <samp>~/Public</samp> and <samp>~/Sites</samp> directories if you have anything in them.</p>
<p>You want to copy over your data files before you launch any applications that might use that data, for example iPhoto or iTunes.</p>
<h3>Migrating a Mac OS X Application</h3>
<p><img src="http://www.procata.com/blog/wp-content/uploads/2007/01/app.jpg" alt="Application" align="right" height="128" width="128" />Almost all native OS X applications use the same <a href="http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/index.html">file organization</a> for their files.  The settings for almost all applications can be transferred by looking in two places.</p>
<p>The <samp>~/Library/Application Support</samp> directory contains folders with the same name as each application.  copy the folders from the old machine to same location on the new machine for the applications whose support data you want to keep.</p>
<p>The <samp>~/Library/Preferences</samp> directory contains many individual files (and sometimes a folder or two).  The files have a java style naming convention.  For example, Safari&#8217;s preference file is named <samp>com.apple.Safari.plist</samp>.  Just copy over the preference files for each application that you want to retain the preferences for.  Watch out, though, some applications have more than one preference file, such as iTunes.</p>
<p>As part of my clean slate initiative, I only migrated 5 or 6 preference files from my most used and most configured applications, such as iTunes, Safari and Adium.</p>
<p>Mac OS X applications are fairly liberal with these files.  In order to conform to the Mac programming guidelines, any OS X application should be able to regenerate a fresh preference file, or a fresh application support file if their file comes up missing.  Deleting these files can be a good way to &#8220;reset&#8221; an application to its standard defaults.</p>
<h3>Moving Safari</h3>
<p><img src="http://www.procata.com/blog/wp-content/uploads/2007/01/safari.jpg" alt="Safari" align="right" width="128" height="128" />Safari takes a bit of special consideration to migrate.  Safari stores bookmarks, browser history, form auto-fill values, and other data in a special folder located at <samp>~/Library/Safari</samp>.  Copying this folder to the same location the new system will preserve this information.</p>
<p>Safari Doesn&#8217;t have a folder under <samp>~/Library/Application Support</samp>, but don&#8217;t forget to copy the safari preferences file from <samp>~/Library/Preferences/com.apple.Safari</samp>.</p>
<h3>Moving Mail</h3>
<p><img src="http://www.procata.com/blog/wp-content/uploads/2007/01/mail.jpg" alt="Mail" align="right" width="128" height="128" />Apple&#8217;s Mail.app also requires some special consideration.  Mail stores its mail database in <samp>~/Library/Mail</samp>.  Copying this directory along with the preferences file at <samp>~/Library/Preferences/com.apple.Mail</samp> will transfer your mail.</p>
<p>If you are transferring from a 10.3 system, there was a major change in file format for the mail database between 10.3 and 10.4.  Mail will automatically upgrade your mail files the first time you run it, however, it will not delete the old files.  <a href="http://docs.info.apple.com/article.html?artnum=301315">This apple tech note</a> describes how to delete the unused files from your Mail directory.</p>
<h3>Moving iTunes</h3>
<p><img src="http://www.procata.com/blog/wp-content/uploads/2007/01/itunes.jpg" alt="iTunes" align="right" width="128" height="128" />Moving iTunes depends on your iTunes Music Folder Location and if you have iTunes Copy files to iTunes Music folder when adding to library.  These settings are in the Advanced panel of iTunes preferences.  Fortunately there are already some pretty good guides on how to do this.  There is a <a href="http://docs.info.apple.com/article.html?artnum=301748">Moving iTunes Music Folder</a> tech note from Apple.  This is augmented by <a href="http://hifiblog.com/past/2006/05/11/howto-move-your-itunes-music-while-preserving-library-data-when-you-dont-let-itunes-manage-your-music-library/">instructions from HiFi Blog</a>. </p>
<p>Following these instructions, I was able to transfer my iTunes Music without any problems.</p>
<h3>Double Check your Library folder</h3>
<p><img src="http://www.procata.com/blog/wp-content/uploads/2007/01/library.jpg" alt="Library" align="right" width="128" height="128" />Some applications store data in subdirectories of the Library folder other than Preferences and Application Support.  You may wish to peruse the subfolders of the Library directory in your user directory for these stray bits of data.  The Apple file organization document can help to tell you what they are and help you to decide if you should copy them over.  I didn&#8217;t copy anything over, but for a couple exceptions which I&#8217;ve already enumerated above.</p>
<p>Don&#8217;t copy the <samp>~/Library/Cache</samp> directory.  This will just be regenerated on the new machine.</p>
<p>Additionally, there is a system wide <samp>/Library</samp> folder on your Hard drive.  You may want to scan this folder for system wide settings that you want to transfer over.  Again as part of my clean install, I did not transfer anything from this directory, although I recognized a few bits of software that I needed to install on the new machine.</p>
<h3>Unix Stuff</h3>
<p>If you&#8217;ve accessed the unix side of Mac OS X, you may have a variety of things to move or at least to re-install.  These things are beyond the scope of this blog post, but you might want to look for custom settings in <samp>/etc</samp> or custom installed software in <samp>/usr/local</samp> or data files in <samp>/var</samp>.  I&#8217;ll have a sequel to this post which covers these issues in more detail.</p>
<h3>Repairing Permissions</h3>
<p>Copying files between systems could end up with some file permissions and ownership problems.  I try to keep my files inside my user home directory.  So far, I haven&#8217;t had any problems.  Your milage may vary.  It&#8217;s probably a good idea to run the Verify Disk Permissions or the Repair Disk Permissions commands in the Disk Utility Application.</p>
<h3>Rebuilding a System or Restoring from Backup</h3>
<p>You can also use this guide to rebuild a Mac OS X installation, not just to copy from one system to another.  The OS X installer has an &#8220;Archive and Install&#8221; option.  If you have enough disk space, you can install a fresh copy of OS X and start from scratch.  The installer will copy your old files into an archive directory.  Then, you can copy your applications and data from the Archive folder to their proper places.</p>
<p>May you never need to use this guide to restore from a backup, but the same instructions apply.  You do back up, right?</p>
<h3>More Later</h3>
<p>This is the first in a series about setting up a new mac.  I&#8217;ll have the next installment ready in a couple of days.</p>
<p>I&#8217;ve certainly mis-explained some things here.  I&#8217;ve probably gotten a few things wrong and have definitely omitted important details.  Proceed at your own risk.  Please share your experiences moving applications in the comments.  Best of Luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/02/16/how-to-transfer-mac-os-x-application-data-between-computers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Coding Apprentice</title>
		<link>http://www.procata.com/blog/archives/2006/03/29/the-coding-apprentice/</link>
		<comments>http://www.procata.com/blog/archives/2006/03/29/the-coding-apprentice/#comments</comments>
		<pubDate>Thu, 30 Mar 2006 04:16:53 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Misc]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[steve-jobs]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/?p=178</guid>
		<description><![CDATA[Ok, maybe I watch too much reality TV, but I&#8217;d like to see a show called &#8220;The Coding Apprentice.&#8221;
Starting with 18 candidates, each week, they are randomly divided into teams of 2, 3, or 4 (perhaps solo on odd weeks).  Then a charity is selected with a need for an application.  Each team [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, maybe I watch too much reality TV, but I&#8217;d like to see a show called &#8220;The Coding Apprentice.&#8221;</p>
<p>Starting with 18 candidates, each week, they are randomly divided into teams of 2, 3, or 4 (perhaps solo on odd weeks).  Then a charity is selected with a need for an application.  Each team is given a week to create a solution.  The charity reviews the solutions and picks the application they like best.  Then, the teams that weren&#8217;t picked go back to &#8220;the conference room&#8221; and make a presentation to Steve Jobs about the merits of their solution and the problems with the other teams solutions.  Then Steve fires one candidate.  At the end, the winner is given funding to start a software company and can hire some of the candidates that weren&#8217;t chosen.</p>
<p>What reality TV show would you like to see &#8220;Geekified?&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2006/03/29/the-coding-apprentice/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mouse problems with Safari 1.3 after using Expose</title>
		<link>http://www.procata.com/blog/archives/2005/04/19/expose-and-safari/</link>
		<comments>http://www.procata.com/blog/archives/2005/04/19/expose-and-safari/#comments</comments>
		<pubDate>Tue, 19 Apr 2005 18:35:18 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2005/04/19/mouse-over-problems-with-safari-13-and-1039/</guid>
		<description><![CDATA[I&#8217;ve been impressed by the new JavaScript speed of Safari 1.3, but since upgrading to 10.3.9, I&#8217;ve started having a problem with using Safari and Expose.  After I use Expose to select a Safari window, Mouse events appear to get screwed up:

The cursor does not change to a hand when moving the mouse over [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been impressed by the new JavaScript speed of Safari 1.3, but since upgrading to 10.3.9, I&#8217;ve started having a problem with using Safari and Expose.  After I use Expose to select a Safari window, Mouse events appear to get screwed up:</p>
<ul>
<li>The cursor does not change to a hand when moving the mouse over a link</li>
<li>The link destination does not appear in the status bar</li>
<li>CSS hover effects do not trigger</li>
<li>Application names fail to appear above icons when scrubbing the dock with the cursor</li>
<li>Moving the mouse cursor outside of a textarea does not change it back to the arrow</li>
<li>Clicking the middle mouse button, which I have mapped to expose, has no effect (hitting F9 works fine)</li>
</ul>
<p>The mouse position, regular click, and right clicks seem to continue to work fine.</p>
<p>Switching to the Finder and then back to Safari seems to clear up the problem most of the time.</p>
<p>I&#8217;m pretty conservative with my setup.  Trained from my System 7 extension days, I don&#8217;t run any hacks or third party enhancers on my system (I do have the debug menu turned on, though).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/04/19/expose-and-safari/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Knocked off the internet, a story of Windows and Macintosh</title>
		<link>http://www.procata.com/blog/archives/2005/03/15/knocked-off-the-internet-a-story-of-windows-and-macintosh/</link>
		<comments>http://www.procata.com/blog/archives/2005/03/15/knocked-off-the-internet-a-story-of-windows-and-macintosh/#comments</comments>
		<pubDate>Tue, 15 Mar 2005 16:35:19 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Agile Methods]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[firefox]]></category>

		<category><![CDATA[internet-explorer]]></category>

		<category><![CDATA[safari]]></category>

		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2005/03/15/knocked-off-the-internet-a-story-of-windows-and-macintosh/</guid>
		<description><![CDATA[This weekend the internal modem in my Mac died.  Living in a rural area, I am a dialup user.  Let me say that getting unexpectedly disconnected from the internet is very traumatic.
I&#8217;ve been following an iterative development cycle where I deploy to my client&#8217;s site every Friday.  (My old ERP colleagues would [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend the internal modem in my Mac died.  Living in a rural area, I am a dialup user.  Let me say that getting unexpectedly disconnected from the internet is very traumatic.</p>
<p>I&#8217;ve been following an iterative development cycle where I deploy to my client&#8217;s site every Friday.  (My old ERP colleagues would be mortified &#8212; install on Friday?  My response: automated testing)  Thankfully, last Friday&#8217;s upload went through, although it was the last internet connection my internal modem would ever make.  It took me a couple days to rule out line quality and ISP problems and determine that the problem was hardware failure.</p>
<p>I have a PC with windows XP available.  Its not mine and I really don&#8217;t use it except for checking web sites in internet explorer and playing an occasional game.  So Sunday night I tried using it for some serious browsing for the first time.  After about five minutes, I realized that I can&#8217;t stand Internet Explorer.  The lack of a tabs felt like a missing finger.  I had no idea how much I used that feature in both Safari and in Firefox.  Also, the fonts under XP just plain looked bad.</p>
<p>Tiring with IE, I installed Firefox.  I&#8217;m impressed with Firefox on the PC.  I prefer Safari on the Mac, but I do use Firefox on the Mac for web development because of its ability to control and inspect headers, cookies, the DOM, etc.  I don&#8217;t use Firefox on the Mac for day to day browsing because its interface feels a little bit off.  No such feeling for Firefox on Windows.  Win Firefox felt very comfortable.  I like it.</p>
<p>When I upgraded this blog to WordPress 1.5, I integrated this blog with del.icio.us.  I have been using del.icio.us for my &#8220;to blog about later links.&#8221;  del.icio.us is very helpful when you have to browse in a foreign environment.</p>
<p>Sunday afternoon I had to start contemplating the idea that I might have do next Friday&#8217;s deployment from the XP machine or even temporarily move my development environment to the Windows machine.  It didn&#8217;t take long to rule out this option.  OS X comes pre-installed with Apache, PHP, CVS, SSH, and a bunch of other things that I probably take for granted.  Windows has none of that.  I decided that setting up a development environment under windows would probably take too much time.</p>
<p>I still remember the trauma from the last time I tried to ftp from a stock Windows machine.  Its probably better now, but I still decided that I didn&#8217;t want to try that route.  Besides, I just got my <a href="http://www.procata.com/blog/archives/2005/03/01/rsync-to-remote-server-via-ssh/">automated deployment scripts</a> working on the Mac.</p>
<p>So Monday morning, I drove 60 miles to go to pick up a USB Modem at Best Buy.  Now here is the problem with owning a Mac.  Best Buy has two models in stock.  Neither has OS X drivers.  I bought one anyway in case it might &#8220;just work.&#8221;  It doesn&#8217;t.  So I thought I was stuck until the USB modem I ordered from online arrives.</p>
<p>But then I realized that I had enough ethernet stuff in the basement to hookup a network between the PC and the Mac.  I have never done this before because I simply don&#8217;t use the windows machine enough to care.  Hooking up the network was a breeze.  A couple wizards, a few property dialogs and a half hours worth of reading was all it took to set up internet connection sharing on the PC side.  The Mac recognized the new network immediately and without configuration.  Sweet!</p>
<p>So, I am once again connected and now just waiting for my Mac compatible USB modem to come in the mail.</p>
<p>There is an added benefit.  Over the last year or so, I have been gradually switching from table based layout for my web pages to a CSS based layout.  I&#8217;ve quite a bit of trouble maintaining the same layout of older pages in CSS due to browser variances.  Some of my table based layout components are somewhat ambitious for CSS.  I never used to do much testing on Win IE because I was pretty familiar with how the table based layouts would look.  Win IE is very stable on these types of layouts and they almost always looked exactly on IE how I had developed them on the Mac.  Additionally, I had long ago worked out the cross browser kinks and was pretty much recycling the same debugged layout components.</p>
<p>This is definitely not the case for CSS.  I don&#8217;t yet have a full library of debugged layout components and I have to say my understanding of cross browser kinks is incomplete, although growing.  If you browse around on this blog in IE and in Firefox, you can see that while not terrible, it doesn&#8217;t render some pages correctly on IE.</p>
<p>Testing under IE was a pain for me.  Editing CSS files on Windows kept bringing up FrontPage instead of a plain text editor, which is what I wanted.  Now that the machines are networked, I can now just point windows to the test environment that is already running on my Mac and preview right from there.  I also have occasional access to a Windows Laptop, which will make this type of testing a lot easier.</p>
<p>I&#8217;m too far behind this week, but maybe next week I will finally figure out what is wrong with the style sheet for this blog under Win IE.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/03/15/knocked-off-the-internet-a-story-of-windows-and-macintosh/feed/</wfw:commentRss>
		</item>
		<item>
		<title>rsync to remote server via ssh</title>
		<link>http://www.procata.com/blog/archives/2005/03/01/rsync-to-remote-server-via-ssh/</link>
		<comments>http://www.procata.com/blog/archives/2005/03/01/rsync-to-remote-server-via-ssh/#comments</comments>
		<pubDate>Tue, 01 Mar 2005 22:04:43 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[rsync]]></category>

		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2005/03/01/rsync-to-remote-server-via-ssh/</guid>
		<description><![CDATA[If you ever need to repeatedly upload to a remote server, here is the command line of the day:

rsync -zrptL --delete-after -e &#34;ssh&#34;  --include=core --include=tags --exclude=.DS_Store --cvs-exclude /local/dir user@host:/remote/dir/

rsync sends only the files that have changed.  I just tried rsync today for the first time and I&#8217;m impressed.  Its far faster than [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever need to repeatedly upload to a remote server, here is the command line of the day:<br />
<pre>
rsync -zrptL --delete-after -e &quot;ssh&quot;  --include=core --include=tags --exclude=.DS_Store --cvs-exclude /local/dir user@host:/remote/dir/
</pre><br />
rsync sends only the files that have changed.  I just tried rsync today for the first time and I&#8217;m impressed.  Its far faster than all of the ftp based synchronization tools I&#8217;ve used.  Unfortunately, it only goes in one direction.  Here are the meanings of the options:</p>
<p>z - use compression<br />
r - recurse directories<br />
p - preserve permissions<br />
t - preserve times<br />
L - copy (flatten) symbolic links</p>
<p>&#8211;delete-after - gets rid of any files in the remote directory that are not in the local directory.  It prevents old files from getting orphaned on the server. </p>
<p>Put any ssh parameters you need inside the quotes.</p>
<p>I develop on Mac OS X, so &#8211;exclude=.DS_Store gets rid of those annoying little files.</p>
<p>&#8211;cvs-exclude gets rid of all the crud that CVS leaves lying around.</p>
<p>&#8211;include=core and &#8211;include=tags are my very hard won lesson of today.  My program has a core and a tags directory. Tags is a special directory for cvs and removed by the &#8211;cvs-exclude option.  Any file or directory named core is also removed by this option.  &#8211;include puts em back.  The other &#8211;cvs-exclude patterns are less likely to collide.  I think &#8211;include has to come before the &#8211;cvs-exclude on the command line.</p>
<p>The trailing slash (or absence of one) on the source and destination directories matter.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/03/01/rsync-to-remote-server-via-ssh/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Whats on my Mac</title>
		<link>http://www.procata.com/blog/archives/2005/01/20/whats-on-my-mac/</link>
		<comments>http://www.procata.com/blog/archives/2005/01/20/whats-on-my-mac/#comments</comments>
		<pubDate>Fri, 21 Jan 2005 04:16:20 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2005/01/20/whats-on-my-mac/</guid>
		<description><![CDATA[Jackson Miller asks &#8220;Whats on your Mac?&#8221;  Here goes:
MySQL, PHP 4 and PHP 5 as described here. Also, phpMyAdmin.  I use a personal version of squid using AdZapper because I have more storage than bandwidth.
Photoshop, Dreamweaver, BBEdit and TextWrangler.
Browsers: Camino, Firefox, iCab, Mozilla, OmniWeb, and Opera.  I have a couple different versions [...]]]></description>
			<content:encoded><![CDATA[<p>Jackson Miller asks &#8220;<a href="http://jaxn.org/blog/archives/552-Whats-on-your-Mac.html">Whats on your Mac?</a>&#8221;  Here goes:</p>
<p>MySQL, PHP 4 and PHP 5 as described <a href="http://www.procata.com/blog/archives/2005/01/11/mac-mini-and-php/">here</a>. Also, phpMyAdmin.  I use a personal version of squid using AdZapper because I have more storage than bandwidth.</p>
<p>Photoshop, Dreamweaver, BBEdit and TextWrangler.</p>
<p>Browsers: Camino, Firefox, iCab, Mozilla, OmniWeb, and Opera.  I have a couple different versions of some of these for testing purposes.  I use safari for my personal browsing and FireFox for web development. </p>
<p>IM: Adium, ChitChat X, Colloquy, Fire, MSN Messenger, Proteus, and Yahoo Messenger.  I think Adium is the best of the bunch, but it doesn&#8217;t do everything, so I end up switching between different programs occasionally or running more than one at once.</p>
<p>NetNewsWire.  I have <a href="http://www.procata.com/blog/archives/2004/04/25/starting-a-blog/">184 subscriptions</a> now.  Eagerly awaiting 2.0.</p>
<p>RealPlayer and Windows Media Player, as well as VLC.</p>
<p>Games: Burning Monkey Mahjong, and Snood.</p>
<p>You can find all these and more by searching on <a href="http://www.versiontracker.com/macosx/">Version Tracker</a>.</p>
<p>The best macintosh forum is <a href="http://episteme.arstechnica.com/6/ubb.x?a=frm&#038;f=8300945231">Macintoshian Achaia</a> at Ars Technica.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/01/20/whats-on-my-mac/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
