<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Computing &#187; How To</title>
	<atom:link href="http://dancingengineer.com/computing/category/how-to/feed" rel="self" type="application/rss+xml" />
	<link>http://dancingengineer.com/computing</link>
	<description></description>
	<lastBuildDate>Sun, 28 Nov 2010 04:37:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>How To Open .pptx Files on Mac</title>
		<link>http://dancingengineer.com/computing/2010/03/how-to-open-pptx-files-on-mac</link>
		<comments>http://dancingengineer.com/computing/2010/03/how-to-open-pptx-files-on-mac#comments</comments>
		<pubDate>Mon, 22 Mar 2010 16:00:29 +0000</pubDate>
		<dc:creator>dancer</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[.pptx]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://dancingengineer.com/computing/?p=13</guid>
		<description><![CDATA[Do not unzip the file if it gets downloaded as a .pptx.zip file (unless it is supposed to be a .zip file). Rename the file to remove the .zip extension and keep the .pptx extension. .pptx files are viewable with: Microsoft Powerpoint in Microsoft Office 2008 for Mac Home and Student Edition. You can download a [...]]]></description>
			<content:encoded><![CDATA[<p></p><ul>
<li>Do not unzip the file if it gets downloaded as a .pptx.zip file (unless it is supposed to be a .zip file).</li>
<li>Rename the file to remove the .zip extension and keep the .pptx extension.</li>
</ul>
<p><strong>.pptx files are viewable with:</strong></p>
<ul>
<li>Microsoft Powerpoint in <a href="http://click.linksynergy.com/fs-bin/click?id=US9cj*wK4Vw&amp;offerid=166833.503&amp;type=2&amp;subid=0" target="_blank">Microsoft Office 2008 for Mac Home and Student Edition</a><img src="http://ad.linksynergy.com/fs-bin/show?id=US9cj*wK4Vw&amp;bids=166833.503&amp;type=2&amp;subid=0" border="0" alt="" width="1" height="1" />. You can download a <a href="http://www.microsoft.com/mac/products/office2008/trial-download.mspx" target="_blank">free 30 day trial version</a>.</li>
<li>Impress in <a href="http://openoffice.org" target="_blank">OpenOffice</a> which is free.  OpenOffice doesn&#8217;t display the .pptx files perfectly but it is good enough if you just want to be able to read the file.</li>
<li>Keynote in <a href="http://www.apple.com/iwork/" target="_blank">Apple iWork</a>.  You can download a <a href="http://www.apple.com/iwork/download-trial/" target="_blank">free 30 day trial version</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dancingengineer.com/computing/2010/03/how-to-open-pptx-files-on-mac/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Install WordPress on Mac OS X (Leopard)</title>
		<link>http://dancingengineer.com/computing/2009/07/how-to-install-wordpress-on-mac-os-x-leopard</link>
		<comments>http://dancingengineer.com/computing/2009/07/how-to-install-wordpress-on-mac-os-x-leopard#comments</comments>
		<pubDate>Wed, 08 Jul 2009 10:00:43 +0000</pubDate>
		<dc:creator>dancer</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[httpd.conf]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://dancingengineer.com/computing/?p=4</guid>
		<description><![CDATA[How to start and stop the Apache HTTP Server Go to: System Preferences -&#62; Sharing To start the server, select Web Sharing. To stop the server, unselect it. Install MySQL Download MySQL for Mac OS X. For my computer, I used the package format for Mac OS X 10.5 (x86). Verify package integrity using MD5 [...]]]></description>
			<content:encoded><![CDATA[<p></p><h3>How to start and stop the Apache HTTP Server</h3>
<ol>
<li>Go to: <em>System Preferences -&gt; Sharing</em></li>
<li>To start the server, select <em>Web Sharing</em>.  To stop the server, unselect it.</li>
</ol>
<h3>Install MySQL</h3>
<ol>
<li><a href="http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg">Download MySQL for Mac OS X</a>.  For my computer, I used the package format for Mac OS X 10.5 (x86).<a href="http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg"><br />
</a></li>
<li><a href="http://dev.mysql.com/doc/refman/5.1/en/verifying-package-integrity.html">Verify package integrity using MD5 checksums or GnuPG</a>.</li>
<li>Follow the instructions for <a href="http://dev.mysql.com/doc/refman/5.1/en/mac-os-x-installation.html">installing MySQL on Mac OS X</a>.  I recommend installing both the MySQL Startup Item and preference pane as well.  These will make it possible to have MySQL start automatically during system startup and enable you to start and stop the MySQL server with a click of a button.</li>
<li><a href="http://dev.mysql.com/doc/refman/5.1/en/post-installation.html">Post-installation setup and testing</a>.</li>
</ol>
<h3>Enable PHP</h3>
<p>Mac OS X comes with the Apache HTTP Server and PHP installed.  The PHP module needs to be enabled.</p>
<p>Find the location of <code>httpd.conf</code>, the main configuration file for the Apache HTTP Server, using the command, <code>httpd -V</code>.</p>
<p>Note: The <code>$</code> at the beginning of the lines in the following examples is the command prompt.</p>
<p><code>$ httpd -V | grep SERVER_CONFIG_FILE<br />
-D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"</code></p>
<p><strong>Beware.</strong> Proceed only if you know what you are doing.  I expect that you have the technical ability of a software developer familiar with Unix.</p>
<p>Edit the <code>httpd.conf</code> file using root access with the <code>sudo</code> command and your favorite text editor.  I use <code>vi</code>.</p>
<p><code>$ sudo vi /private/etc/apache2/httpd.conf</code></p>
<p>Uncomment the line:</p>
<p><code># LoadModule php5_module</code></p>
<p>Save the file and exit.</p>
<p>Start the HTTP server and test that PHP is running by creating a file in your Web directory containing a call to the function <code>phpinfo()</code>.</p>
<p><strong>File: </strong><code><strong>/Users/&lt;username&gt;/Sites/test.php</strong></code></p>
<p><code>&lt;?php phpinfo(); ?&gt;</code></p>
<p>Navigate to the URL, http://localhost/~username/test.php .</p>
<h3>Change MySQL socket</h3>
<p>If you were to try to install WordPress now, you would probably run into this error:</p>
<p><strong>Error establishing database connection</strong></p>
<p>This error occurs because the PHP build that comes installed on Mac OS X (Leopard) is configured to look for the MySQL socket at <code>/var/mysql/mysql.sock</code>.  In the current release of MySQL, the default socket is at <code>/tmp/mysql.sock</code>.  Here is how to fix this.</p>
<p>Find the PHP configuration file path from the call to <code>phpinfo()</code> from earlier.  It is probably <code>/etc</code> and this location is probably a symbolic link to <code>/private/etc</code>.</p>
<p>Create a <code>php.ini</code> file if it doesn&#8217;t already exist by copying the default configuration file, <code>php.ini.default</code>, using root access with the <code>sudo</code> command.  Give the root user write permission on the file.</p>
<p><code>$ cd /private/etc<br />
$ sudo cp php.ini.default php.ini<br />
$ sudo chmod +w php.ini</code></p>
<p>In <code>php.ini</code>, edit the two lines for the parameters <code>mysql.default_socket</code> and <code>mysqli.default_socket</code> to be:</p>
<p><code>mysql.default_socket = /tmp/mysql.sock</code></p>
<p><code>mysqli.default_socket = /tmp/mysql.sock</code></p>
<p>Save the file and exit.</p>
<h3>Enable <code>.htaccess</code></h3>
<p>If you want to use pretty permalinks in WordPress, you need to enable <code>.htaccess</code>.  Otherwise you will see this error:</p>
<p><strong>404 Not Found: The requested URL &lt;URL&gt; was not found on this server.</strong></p>
<p>Edit the Apache configuration file to allow override.  If you are using your Sites Web directory:</p>
<p><code>$ sudo vi /private/etc/apache2/users/&lt;username&gt;.conf</code></p>
<p>Find <code>AllowOverride</code> and change its value from <code>None</code> to <code>All</code>.</p>
<p><code>AllowOverride All</code></p>
<p>Save the file and exit.</p>
<h3>Start Apache HTTP Server</h3>
<p>Now that you have enabled PHP and <code>.htaccess</code>, restart the HTTP server.</p>
<h3>Download and extract WordPress</h3>
<p><a href="http://codex.wordpress.org/Installing_WordPress#Detailed_Instructions">Download and extract WordPress</a>.  To have WordPress automatically configure <code>wp-config.php</code>, before you proceed with Step #3 of the WordPress installation instructions, set the file permissions as follows.</p>
<h3>Set file permissions</h3>
<p>On Mac OS X (Leopard), the Apache HTTP Server runs under the user account, <code>_www</code> which belongs to the group <code>_www</code>.  To allow WordPress to configure <code>wp-config.php</code> during installation, update files during upgrades, and update the <code>.htaccess</code> file for pretty permalinks, give the server write permission on the files.  I do not know if there are any security issues with this.  If you are more knowledgeable than I am on this matter, please chime in!</p>
<p><em>Updated February 17, 2010.</em> My preferred way to do this is to change the group of the <code>wordpress</code> directory and its contents to <code>_www</code> and give write permissions to the group. Keep the owner as your <code>&lt;username&gt;</code>.</p>
<p><code>$ cd /Users/&lt;username&gt;/Sites<br />
$ sudo chown -R &lt;username&gt;:_www wordpress<br />
$ sudo chmod -R g+w wordpress</code></p>
<p>However, when I tried this, it did not work for automatic upgrades to newer versions of WordPress although it worked for automatically updating the <code>.htaccess</code> file for pretty permalinks.  <em>End of update.</em></p>
<p>Another way to do this is to change the user of the <code>wordpress</code> directory and its contents to <code>_www</code>.  Keep the group as <code>staff</code>, a group to which your user account belongs and give write permissions to the group.</p>
<p><code>$ cd /Users/&lt;username&gt;/Sites<br />
$ sudo chown -R _www wordpress<br />
$ sudo chmod -R g+w wordpress</code></p>
<p>With both of these methods, the WordPress directories have a permission level of <code>775</code> and files have a permission level of <code>664</code>.  No file nor directory is world-writeable.</p>
<p>For reference, the Apache configuration file, <code>httpd.conf</code>, contains entries for the <code>User</code> and <code>Group</code> which the server will run as.  The default setting is <code>www</code> for both.</p>
<p>For reference, on Mac OS X (Leopard), the user account information is located in the file:</p>
<p><code>/private/var/db/dslocal/nodes/Default/users/_www.plist</code></p>
<p>This file shows that the <code>_www</code> and <code>www</code> name map to the same user account.</p>
<h3>Install WordPress</h3>
<p><span style="font-weight: normal;">Now resume the steps for <a href="http://codex.wordpress.org/Installing_WordPress#Detailed_Instructions">installing WordPress</a>.  If you did not change the file permissions, you will need to edit the <code>wp-config.php</code> file yourself instead of having WordPress create it automatically.</span></p>
<h3>Follow Symbolic Links</h3>
<p>In some Apache server configurations, <code>mod_rewrite</code> requires <code>FollowSymLinks</code> to be enabled.  Otherwise you might see this error:</p>
<p><strong>403 Forbidden: You don&#8217;t have permission to access &lt;URL&gt; on this server.</strong></p>
<p>Add this line to the top of your <code>.htaccess</code> file:</p>
<p><code>Options +FollowSymlinks</code></p>
<p>All done!</p>
<h3>References</h3>
<ul>
<li><a href="http://splintor.wordpress.com/2007/03/06/httpdconf-location/">httpd.conf location « splintor&#8217;s blog</a></li>
<li><a href="http://foolswisdom.com/mac-wordpress-error-establishing-a-database-connection/">Mac, WordPress: “Error establishing a database connection” « A Fool&#8217;s Wisdom</a></li>
<li><a href="http://www.beyondmac.com/2007/10/30/php-mysql-on-leopard-mysqlsock-location/">PHP &amp; MySQL on Leopard: mysql.sock Location « beyondmac.com</a></li>
<li><a href="http://www.clagnut.com/blog/350/">Enabling .htaccess in OS X « ClagNut</a></li>
<li><a href="http://ryancannon.com/2007/11/11/soup-to-nuts-wordpress-php5-and-mysql-on-mac-os-x-leopard">Soup-to-nuts WordPress, PHP5 and MySQL on Mac OS X Leopard « The Book of Ryan</a></li>
<li><a href="http://wordpress.org/support/topic/50863">Directory and File permissions</a>. <em>WordPress Support forum.</em></li>
<li><a href="http://www.webmasterworld.com/forum11/1962.htm">When do I need Options +FollowSymLinks?</a> <em>Webmaster World forum.</em></li>
</ul>
<h3>Respond</h3>
<p>Please let me know if you find any errors or have anything to add.</p>
]]></content:encoded>
			<wfw:commentRss>http://dancingengineer.com/computing/2009/07/how-to-install-wordpress-on-mac-os-x-leopard/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to Automate FTP with a Shell Script</title>
		<link>http://dancingengineer.com/computing/2009/07/how-to-automate-ftp-with-a-shell-script</link>
		<comments>http://dancingengineer.com/computing/2009/07/how-to-automate-ftp-with-a-shell-script#comments</comments>
		<pubDate>Sun, 05 Jul 2009 05:00:57 +0000</pubDate>
		<dc:creator>dancer</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[FTP]]></category>

		<guid isPermaLink="false">http://dancingengineer.com/computing/2009/07/how-to-automate-ftp-with-a-shell-script</guid>
		<description><![CDATA[Here is an example shell script: ftp -in &#60;ftp-server&#62; &#60;&#60; EOF &#62; ~/log.txt 2&#62;&#38;1 user &#60;username&#62; &#60;password&#62; cd &#60;directory&#62; get &#60;file&#62; bye Another way to send the username and password is: ftp -in &#60;ftp-server&#62; &#60;&#60; EOF &#62; ~/log.txt 2&#62;&#38;1 quote USER &#60;username&#62; quote PASS &#60;password&#62; cd &#60;directory&#62; get &#60;file&#62; bye The ftp -i option turns [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Here is an example shell script:</p>
<p><code>ftp -in &lt;ftp-server&gt; &lt;&lt; EOF &gt; ~/log.txt 2&gt;&amp;1<br />
user &lt;username&gt; &lt;password&gt;<br />
cd &lt;directory&gt;<br />
get &lt;file&gt;<br />
bye<br />
</code><br />
Another way to send the username and password is:</p>
<p><code>ftp -in &lt;ftp-server&gt; &lt;&lt; EOF &gt; ~/log.txt 2&gt;&amp;1<br />
quote USER &lt;username&gt;<br />
quote PASS &lt;password&gt;<br />
cd &lt;directory&gt;<br />
get &lt;file&gt;<br />
bye<br />
</code><br />
The <code>ftp -i</code> option turns off interactive file prompting during multiple file transfers.  The <code>-n</code> option prevents &#8220;auto-login&#8221; upon initial connection, which could involve prompting for a username and password.</p>
<p><code>&lt;&lt; EOF</code> is a syntax called a here-document.  It uses I/O redirection to feed a list of commands to an interactive program such as ftp until reaching the specified delimiter, end-of-file in this example.  For more information, visit the <a href="http://en.wikipedia.org/wiki/Here_document">Wikipedia article</a> and the <a href="http://tldp.org/LDP/abs/html/here-docs.html">Advanced Bash Scripting Guide chapter</a> at The Linux Documentation Project.</p>
<p><code>&gt;</code> redirects <code>stdout</code> to the specified file.  The output of the program gets written to the specified file.</p>
<p>2&gt;&amp;1 redirects <code>stderr</code> to <code>stdout</code>.  In this case, both the error messages and the output of the program get written to the specified file.</p>
<p>The rest are ftp commands.  Please check the <code>man</code> pages for the ftp utility.  Here is information about the ftp requests for <code><a href="http://cr.yp.to/ftp/user.html">USER</a></code><a href="http://cr.yp.to/ftp/user.html"> and </a><code><a href="http://cr.yp.to/ftp/user.html">PASS</a></code> sent via the quote command.</p>
]]></content:encoded>
			<wfw:commentRss>http://dancingengineer.com/computing/2009/07/how-to-automate-ftp-with-a-shell-script/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

