<?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>When Brains Fly &#187; tutorial</title>
	<atom:link href="http://www.whenbrainsfly.com/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.whenbrainsfly.com</link>
	<description>An Awesome Blog About Neuroscience, Computer Science, and Technology</description>
	<lastBuildDate>Mon, 28 Jun 2010 01:03:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Remote Desktop Into Mac OS X Leopard From Windows</title>
		<link>http://www.whenbrainsfly.com/2009/01/remote-desktop-into-mac-os-x-leopard-from-windows/</link>
		<comments>http://www.whenbrainsfly.com/2009/01/remote-desktop-into-mac-os-x-leopard-from-windows/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 02:23:54 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[remote desktop]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[vnc]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.whenbrainsfly.com/?p=100</guid>
		<description><![CDATA[Using remote desktop, you can access one computer from another computer through the internet or a local area network. Here, I&#8217;ll outline how to remote desktop into Mac OS X 10.5 (Leopard) from Windows, which is something I had to do today.
On the Mac, go to System Preferences > Sharing and check &#8220;Remote Login,&#8221; if [...]]]></description>
			<content:encoded><![CDATA[<p>Using remote desktop, you can access one computer from another computer through the internet or a local area network. Here, I&#8217;ll outline how to remote desktop into Mac OS X 10.5 (Leopard) from Windows, which is something I had to do today.</p>
<p>On the Mac, go to System Preferences > Sharing and check &#8220;Remote Login,&#8221; if it is unchecked. You may get a message saying that your current power settings will not allow remote login when the Mac is sleeping. Just hit OK for that and Take note of the example ssh command given in the information area.</p>
<p>Then check &#8220;Screen Sharing,&#8221; if it is unchecked. Click the &#8220;Computer Settings&#8221; button on the right. A prompt should appear. Check &#8220;VNC Viewers may control screen with password&#8221; and type in a memorable password. Then hit OK and uncheck &#8220;Screen Sharing.&#8221; This is a security precaution. You will turn this on later when you ssh in.</p>
<p>On your PC, you will need to install PuTTY and TightVNC. You can get PuTTY here: <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">http://www.chiark.greenend.org.uk/~sgtatham/putty/</a> and TightVNC from here: <a href="http://www.tightvnc.com/download.html">http://www.tightvnc.com/download.html</a>. </p>
<p>On your PC, open up PuTTY, and in the &#8220;Host Name&#8221; field, type in the host name of the computer. This is the text after the @ symbol in the provided ssh command example noted earlier, e.g. <code>my.host.name.edu</code>. Select SSH as the connection type. </p>
<p>Then, on the left category menu, click on Tunnels, which is under Connection > SSH. For the &#8220;Source Port&#8221; box, type <code>5901</code>, and for the &#8220;Destination&#8221; box, type <code>localhost:5900</code>. Then hit the Add button. And then hit the Open button in the bottom-right.</p>
<p>A black window will appear and a prompt may appear, asking you whether you trust the host. Click yes. Then, in the black window, you will be asked for your login name &#8211; enter your Mac login name. Then it will prompt for your password &#8211; enter that too. </p>
<p>Then, enable Screen Sharing by entering the following commands into PuTTY:</p>
<pre>
cd /Library/Preferences
echo -n enabled > com.apple.ScreenSharing.launchd
</pre>
<p>Next, open up TightVNC Viewer on your PC. It will prompt you for a VNC Server. Enter <ode>localhost:1</code>. (This is possible because you are tunneling Port 5901 through SSH.) Hit "Connect." You should then be prompted for a password. Enter the VNC password that you set earlier.</p>
<p>That's it! A window should appear on your PC with the exact same display as your Mac and you should be able to control the mouse and do most things remotely.</p>
<p>Unfortunately, this method can yield severe lag between the two computers, especially if your Mac's internet connection has a slow upload speed.</p>
<p>One performance tweak you can do on the Mac is enter into a Terminal: </p>
<pre>
defaults write com.apple.ScreenSharing controlObserveQuality 3
</pre>
<p>This changes the quality of the remote display to setting 3 which is 8-bit color. The other settings are:<br />
1 = black and white<br />
2 = grey scale<br />
3 = 8 bit color<br />
4 = 16 bit color<br />
5 = full color</p>
<p>Just replace the "3" in the command with the number of the desired setting. </p>
<p>You should probably also change your mac desktop wallpaper to a solid color and/or reduce the resolution so the screen image is more easily compressed.</p>
<p>Finally, before you close the connection, you should disable Screen Sharing. In your PuTTY window, which you must keep active while you are on VNC, enter the following commands:</p>
<pre>
cd /Library/Preferences
rm com.apple.ScreenSharing.launchd
</pre>
<p><strong>Edit:</strong> Apparently, removal of this file and disabling of Screen Sharing only takes place after you restart the computer. i.e. after you remove this file, you can still vnc into the system. However, I don't know whether you can still vnc into it from a computer different from the one from which you originally vnc'd. You can restart the system immediately (closing all open files without saving changes) with:</p>
<pre>
sudo shutdown -r now
</pre>
<p>And that's it! You should now be able to remote desktop into Mac OS X Leopard securely from a Windows machine. Happy remote desktop-ing! Also, please leave a comment below if this was helpful or if you have any questions.</p>
<p>Note: If you have Cygwin installed like I do, then you can just open up a Cygwin shell window and enter:</p>
<pre>
ssh username@hostname -L 5901:localhost:5900
</pre>
<p>to ssh in with port forwarding. </p>
<p>Note 2: If you want to be able to access your Mac anytime, go to Energy Saver, which is also in System Preferences, and move the slider for Time Before Sleep to Never. You can also schedule automatic turn on/off of the Mac to save energy, e.g. have it off while you're asleep.</p>
<p>References:<br />
<a href="http://lifehacker.com/319528/remote-control-leopard-with-tightvnc">http://lifehacker.com/319528/remote-control-leopard-with-tightvnc</a><br />
<a href="http://www.macosxhints.com/article.php?story=20080318190503111">http://www.macosxhints.com/article.php?story=20080318190503111</a><br />
<a href="http://www.alternapop.com/2007/12/01/leopard-screen-sharing-image-quality/">http://www.alternapop.com/2007/12/01/leopard-screen-sharing-image-quality/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.whenbrainsfly.com/2009/01/remote-desktop-into-mac-os-x-leopard-from-windows/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Setting Up AWStats</title>
		<link>http://www.whenbrainsfly.com/2009/01/setting-up-awstats/</link>
		<comments>http://www.whenbrainsfly.com/2009/01/setting-up-awstats/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 19:50:02 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[nfsn]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.whenbrainsfly.com/?p=51</guid>
		<description><![CDATA[My webhost, NearlyFreeSpeech.NET (NFSN) made this pretty easy. 
First, I made sure that my access log was enabled. Then, I made a cgi script in /home/public called awstats.cgi which had the following contents: 

#!/bin/sh
exec nfsn-awstats

(Don&#8217;t forget the line break on the second line.)
Next, I set the file&#8217;s permissions to 755, opened up a browser to [...]]]></description>
			<content:encoded><![CDATA[<p>My webhost, NearlyFreeSpeech.NET (NFSN) made this pretty easy. </p>
<p>First, I made sure that my access log was enabled. Then, I made a cgi script in <code>/home/public</code> called <code>awstats.cgi</code> which had the following contents: </p>
<pre>
#!/bin/sh
exec nfsn-awstats
</pre>
<p>(Don&#8217;t forget the line break on the second line.)</p>
<p>Next, I set the file&#8217;s permissions to 755, opened up a browser to <code>http://www.whenbrainsfly.com/awstats.cgi</code>, and did what it told me, which was to enter into the shell:</p>
<pre>cp -r /usr/local/www/awstats/icons /home/htdocs/.nfsn-awicons</pre>
<pre><del datetime="2009-12-15T05:41:00+00:00">ln -s /usr/local/www/awstats/icons /home/htdocs/.nfsn-awicons</del>
<small># 2009-12-15: Replaced with cp because images were still broken. Thanks Barb!</small></pre>
<p>Finally, I refreshed and it was all set up!</p>
<p>I wanted to change the time zone used by AWStats, so I went to <code>http://www.whenbrainsfly.com</code> and then in the shell, I entered:</p>
<pre>tail /home/logs/access_log</pre>
<p>to see what time it says the last visit to my site was. It says I visited at 19:27 and it is now actually 14:27, so it&#8217;s 5 hours early (or is it late?).</p>
<p>In the shell, I changed the permissions of <code>/home/private/</code> to 711 to make my files there executable. Then I created a file named <code>.awstats.conf</code> there and changed its permissions to 644.</p>
<p>Within <code>.awstats.conf</code>, I put</p>
<pre>
SiteDomain="www.whenbrainsfly.com"
HostAliases="whenbrainsfly.nfshost.com www.whenbrainsfly.com"

LoadPlugin="timezone -5"
</pre>
<p>The first two lines let me combine stats from both aliases of my site into one, and the last line handles the time zone shift.</p>
<p>Then, I had to rebuild the monthly reports (of which there was only one), so I went to <code>/home/tmp/</code> deleted all files that matched <code>awstatsMMYYYY.txt</code>, and re-opened <code>http://www.whenbrainsfly.com/awstats.cgi</code> in my browser.</p>
<p>I went down to the Hours section <code>http://www.whenbrainsfly.com/awstats.cgi?framename=mainright#hours</code> and it said &#8220;Hours (GMT -5)&#8221; and the visit times so far looked correct. Hooray!</p>
<p>To double-check that my configuration settings were applied, I looked at <code>/home/tmp/nfsn-awstats.conf</code> and confirmed that what I had written in <code>.awstats.conf</code> was there. </p>
<p>So now you can find my site stats at <a href="http://www.whenbrainsfly.com/awstats.cgi">http://www.whenbrainsfly.com/awstats.cgi</a>.</p>
<p>Reference:<br />
<a href="https://members.nearlyfreespeech.net/wiki/HowTo/AWstats">https://members.nearlyfreespeech.net/wiki/HowTo/AWstats</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.whenbrainsfly.com/2009/01/setting-up-awstats/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Switch to WordPress</title>
		<link>http://www.whenbrainsfly.com/2009/01/switch-to-wordpress/</link>
		<comments>http://www.whenbrainsfly.com/2009/01/switch-to-wordpress/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 19:25:00 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.whenbrainsfly.com/?p=30</guid>
		<description><![CDATA[After using Movable Type for an hour or so and trying to customize it, I found it to be irritatingly slow. I tried installing the Open Source version, but it was not much faster. It would take around 30 seconds to publish and 20 seconds to go to a different admin page, which got really [...]]]></description>
			<content:encoded><![CDATA[<p>After using Movable Type for an hour or so and trying to customize it, I found it to be irritatingly slow. I tried installing the Open Source version, but it was not much faster. It would take around 30 seconds to publish and 20 seconds to go to a different admin page, which got really frustrating after a while, especially after installing Movable Type four times (see <a href="http://www.whenbrainsfly.com/2009/01/installing-movable-type/">previous post</a>). </p>
<p>So, I decided to switch to WordPress, one of the other two popular blogging applications (the other being Blogger). The install was very simple and very fast. For my reference and yours, here is what I did:</p>
<p>First, I created a MySQL database called wordpress. Then, I downloaded <code>latest.tar.gz</code> from the <a href="http://wordpress.org/download/">WordPress website</a> onto my web server. Next, I unzipped that file and moved all of its contents to <code>/home/public/</code>. Then, I copied the file <code>config-sample.php</code> to <code>config.php</code>, and in <code>config.php</code>, I entered my database information and put in four security keys randomly generated from <a href="http://api.wordpress.org/secret-key/1.1/">the wordpress random key generator</a>. Finally, I opened a web browser and went to <code>wp-admin/install.php</code> where I entered a name for my blog and my email address, hit continue, and then I was done! Amazing.</p>
<p>I ran into some early problems with permissions, such as uploaded images not appearing. So I changed the group of all of the files in <code>/home/public</code> to web, changed all file permissions to 644 so my web server could write to them, and changed the permissions for <code>/home/public/wp-content/</code> and <code>/home/public/wp-content/uploads</code> to 775 so that my web server could put my uploaded files in the uploads directory. I think that was it.</p>
<p>Finally, I searched for a brainy WordPress theme and first found <a href="http://www.harrr.org/rrr/bigbluebrain-theme/">Big Blue Brain Theme</a> but later found <a href="http://wordpress.org/extend/themes/brain-power#post-534">Brain Power Theme</a>, which is an awesome theme. I tweaked it in many places to make spacing, color, and other little things nicer to me, and this modified theme is what is currently styling this site. I hope you like it too!</p>
<p>WordPress is not lightning fast, but not agonizingly slow either, so I think I&#8217;ll stick with it. Plus, this theme rocks!</p>
<p>Reference:<br />
<a href="http://codex.wordpress.org/Installing_WordPress">http://codex.wordpress.org/Installing_WordPress</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.whenbrainsfly.com/2009/01/switch-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Movable Type</title>
		<link>http://www.whenbrainsfly.com/2009/01/installing-movable-type/</link>
		<comments>http://www.whenbrainsfly.com/2009/01/installing-movable-type/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 03:55:36 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[movable type]]></category>
		<category><![CDATA[nfsn]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.whenbrainsfly.com/?p=22</guid>
		<description><![CDATA[Installing Movable Type is pretty simple. Unfortunately, I still messed it up, multiple times. So, for my reference and for yours, here are the steps to installing Movable Type on my web server.
This site is hosted on NearlyFreeSpeech.NET (NFSN), which is an awesome, pay-for-what-you-use hoster. It already has the right PHP and Perl things installed [...]]]></description>
			<content:encoded><![CDATA[<p>Installing Movable Type is pretty simple. Unfortunately, I still messed it up, multiple times. So, for my reference and for yours, here are the steps to installing Movable Type on my web server.</p>
<p>This site is hosted on <a href="http://nearlyfreespeech.net/">NearlyFreeSpeech.NET</a> (NFSN), which is an awesome, pay-for-what-you-use hoster. It already has the right PHP and Perl things installed for Movable Type. Since I recently made this site, I had no MySQL databases yet, so first, I created a MySQL process via the NFSN admin pages and then made a database named &#8220;movabletype.&#8221;</p>
<p>Next, I downloaded the file <code>MT-4.23-en.tar.gz</code> onto my computer from the <a href="http://www.movabletype.com/download/">Movable Type Download Page</a> under Movable Type Pro for Bloggers. (Note: the version offered at <a href="http://movabletype.org/">their .org website</a> offers their open source version for developers, which is different.) </p>
<p>Then, since unzipping the file and copying its contents to the web server was taking too long, I aborted that and scp&#8217;d <code>MT-4.23-en.tar.gz</code> from my computer to my root web directory of my web server, <code>/home/public/</code>. (Note: I am running Windows with Cygwin installed.) I then ssh&#8217;d into the web server and unzipped the file there. </p>
<p>I then made the directory mt in <code>/home/public</code>, and based on some suggestion from somewhere, I moved mt-static out of <code>/home/public/MT-4.23-en</code> (which was just created) to <code>/home/public/</code> and copied all of the other contents of <code>MT-4.23-en/</code> into <code>mt/</code>. </p>
<p>Next, I changed the group of mt to web, changed permissions of <code>mt-static/support</code> to 777, and removed the empty directory <code>MT-4.23-en</code>.</p>
<p>Then, I opened <code>http://www.whenbrainsfly.com/mt/mt.cgi</code> in my browser and began the installation wizard. I entered <code>/mt-static</code> as the static web path and hit continue. My web server&#8217;s PHP and Perl requirements checked out so I hit continue. At the Database Configuration prompt, I changed the database server from <code>localhost</code> to <code>my_mysql_process_name.db</code> because NFSN requires it, entered the other database info, and hit continue. At the next prompt, the Mail Configuration prompt, I selected sendmail, put in the path to it, <code>/usr/bin/sendmail/</code>, sent a test email, received the test email, and hit continue. The configuration file was successfully created so I hit continue there, and the configuration was finished!</p>
<p>Finally, I created an account, named my website, <code>chgrp web /home/public</code> so that my web server could write to it, told the prompt that I wanted my site at <code>/home/public</code>, selected the Professional Website theme, hit continue, and it was all done!</p>
<p>I then signed in and made my first post! =)</p>
<p>Sadly, this took me four times to get right.</p>
<p>The first time, I made the directory <code>/home/public/blog</code> and told Movable Type that I wanted my site there, not realizing that Movable Type is also a full-fledged Content Management System and that it would create a subdirectory called blog within <code>/home/public/blog</code> where my blog would lie.</p>
<p>The second time, I forgot to drop the movabletype MySQL database.</p>
<p>The third time, I got an error saying that my web server could not write to <code>/home/public/</code> which was true at the time. So, I chgrp&#8217;d it and continued, but the style changed to something other than Professional Website. I&#8217;m pretty sure I had changed it, so maybe this is a bug in Movable Type. I tried changing the style afterward but after selecting the Professional Blue style and publishing, the site was obviously missing elements and not how it was supposed to look. </p>
<p>The fourth time, I thought I had failed yet again because after the last step, I went to <code>http://www.whenbrainsfly.com</code> and got a 404. I thought that maybe if I wrote a post, it would appear, and sure enough, it did after saving my first entry.</p>
<p>References:<br />
<a href="http://www.movabletype.org/documentation/installation/quick-start.html">http://www.movabletype.org/documentation/installation/quick-start.html</a><br />
<a href="http://www.movabletype.org/documentation/installation/detailed-instructions.html">http://www.movabletype.org/documentation/installation/detailed-instructions.html</a><br />
<a href="http://www.superxm.com/2007/08/movable-type-4-installation-step-by-step-with-screenshots.html">http://www.superxm.com/2007/08/movable-type-4-installation-step-by-step-with-screenshots.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.whenbrainsfly.com/2009/01/installing-movable-type/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
