<?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>Blinded By Tech &#187; How To</title>
	<atom:link href="http://www.blindedbytech.com/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blindedbytech.com</link>
	<description>Random notes from the tech world.</description>
	<lastBuildDate>Wed, 09 Dec 2009 15:47:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Firefox, Emacs, and Mac OS X</title>
		<link>http://www.blindedbytech.com/2009/12/09/firefox-emacs-and-mac-os-x/</link>
		<comments>http://www.blindedbytech.com/2009/12/09/firefox-emacs-and-mac-os-x/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 15:47:12 +0000</pubDate>
		<dc:creator>Techie</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.blindedbytech.com/?p=105</guid>
		<description><![CDATA[On Linux and Windows, I use an extension called It&#8217;s All
Text to add an &#8220;edit&#8221; button to text areas. Hitting this will
launch the contents of the text area in my editor of choice &#8212; emacs.
(You can pick any editor you like.)
However, on Mac, it&#8217;s not really straightforward, due to the way they
handle applications. The comments [...]]]></description>
			<content:encoded><![CDATA[<p>On Linux and Windows, I use an extension called <a href="https://addons.mozilla.org/en-US/firefox/addon/4125">It&#8217;s All<br />
Text</a> to add an &#8220;edit&#8221; button to text areas. Hitting this will<br />
launch the contents of the text area in my editor of choice &#8212; emacs.<br />
(You can pick any editor you like.)</p>
<p>However, on Mac, it&#8217;s not really straightforward, due to the way they<br />
handle applications. The comments in <a href="http://www.oreillynet.com/mac/blog/2007/02/firefox_plugin_its_all_text.html">this<br />
post</a> pointed me in the right direction for how to set this up.</p>
<ul>
<li>Install <a href="http://www.mozilla.com/">Firefox</a>.
  </li>
<li>Install <a href="http://aquamacs.org/">Aquamacs</a>.
  </li>
<li>Install <a href="https://addons.mozilla.org/en-US/firefox/addon/4125">It&#8217;s All Text Firefox Extension</a>.
  </li>
<li>In Firefox, go to Tools -&gt; It&#8217;s All Text &gt; Preferences, and set Editor to <code>/Applications/Aquamacs Emacs.app/Contents/MacOS/Aquamacs Emacs</code>
</li>
</ul>
<p>The default proportional font in aquamacs bugs me, so I fix that by<br />
launching it with a textarea and going to Options -&gt; Appearance<br />
-&gt; Font For Text-Mode and setting it to Andale Mono. I also turn<br />
off Soft Word Wrap and Auto Word Wrap In Text Modes under options,<br />
because I&#8217;m used to emacs&#8217;s old unfriendly behavior.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blindedbytech.com/2009/12/09/firefox-emacs-and-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian: using apt to install a specific version</title>
		<link>http://www.blindedbytech.com/2008/05/21/debian-using-apt-to-install-a-specific-version/</link>
		<comments>http://www.blindedbytech.com/2008/05/21/debian-using-apt-to-install-a-specific-version/#comments</comments>
		<pubDate>Wed, 21 May 2008 20:52:38 +0000</pubDate>
		<dc:creator>Techie</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://www.blindedbytech.com/?p=61</guid>
		<description><![CDATA[If you&#8217;re like me, you may need to build your own packages in Debian, or perhaps have downloaded different versions of packages to install on your system.  Sometimes you&#8217;d like to go the other way, though, and install an older version of a package you found in the repository, or even the same version, [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me, you may need to build your own packages in Debian, or perhaps have downloaded different versions of packages to install on your system.  Sometimes you&#8217;d like to go the other way, though, and install an <em>older</em> version of a package you found in the repository, or even the same version, but a different build.</p>
<p>For example, let&#8217;s say you built your own version of perl, say 5.8.8-7blindedbytech1.  Then, Debian finally gets the same version of perl into their repositories, say 5.8.8-7etch3.  Unfortunately, doing an <code>apt-get dist-upgrade</code> isn&#8217;t going to install this version.  This is particularly annoying if other packages have dependencies on these perl versions.</p>
<p>What&#8217;s one to do? Wouldn&#8217;t it be nice if you could specify which version of perl package to install?  As it turns out, you can.  When you do the <code>apt-get install</code> of the package, follow it by an equal sign (=) and the particular package version you want, e.g:</p>
<p><code>sudo apt-get install perl=5.8.8-7etch3</code></p>
<p>Obviously, this will only work if the specific version is in one of your repositories.  You can do this with multiple packages, too.  In fact, I had to, because perl-base was also a different version:</p>
<p><code>sudo apt-get install perl=5.8.8-7etch3 perl-base=5.8.8-7etch3</code></p>
<p><strong>Be careful of dependencies.</strong>  Don&#8217;t just blindly run these commands unless you know what you&#8217;re doing, and be sure to read the output messages, as it may have unintended effects.  For instance, for me, the above command uninstalled mysql-server.  <strong>Make sure you read the warnings it gives you, and you understand what they mean.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blindedbytech.com/2008/05/21/debian-using-apt-to-install-a-specific-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gutsy Gibbon + Radeon Mobility X1400</title>
		<link>http://www.blindedbytech.com/2007/10/20/gutsy-gibbon-radeon-mobility-x1400/</link>
		<comments>http://www.blindedbytech.com/2007/10/20/gutsy-gibbon-radeon-mobility-x1400/#comments</comments>
		<pubDate>Sat, 20 Oct 2007 21:35:42 +0000</pubDate>
		<dc:creator>Techie</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.blindedbytech.com/2007/10/20/gutsy-gibbon-radeon-mobility-x1400/</guid>
		<description><![CDATA[Compiz Fusion on a Radeon Mobility X1400 graphics card?  Hell yeah!
Oh, driver hell.  Proprietary drivers are the bane of Linux&#8217;s existence, as any Linux user with a current ATI graphics card can tell you.  I have a Lenovo Z61m on which I&#8217;d like to install Ubuntu Gutsy Gibbon, but good luck &#8212; [...]]]></description>
			<content:encoded><![CDATA[<p>Compiz Fusion on a Radeon Mobility X1400 graphics card?  <strong>Hell yeah!</strong></p>
<p>Oh, driver hell.  Proprietary drivers are the bane of Linux&#8217;s existence, as any Linux user with a current ATI graphics card can tell you.  I have a Lenovo Z61m on which I&#8217;d like to install Ubuntu Gutsy Gibbon, but good luck &#8212; the ATI Radeon Mobility X1400 will wreak havoc on your installation procedure.  This is not new; Feisty Fawn had the same problem.  Fortunately, you can in fact work around it.</p>
<p><strong>Installing From the Live CD</strong></p>
<p>First, there&#8217;s getting the live CD to work.  You can download the alternate install CD and work from text mode, but I&#8217;d much rather use the regular live CD.  Fortunately, you can!  Boot up the live CD, and it&#8217;ll eventually die at some point, because the X server can&#8217;t launch properly.  Hit Cntrl + Alt + F2 to jump to a virtual console.  Type <code>clear</code> to clear the screen, then type the following:</p>
<pre>
sudo apt-get update
sudo apt-get install xorg-driver-fglrx
sudo depmod -a
sudo aticonfig --initial
sudo aticonfig --overlay-type=Xv
startx
</pre>
<p>You&#8217;ll obviously need a working Internet connection to make this work.  Congratulations, you can now use the live CD!  Run the installer as per normal.</p>
<p><strong>Special note for Lenovo users:</strong>  Do not delete the FAT32 service partition!  You can use this to restore your Windows partition or run other diagnostics.  I found it worked well to resize the existing Windows partition and dual boot.</p>
<p>After installation, you&#8217;ll reboot your system and &#8212; surprise!  It doesn&#8217;t work.  It&#8217;ll die at loading the X server again.  Hit <code>Cntrl + Alt + F2</code>, and enter the following:</p>
<pre>
</pre>
<pre>
sudo apt-get update
sudo apt-get install xorg-driver-fglrx
sudo apt-get install xgl
sudo apt-get install xserver-xorg-video-radeonhd
sudo depmod -a
sudo aticonfig --initial
sudo aticonfig --overlay-type=Xv
startx
</pre>
<p>This is slightly different than before.  Why?  Well, no doubt you want to use those fancy Compiz Fusion effects, right?  You didn&#8217;t need them to do the installation, but installation is done now.  You&#8217;ll need to get the right drivers, as well as install xgl.  Once you&#8217;ve done that, you might also need to edit <code>/etc/X11/xorg.conf</code> to change <code>Option "Composite" "0"</code> to <code>Option "Composite" "1"</code>.  After that, you should be able to enable Visual Effects through System->Preferences->Appearance, Visual Effects tab.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blindedbytech.com/2007/10/20/gutsy-gibbon-radeon-mobility-x1400/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lenovo X41 Recovery CDs not booting?  Check the partitions</title>
		<link>http://www.blindedbytech.com/2007/07/11/lenovo-x41-recovery-cds-not-booting-check-the-partitions/</link>
		<comments>http://www.blindedbytech.com/2007/07/11/lenovo-x41-recovery-cds-not-booting-check-the-partitions/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 21:06:23 +0000</pubDate>
		<dc:creator>Techie</dc:creator>
				<category><![CDATA[Error Messages]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.blindedbytech.com/2007/07/11/lenovo-x41-recovery-cds-not-booting-check-the-partitions/</guid>
		<description><![CDATA[I have a Lenovo X41 Tablet PC that I had installed Ubuntu onto.  I recently decided to re-install the original Windows software, so I ordered the CDs from Lenovo and broke out an external CD drive.  However, when I put in the Rescue and Recovery CD and booted the machine, I ended up [...]]]></description>
			<content:encoded><![CDATA[<p>I have a Lenovo X41 Tablet PC that I had installed Ubuntu onto.  I recently decided to re-install the original Windows software, so I ordered the CDs from Lenovo and broke out an external CD drive.  However, when I put in the Rescue and Recovery CD and booted the machine, I ended up with a blank black screen and nothing else.  What gives?  I updated the BIOS and the embedded controller firmwares, but to no avail.  The computer would boot up the CD, a brief message about examining the setup would fly by, then a blank screen.  I figured this was a problem with the recovery CDs, because my Ubuntu live CD booted right up.</p>
<p>As it turns out, Lenovo recovery CDs are very picky about their hard drive setup.  They need to copy files to disk for a variety of tasks, so if you&#8217;re using up all the partitions, then the CDs will stop booting, but give you no other errors.</p>
<p>I had previously installed Linux on the machine, so my partition tables were in a state the machine didn&#8217;t really understand.  What I needed to do was trash the existing partitions, and flush out the boot record.</p>
<p>Easy enough &#8212; I fired up the Ubuntu live CD, and launched the partition editor in System -> Administration.  I had to turn off the swap space, by right-clicking on it in the partition editor, and selecting &#8220;swapoff&#8221;.  By default, Ubuntu live CDs will scan your drives for partitions marked as swap space, and use it, so you have to turn off this usage to delete the partitions.  I ran through and deleted all the partitions, and applied the changes.</p>
<p>I next had to <a href="http://www.blindedbytech.com/2007/07/10/clearing-out-the-master-boot-record-with-linux/">clear out the master boot record</a>, but I could do that right from the live CD.  After doing that, I rebooted with the Lenovo Rescue and Recovery CD and said a little prayer.</p>
<p>Once I had done these steps, the recovery CD started right up.  I&#8217;m surprised Lenovo doesn&#8217;t give more details on this in their support knowledge base.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blindedbytech.com/2007/07/11/lenovo-x41-recovery-cds-not-booting-check-the-partitions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Clearing out the master boot record with Linux</title>
		<link>http://www.blindedbytech.com/2007/07/10/clearing-out-the-master-boot-record-with-linux/</link>
		<comments>http://www.blindedbytech.com/2007/07/10/clearing-out-the-master-boot-record-with-linux/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 02:35:01 +0000</pubDate>
		<dc:creator>Techie</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.blindedbytech.com/2007/07/10/clearing-out-the-master-boot-record-with-linux/</guid>
		<description><![CDATA[In the old days, a techie might install Windows on a computer, then install Linux.  Later, the techie might decide to trash the Linux partitions for some reason, but on reboot &#8212; oops!  LILO was still there.  These days, GRUB has taken the place of LILO, but the old problem is still [...]]]></description>
			<content:encoded><![CDATA[<p>In the old days, a techie might install Windows on a computer, then install Linux.  Later, the techie might decide to trash the Linux partitions for some reason, but on reboot &#8212; oops!  LILO was still there.  These days, GRUB has taken the place of LILO, but the old problem is still there: how do you clear out the master boot record completely?</p>
<p>If you had a Windows 98 boot disk lying around, you probably remember the old magic of <code>fdisk /mbr</code>.  This simple command did just what you wanted &#8212; flashed out the master boot record, and things worked like you expected.</p>
<p>However, in this day and age of Linux live CDs, there must be a way to do so without breaking out the floppies.  As it turns out, there is, through a simple program known as <code>dd</code>.</p>
<p>The beginning of a hard drive is where you keep both the master boot record, as well as the partition table.  What you want to do is write zeroes to the master boot record, but <em>not</em> the partition table.  <strong>Many folks recommend writing zeroes to the first 512 bytes of the drive &#8212; this is wrong.</strong></p>
<p>The truth is, the first 446 bytes of the drive are dedicated to the master boot record executable.  The remaining 66 bytes are used to hold the partition table.  Hence, what we need to do is read in a source of zeroes, and output it to the first 446 bytes of the drive.  Simple!  Let&#8217;s take a look at the command:</p>
<pre>
dd if=/dev/zero of=/dev/hda bs=446 count=1
</pre>
<p>This says to do just that &#8212; use as an input file the special device <code>/dev/zero</code>, an output file of the drive (substitute the drive identifier in question here!), with a block size of 446 bytes.  Oh, and do it just once.  No nonsense, quick, and effective.  So, put away those MS DOS disks &#8212; that Linux live CD works just fine.</p>
<ul>
<li>Reference: <a href="http://www.linuxquestions.org/questions/showthread.php?t=300256">LinuxQuestions.org:  Using Linux&#8217;s fdisk to erase or fix a MBR?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.blindedbytech.com/2007/07/10/clearing-out-the-master-boot-record-with-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Customizing Emacs</title>
		<link>http://www.blindedbytech.com/2007/06/11/customizing-emacs/</link>
		<comments>http://www.blindedbytech.com/2007/06/11/customizing-emacs/#comments</comments>
		<pubDate>Mon, 11 Jun 2007 16:24:14 +0000</pubDate>
		<dc:creator>Techie</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.blindedbytech.com/2007/06/11/customizing-emacs/</guid>
		<description><![CDATA[What&#8217;s your favorite editor?  Oh, I&#8217;m sorry, the correct answer should be emacs.  Actually, you should use whatever editor you feel most comfortable with; I&#8217;ve just found the ability to record keyboard macros in emacs to be indispensable, all the more so since I&#8217;ve been using it for almost ten years.  Be [...]]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s your favorite editor?  Oh, I&#8217;m sorry, the correct answer should be emacs.  Actually, you should use whatever editor you feel most comfortable with; I&#8217;ve just found the ability to record keyboard macros in emacs to be indispensable, all the more so since I&#8217;ve been using it for almost ten years.  Be I writing on Linux, Windows, or Mac OS X, my preferred text editor is still emacs.</p>
<p>However, once I get on a new machine, I need to customize .emacs, which is the startup configuration file.  There are a series of changes that I find quite useful, and often find myself looking up again and again.  Without further ado, here are the customizations:</p>
<pre>
;; Emacs usually has a slash screen on startup.  Let's get rid of that and start with a blank buffer.
(setq inhibit-startup-message t)

;; I like to see what is selected in the buffer.  This turns on visual feedback on selections.
(setq transient-mark-mode t)

;; Activate font-lock mode (syntax coloring).
(global-font-lock-mode t)

;; Line numbers are good.  Getting column numbering as well is better.
(column-number-mode t)

;; Scrollbars go on the right.  Who puts these on the left?
(set-scroll-bar-mode 'right)

;; Enable mouse wheel scrolling.
(if (load "mwheel" t)
    (mwheel-install))

;; Always end files in anewline.
(setq require-final-newline 't)
;; ...or ask to end in newline if needed
; (setq require-final-newline 'query)

;; Match parentheses.  Useful to be sure you've closed everything up.
(show-paren-mode t)

; Display settings
; default size and color options for all frames.
(setq default-frame-alist
 '(
; frame width and height
    (width             . 80)
    (height            . 40)
  ;;;; foreground, background, and cursor colors
  ;;;    (foreground-color  . "grey8")
  ;;;    (background-color  . "grey92")
  ;;;    (cursor-color      . "red3")
  )
)
; places top left corner of initial frame at location (25,25) on screen
(setq initial-frame-alist
 '(
    (top               . 25)
    (left              . 25)
  )
)

; Temporary files cluttering up the space are annoying.  Here's how we
; can deal with them -- create a directory in your home directory, and
; save to there instead!  No more random ~ files.
(defvar user-temporary-file-directory
  "~/.emacs-autosaves/")
(make-directory user-temporary-file-directory t)
(setq backup-by-copying t)
(setq backup-directory-alist
      `(("." . ,user-temporary-file-directory)
        (tramp-file-name-regexp nil)))
(setq auto-save-list-file-prefix
      (concat user-temporary-file-directory ".auto-saves-"))
(setq auto-save-file-name-transforms
      `((".*" ,user-temporary-file-directory t)))
</pre>
<p>I additionally have some macros that aren&#8217;t generally useful.  There&#8217;s a million things to tweak in the customization, and if you&#8217;re fancy, you can even write your own hacks &#8212; better brush up on that lisp!  Here are a few more resources of interest:</p>
<ul>
<li><a href="http://www.dotfiles.com/index.php?app_id=6">dotfiles.com &#8212; emacs</a></li>
<li><a href="http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/Emacs-Initialization.html">gnu.org &#8212; Emacs Initialization</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.blindedbytech.com/2007/06/11/customizing-emacs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To: Mount your ssh connection as a local folder on Fedora Core 6</title>
		<link>http://www.blindedbytech.com/2007/02/09/how-to-mount-your-ssh-connection-as-a-local-folder-on-fedora-core-6/</link>
		<comments>http://www.blindedbytech.com/2007/02/09/how-to-mount-your-ssh-connection-as-a-local-folder-on-fedora-core-6/#comments</comments>
		<pubDate>Fri, 09 Feb 2007 19:33:09 +0000</pubDate>
		<dc:creator>Techie</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.blindedbytech.com/2007/02/09/how-to-mount-your-ssh-connection-as-a-local-folder-on-fedora-core-6/</guid>
		<description><![CDATA[Do you have an ssh login to a server?  How would you like to access that on your Linux desktop as if it were local?  As it turns out, this isn&#8217;t hard to do, thanks to the power of FUSE (Filesystem in Userspace).  Here&#8217;s the quick and dirty way to set this [...]]]></description>
			<content:encoded><![CDATA[<p>Do you have an ssh login to a server?  How would you like to access that on your Linux desktop as if it were local?  As it turns out, this isn&#8217;t hard to do, thanks to the power of <a href="http://fuse.sourceforge.net/">FUSE</a> (Filesystem in Userspace).  Here&#8217;s the quick and dirty way to set this up on Fedora Core 6.</p>
<p><strong>Install FUSE</strong></p>
<p>First, you need FUSE, as well as the sshfs module.  To do so, open up a command prompt, and do the following:</p>
<pre>
su -
yum install fuse
yum install fuse-sshfs
usermod -G fuse youraccount
</pre>
<p>Replace <code>youraccount</code> in the above with your user account.  The last line adds you to the group <code>fuse</code>, although if you are in other groups, it&#8217;ll <em>remove</em> you from them.  You&#8217;d want to specify all additional groups you&#8217;d want to be in, e.g. <code>usermod -G fuse group1 group2 youraccount</code>.  If you&#8217;re logged in under your account, then you should log out and back in, so the group change takes effect.</p>
<p><strong>Mount a Folder</strong></p>
<p>Let&#8217;s say you want to create a mount point on your desktop so you can browse it.  Do the following:</p>
<pre>
cd ~/Desktop
mkdir remote_folder
sshfs yourserver.someplace.not:/home/yourusername remote_folder
</pre>
<p>Replace <code>yourserver.someplace.not</code> with the ssh server you want to mount.  Replace <code>/home/yourusername</code> with the remote folder you want to mount.  If your local username differs from your remote username, you&#8217;ll have to specify it, e.g. <code>sshfs remoteusername@yourserver.someplace.not:/home/yourremoteusername remote_folder</code></p>
<p>Once you do this, it should be all set &#8212; you can browse it from the desktop, and browse it from the command line, as if it were local.</p>
<p><strong>Unmount a Folder</strong></p>
<p>Unmounting is pretty simple; use <code>fusermount -u mountpoint</code>.  For instance, in the above, you mounted an ssh share to <code>~/Desktop/remote_folder</code>.  To unmount this, just issue:</p>
<pre>
fusermount -u ~/Desktop/remote_folder
</pre>
<p>That&#8217;s all there is to it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blindedbytech.com/2007/02/09/how-to-mount-your-ssh-connection-as-a-local-folder-on-fedora-core-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Install Fedora Core 6 On Intel DG965SS Motherboard</title>
		<link>http://www.blindedbytech.com/2006/11/10/how-to-install-fedora-core-6-on-intel-dg965ss-motherboard/</link>
		<comments>http://www.blindedbytech.com/2006/11/10/how-to-install-fedora-core-6-on-intel-dg965ss-motherboard/#comments</comments>
		<pubDate>Sat, 11 Nov 2006 00:22:56 +0000</pubDate>
		<dc:creator>Techie</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.blindedbytech.com/2006/11/10/how-to-install-fedora-core-6-on-intel-dg965ss-motherboard/</guid>
		<description><![CDATA[I decided to take the plunge and start playing around with dual core technology, so I went down to the local store and picked up a new CPU, RAM, and motherboard.  However, what I discovered was that it can actually be quite difficult actually installing Linux to what I had purchased, due to the [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to take the plunge and start playing around with dual core technology, so I went down to the local store and picked up a new CPU, RAM, and motherboard.  However, what I discovered was that it can actually be quite difficult actually <em>installing</em> Linux to what I had purchased, due to the newness of the technology.  While support for dual core CPUs has been around for a while, support for some of the more recent motherboards has not, and mine was one of them.  So, I could wait for broader support in a few months, or see what I could do now.</p>
<p>First, the reference information &#8212; the hardware I used.</p>
<p>* Intel Core 2 Duo Processor E6600<br />
* Intel Classic Series Desktop Board DG965SS<br />
* Kingston KVR533D2N4K2/1G (2x 512 MB)<br />
* Western Digital 74 GB SATA Raptor WD740ADFD<br />
* Antec TruePower 2.0 TPII-430<br />
* JVC XJ-HD166S ATAPI DVD-ROM</p>
<p><b>Live isn&#8217;t so live, after all.</b></p>
<p>My plan was to battle-test this system with a few different Linux distributions, and then transition to testing Windows, but alas &#8212; my plans were not to be.  I couldn&#8217;t even successfully boot up the live CDs I had!  I&#8217;ve reproduced the error messages below, for the people searching for an answer.</p>
<p>If I tried to boot up Knoppix 5.0 DVD (2006-06-01-EN), I would get this error:</p>
<blockquote>
<pre>
Can't find KNOPPIX filesystem, sorry.
Dropping you to a (very limited) shell.
Press the reset button to quit.
</pre>
</blockquote>
<p>If I tried to boot the Ubuntu 6.10 &#8220;Edgy Eft&#8221; live CD, I would get this error:</p>
<blockquote>
<pre>
BusyBox v1.1.3 (Debian 1.1.1.3-2ubuntu3) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
</pre>
</blockquote>
<p>If I tried to boot the CentOS 4.4 live CD, I wouldn&#8217;t even get an error message &#8212; it would just reboot when I tried to select an option.</p>
<p>The interesting thing about the above is that the file system for live CDs largely lives on the CD itself.  Hence, if it couldn&#8217;t read it as in the above, then for some reason, the DVD drive wasn&#8217;t accessible.  After doing a little research online, I discovered that the motherboard was relatively new, and did some rather funky things with the handling of the IDE devices.  Hence, the computer would start to boot off the optical drive, but when it came time to load up a kernel and actually boot the system, the computer no longer knew how to access the drive!  This all resulted from a lack of Linux support for the new motherboard architecture from Intel.  Haven&#8217;t Linux developers built that time machine yet to get future architectures into old kernels?  (Note that Windows would have similar problems; if I didn&#8217;t have an up to date Windows install CD or the driver disk, I would be out of luck.)</p>
<p><b>New hardware?  Please stand by, support will be added momentarily&#8230;</b></p>
<p>Linux developers have a reasonably quick turnaround time on these things, and have, in fact, added support to the kernel.  Unfortunately, they added it to the most recent kernel &#8212; 2.6.18.  In CentOS 4.4 (as well as Red Hat Enterprise 4.4), this is 2.6.9-39.  In Knoppix 5.0 is 2.6.17.  In Ubuntu Edgy Eft, it&#8217;s 2.6.17.  I would need to wait for the next release before getting support for the 965 chipset.  Fortunately for me, Fedora Core 6 was released with the 2.6.18 kernel, meaning that I could use that instead.  Being that I didn&#8217;t really feel like re-authoring my own custom live CD, I went with that, and will just have to wait for future releases on the others.</p>
<p><b>The devil is in the details.</b></p>
<p>I downloaded Fedora Core 6 for x86_64.  I&#8217;m fairly certain that the i386 version would install in much the same manner, but decided that I might as well use the 64-bit version.  I put in the DVD and booted up the computer.</p>
<p>However, it brought up a text-mode window to select language, keyboard, and installation method: something had gone wrong, because in a normal install, the full graphical environment would have been displayed.  Upon selecting an installation method of &#8220;Local CDROM&#8221;, the installer reported the error &#8220;No driver found&#8221;  &#8212; looks like I had some work to do.</p>
<p>First, I rebooted and struck F2 to get into the BIOS.  Under the &#8220;Advanced&#8221; tab, &#8220;Drive Configuration&#8221;, I set &#8220;Configure SATA as&#8221; to &#8220;AHCI&#8221;.  I then exited, saving changes.</p>
<p>Next, I rebooted with the the install DVD in the drive.  When the message came up &#8220;To install or upgrade in graphical mode, press the &lt;enter&gt; key.&#8221;, I didn&#8217;t just hit enter &#8212; instead, I typed the following line:</p>
<blockquote>
<pre>
linux all-generic-ide pci=nommconf
</pre>
</blockquote>
<p>This is the magic trick.  After skipping the media check, the full graphical environment came up at that point, and I could install as per normal.  I did so, and the computer rebooted after installation.</p>
<p><b>So close, I can taste it!</b></p>
<p>The computer boots up, and the Internet connection was recognized straight away.  The resolution was set to 800&#215;600, so I went to System-&gt;Administration-&gt;Display, and clicked on the Hardware tab.  I changed the monitor to &#8220;Generic CRT Display/Monitor 1280&#215;1024&#8243;, and then I could set the resolution to (naturally) 1280&#215;1024.  System updates worked fine, and programs launched correctly.  I could surf the web without issue (except for flash support, which is a whole other problem I won&#8217;t address here).</p>
<p>However, there was something wrong&#8230;the optical drive no longer worked!  I could put in a CD or DVD, and they wouldn&#8217;t be recognized by the operating system, despite having worked fine for the install process.  The problem here is in GRUB, the Linux bootloader.  While the install had correctly added <code>pci=nommconf</code> to the loader, it had neglected to include the <code>all-generic-ide</code> tag.</p>
<p>I edited <code>/etc/grub.conf</code> as root, and changed the line&#8230;</p>
<blockquote>
<pre>
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 pci=nommconf rhgb quiet
</pre>
</blockquote>
<p>&#8230;to&#8230;</p>
<blockquote>
<pre>
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 <strong>all-generic-ide</strong> pci=nommconf rhgb quiet
</pre>
</blockquote>
<p>I needed to re-install GRUB, with <code>grub-install /dev/sda1</code>.  A reboot later, and things worked fine.</p>
<p><b>Success!</b></p>
<p>So yes, Virginia, it is possible to install Linux on this wonky motherboard.  What&#8217;s more, since the support is in the kernel (and far better people than myself are slavishly hacking away at it), it&#8217;s quite likely that distributions will support this out of the box in the future without special handling.  I haven&#8217;t had any issues with this set up yet, and it runs in 64-bit mode to boot.</p>
<p><b>Some closing thoughts&#8230;</b></p>
<p>* The problems I experienced were largely a result of the IDE channel handling of the chipset.  If I had an SATA optical drive, I could probably have gotten up and running on Fedora Core 6 without any extra futzing.  This also may have gotten Ubuntu to install as well.<br />
* This also means that if you have, say, ATA drives (not SATA), you may experience a whole host of other problems.<br />
* Ubuntu &#8220;Edgy Eft&#8221; should have some backports built into it to handle the Intel 965 chipset, however, I couldn&#8217;t get them to work.  It&#8217;s <em>feasible</em> that this CD could boot on an ATAPI optical drive, if given the right options.<br />
* While these problems will <em>probably</em> go away in new releases, it&#8217;s not guaranteed.  The chipset will at least be better supported.<br />
* I&#8217;m not looking forward to the Windows installation.  The chipset claims that I should be fine with Windows XP SP2 or Windows Media Center Edition.  Only time will tell.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blindedbytech.com/2006/11/10/how-to-install-fedora-core-6-on-intel-dg965ss-motherboard/feed/</wfw:commentRss>
		<slash:comments>65</slash:comments>
		</item>
		<item>
		<title>What to do if iPod not recognized by iTunes</title>
		<link>http://www.blindedbytech.com/2006/09/14/what-to-do-if-ipod-not-recognized-by-itunes/</link>
		<comments>http://www.blindedbytech.com/2006/09/14/what-to-do-if-ipod-not-recognized-by-itunes/#comments</comments>
		<pubDate>Thu, 14 Sep 2006 15:11:51 +0000</pubDate>
		<dc:creator>Techie</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.blindedbytech.com/2006/09/14/what-to-do-if-ipod-not-recognized-by-itunes/</guid>
		<description><![CDATA[With the recent release of iTunes 7, lots of folks are upgrading and finding that their iPods are no longer recognized.  This is actually a common problem, and not isolated to iTunes 7.  Sometimes it just happens, even without upgrade.  I found my iPod nano was no longer being recognized by iTunes [...]]]></description>
			<content:encoded><![CDATA[<p><img id="image29" src="http://www.blindedbytech.com/wp-content/uploads/2006/09/listen.jpg" align="right" hspace="5" vspace="5" alt="listen.jpg" />With the recent release of iTunes 7, lots of folks are upgrading and finding that their iPods are no longer recognized.  This is actually a common problem, and not isolated to iTunes 7.  Sometimes it just happens, even without upgrade.  I found my iPod nano was no longer being recognized by iTunes after upgrade, but fortunately, the fix is pretty simple.</p>
<p>First, some details.  After upgrading, I plugged in my iPod nano, and heard it detect the hardware.  However, it never showed up in iTunes.  I opened up My Computer, and found that the drive was being recognized, so Windows was acknowledging its presence.  iTunes just no longer was recognizing its existence.  I unplugged it and re-plugged it in, but it just wouldn&#8217;t pick up.</p>
<p>Apple recommends <a href="http://www.apple.com/support/ipod/five_rs/">the five Rs</a> when you&#8217;re having troubles: <strong>reset</strong> your iPod settings, <strong>retry</strong> on a different port, <strong>restart</strong> your computer (after updating software), <strong>re-install</strong> your iTunes software, and <strong>restore</strong> your iPod (erasing all data on it).  Trying each of these steps (one at a time, not all of them) will solve most problems with iPods.</p>
<p>In my case, I first reset my iPod settings by scrolling to Settings-&gt;Reset All Settings (on the iPod itself, silly).  Once I did this and my iPod rebooted, it was recognized by iTunes.  Yay!  However, the firmware was out of date, and iTunes requested I update to the latest.  (Note: the old iPod updaters appear to no longer work &#8212; you now appear to have to use iTunes to do firmware updates.)  Unfortunately, the update didn&#8217;t work.  Here&#8217;s a tip: wait until your iPod finishes syncing.  Once finished, I did a restore + update, to get it to the newest firmware.  Once that was done, my iPod re-picked up, and I had to configure its sync settings anew, and leave it to copy music.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blindedbytech.com/2006/09/14/what-to-do-if-ipod-not-recognized-by-itunes/feed/</wfw:commentRss>
		<slash:comments>65</slash:comments>
		</item>
		<item>
		<title>How To: Install Wikipedia For Offline Access</title>
		<link>http://www.blindedbytech.com/2006/08/31/how-to-install-wikipedia-for-offline-access/</link>
		<comments>http://www.blindedbytech.com/2006/08/31/how-to-install-wikipedia-for-offline-access/#comments</comments>
		<pubDate>Thu, 31 Aug 2006 16:14:24 +0000</pubDate>
		<dc:creator>Techie</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.blindedbytech.com/2006/08/31/how-to-install-wikipedia-for-offline-access/</guid>
		<description><![CDATA[In the old days (say, around 1990) a must-have application when buying a computer was an encyclopedia on a CD-ROM.  Hello, Grolier&#8217;s and Encarta!  No more would you need a shelf full of books to look up interesting facts!  When I bought an iBook, it came with a copy of World Book, [...]]]></description>
			<content:encoded><![CDATA[<p>In the old days (say, around 1990) a must-have application when buying a computer was an encyclopedia on a CD-ROM.  Hello, Grolier&#8217;s and Encarta!  No more would you need a shelf full of books to look up interesting facts!  When I bought an iBook, it came with a copy of World Book, which I thought quite an entertaining addition.</p>
<p>These days, such an addition is no longer the norm, thanks to the Internet.  An incredible amount of information can be gleaned online with a quick search.  However, a project started a few years ago has quickly risen to become a great resource for user-provided information on a wide variety of topics.  I speak, of course, of <a href="http://wikipedia.org/">Wikipedia</a>.  While initially just a quick repository for user feedback, it&#8217;s quickly become a resource <a href="http://www.bloggingstocks.com/2006/08/08/its-wiki-time/">worthy of comparison</a> to more established sources, such as <a href="http://www.britannica.com/">The Encyclopedia Britannica</a>, even if its <a href="http://www.jsonline.com/story/index.aspx?id=489380">veracity</a> may be in question.</p>
<p>I have a laptop, but don&#8217;t always have an Internet connection, but wondered, why can&#8217;t I have an offline copy of Wikipedia?  As it turns out, I can.  Now, if I&#8217;m on the road and want to look up something quickly, I don&#8217;t even have to find a hotspot &#8212; I can just turn on my laptop, pull up a browser, and find the answer.  This article shows you how I did it.</p>
<p><strong>Overview</strong></p>
<hr noshade/>
<p>Wikipedia runs on the open source software <a href="http://sourceforge.net/projects/wikipedia/">MediaWiki</a>.  This in turn runs on top of MySQL and PHP, as well as possibly Linux and Apache.  My laptop runs Windows XP Professional SP2 Tablet PC Edition, so running Linux and Apache just wasn&#8217;t going to happen.  Fortunately, there is a <a href="http://www.wampserver.com/en/">WAMP</a> project (Windows &#8211; Apache &#8211; MySQL &#8211; PHP), which did all the hard work of that installation for me.  So, all I&#8217;d have to do is:</p>
<ul>
<li>Install WAMP.</li>
<li>Install MediaWiki.</li>
<li>Download and install a pages dump of Wikipedia.</li>
</ul>
<p>These instructions should in theory work for any Windows XP SP2 machine.  However, your results may vary.  <strong>I take no responsibility if you try this yourself!</strong>  Some anticipated caveats:</p>
<ul>
<li><strong>You need Administrator privileges.</strong>  You&#8217;re installing software, as well as creating services, so you need the privileges.</li>
<li><strong>You need disk space.</strong>  The full English Wikipedia will take a over 10 gigabytes when uncompressed into the database.</li>
<li><strong>You need NTFS.</strong>  Because of this, the database files themselves may grow to larger than 2 GB.  If you&#8217;re using FAT32, you&#8217;re out of luck.</li>
<li><strong>You&#8217;re installing a new service.</strong>  By default, the server installs without remote access, and hopefully, you leave your firewall in place.  However, you are still installing new services on your machine, which means they have the <em>potential</em> for exploitation.</li>
<li><strong>No pictures included.</strong>  These instructions do not cover the images in Wikipedia.</li>
</ul>
<p>That said, let&#8217;s get on with the show!</p>
<p><strong>Install WAMP.</strong></p>
<hr noshade/>
<p align="center"><img id="image25" src="http://www.blindedbytech.com/wp-content/uploads/2006/08/wamp_setup.jpg" hspace="5" vspace="5" alt="wamp_setup.jpg" /></p>
<p>Go to the <a href="http://www.wampserver.com/en/">Wampserver</a> site and download the latest WAMP distribution (in my case, 1.6.4).  Double-click the executable to run, and the defaults will pretty much be what you want.  (E.g., install to <code>C:\wamp\</code>, create a Start Menu group, do <em>not</em> auto-start, set DocumentRoot to <code>www</code>, and Launch immediately.)</p>
<p>A Windows Security Alert will probably pop up and ask if you want to keep blocking Apache HTTP Server.  You want to select &#8220;Keep Blocking&#8221; for this question.</p>
<p align="center"><img id="image24" src="http://www.blindedbytech.com/wp-content/uploads/2006/08/wamp_security.jpg" hspace="5" vspace="5" alt="wamp_security.jpg" /></p>
<p>Now, in your systray on the lower right side you should see a little dashboard icon, with a lock on it.  It should be white, and when you mouse over it, it should say &#8220;WAMP5 &#8211; All services running &#8211; server Offline&#8221;.  (When they say &#8220;offline&#8221; here, they actually mean that it&#8217;s restricting access to localhost &#8212; it&#8217;s actually <em>online</em>, technically.</p>
<p>To verify that it&#8217;s working, open up a web browser, and point it at <a href="http://127.0.0.1/">http://127.0.0.1/</a>.  If the installation was successful, you should see a page that looks like the following:</p>
<p align="center"><a href="http://www.blindedbytech.com/wp-content/uploads/2006/08/wamp_success.jpg"><img id="image26" src="http://www.blindedbytech.com/wp-content/uploads/2006/08/wamp_success.thumbnail.jpg" hspace="5" vspace="5" alt="wamp_success.jpg" /></a></p>
<p>That&#8217;s it for WAMP!</p>
<p><strong>Install MediaWiki.</strong></p>
<hr noshade/>
<p>First, we&#8217;ll set up a MySQL user for Wiki.  To do so, make sure WAMP is running.  (If not, go to Start-&gt;Programs-&gt;WampServer-&gt;Start Wampserver.)  Then, go to <a href="http://127.0.0.1/phpmyadmin">phpMyAdmin</a>.  Click on &#8220;Privileges&#8221;, then &#8220;Add a new User&#8221;.  Use the following values:</p>
<ul>
<li><strong>User name:</strong> <code>wikiuser</code></li>
<li><strong>Host:</strong> <em>Select &#8220;Local&#8221; from the dropdown</em></li>
<li><strong>Password:</strong> <em>Select &#8220;Use text field&#8221; from the dropdown, and pick a password of your choice</em></li>
<li><strong>Generate Password:</strong> <em>Click the &#8220;Generate&#8221; button</em></li>
<li><strong>Global privileges:</strong> <em>Leave all unchecked</em></li>
</ul>
<p>Scroll to the bottom and click &#8220;Go&#8221;, and it should successfully create a user.  On this confirmation page, you should have a screen to edit the user if you scroll down.  Do so, to the section marked &#8220;Database-specific privileges&#8221;.  Set the dropdown to &#8220;Use text field&#8221;, and enter &#8220;wikidb&#8221;.  Click &#8220;Go&#8221;.</p>
<p align="center"><a href="http://www.blindedbytech.com/wp-content/uploads/2006/08/mysql_db_privileges.jpg"><img id="image20" src="http://www.blindedbytech.com/wp-content/uploads/2006/08/mysql_db_privileges.thumbnail.jpg" hspace="5" vspace="5" alt="mysql_db_privileges.jpg" /></a></p>
<p>You should be presented with a new page for Database-specific privileges.  Click the &#8220;Check All&#8221; link to check all the boxes, and click &#8220;Go&#8221;.</p>
<p align="center"><a href="http://www.blindedbytech.com/wp-content/uploads/2006/08/mysql_db_privileges_edit.jpg"><img id="image21" src="http://www.blindedbytech.com/wp-content/uploads/2006/08/mysql_db_privileges_edit.thumbnail.jpg" hspace="5" vspace="5" alt="mysql_db_privileges_edit.jpg" /></a></p>
<p>Download the latest stable release of <a href="http://sourceforge.net/projects/wikipedia/">MediaWiki</a>.  At the time of this writing, that was version 1.7.1.  It&#8217;s a .tar.gz file, so you&#8217;ll need a program to expand it &#8212; I recommend the shareware program <a href="http://www.rarsoft.com/">WinRAR</a>.  When you unpack this, you&#8217;ll create a folder named <code>mediawiki-1.7.1</code>.  Rename this to <code>wikipedia</code>, and move it to <code>c:\wamp\www\</code>.</p>
<p>If you now visit <a href="http://127.0.0.1/wikipedia/">http://127.0.0.1/wikipedia/</a>, you should get a splash page saying to &#8220;setup the wiki&#8221; first.  Follow that link, and you should get a &#8220;Site config&#8221; page.  I used these values for this form:</p>
<ul>
<li><strong>Wiki name:</strong> <code>Wikipedia Offline</code></li>
<li><strong>(Admin) Password:</strong> <em>custom password</em></li>
<li><strong>Database host:</strong> <code>localhost</code></li>
<li><strong>Database name:</strong> <code>wikidb</code></li>
<li><strong>DB username:</strong> <code>wikiuser</code></li>
<li><strong>DB password:</strong> <em>same password used when creating MySQL user</em></li>
</ul>
<p>The other defaults were fine.  Once done, I went in Windows Explorer to <code>C:\wamp\www\wikipedia\config\</code>, and moved the file <code>LocalSettings.php</code> up one directory to <code>C:\wamp\www\wikipedia\</code>.</p>
<p>Another check of <a href="http://127.0.0.1/wikipedia/">http://127.0.0.1/wikipedia/</a> should state that &#8220;MediaWiki has been successfully installed.&#8221;</p>
<p><strong>Download and install a pages dump of Wikipedia.</strong></p>
<hr noshade/>
<p>You can download a copy of the English Wikipedia pages from <a href="http://download.wikimedia.org/enwiki/latest/">http://download.wikimedia.org/enwiki/latest/</a>.  <strong>However,</strong> you should check <a href="http://download.wikimedia.org/">this page</a>, for the entry for &#8220;enwiki&#8221; first, to make sure the dump completed successfully.  The file you will want is named <code>enwiki-latest-pages-articles.xml.bz2</code>.  This contains all the article pages, but none of the revisions or history.  You just want the articles, right?  As of this writing, that file is around 1.5 GB, compressed.</p>
<p>If you don&#8217;t already, you should make sure you have Java installed.  If you don&#8217;t, you can get it from <a href="http://java.sun.com/j2se/1.5.0/download.jsp">http://java.sun.com/j2se/1.5.0/download.jsp</a>.  I usually just open a command window and type <code>java</code> and hit enter, and see if it just hangs.  If it does, it&#8217;s probably installed, and I hit cntrl-C to cancel.</p>
<p>You&#8217;ll also need <a href="http://www.mediawiki.org/wiki/MWDumper">MWDumper</a>.  Download <code>mwdumper.jar</code> from <a href="http://download.wikimedia.org/tools/">http://download.wikimedia.org/tools/</a>.  Put this file and the wiki dump file in the same directory, say, <code>c:\tmp\</code>.</p>
<p>You&#8217;ll need to edit MySQL&#8217;s config file to increase the max_allowed_packet size.  If you don&#8217;t, the import will most likely choke around the 49,000 article mark.  This is quite annoying, because it kills the rest of the import.  While you&#8217;re add it, you might as well change the innodb_log_file_size, which should modestly increase the import speed.  To do so, go to <code>c:\wamp\mysql\</code>, right-click on <code>my.ini</code>, and select Open.  This will open up the ini file in a text editor.  Find the line <code>innodb_log_file_size</code>, and set this to <code>512M</code> (was <code>10M</code> in mine).  Scroll to the bottom, and add the following line:</p>
<pre>set-variable=max_allowed_packet=32M</pre>
<p>Remember that little dashboard with the lock in your systray?  Left-click on it, and a menu should pop up.  Select MySQL-&gt;Stop Service.  Wait a few seconds, then left-click on it again, and select MySQL-&gt;Start / Resume Service.</p>
<p>Before you import, you&#8217;re going to need to delete data in MySQL from the default installation.  Otherwise, you&#8217;ll get errors about a dupe right at the start, and then none of the rows will import.  Left-click on the dashboard with a lock in your systray, go to &#8220;MySQL&#8221;, and select &#8220;MySQL console&#8221;.  You&#8217;ll be asked for a password, which by default is blank, so just hit enter.  Enter in the following commands into the console:</p>
<pre>
use wikidb;
delete from page;
delete from revision;
delete from text;
quit
</pre>
<p align="center"><img id="image22" src="http://www.blindedbytech.com/wp-content/uploads/2006/08/mysql_delete_data.jpg" width="500" hspace="5" vspace="5" alt="mysql_delete_data.jpg" /></p>
<p><strong>This will delete all pages in the wiki.</strong></p>
<p>Open a command window by going to Start-&gt;Run, and typing in <code>cmd</code>.  Type <code>c:</code> to change to the c: drive, and then <code>cd c:\tmp\</code> to change to the directory where you put <code>mwdumper.jar</code> and the wiki dump file.  You&#8217;re ready to do the import, but beware &#8212; <strong>this will take a long time.</strong>  It&#8217;s best to start the process, then leave for a few hours.  When you&#8217;re ready, type the following:</p>
<pre><nowiki>
java -jar mwdumper.jar --format=sql:1.5 enwiki-latest-pages-articles.xml.bz2 | c:\wamp\mysql\bin\mysql -u wikiuser -p wikidb
</nowiki></pre>
<p align="center"><img id="image18" src="http://www.blindedbytech.com/wp-content/uploads/2006/08/import_starting.jpg" width="500" hspace="5" vspace="5" alt="import_starting.jpg" /></p>
<p>This will begin the import process, and as noted, this will take a long time.  There are over <em>three million</em> pages to process, so don&#8217;t expect it to finish right away.  On a reasonably fast single processor machine (*not* my laptop), it took me over 24 hours.</p>
<p><strong>Usage</strong></p>
<hr noshade/>
<p>Using Wikipedia Offline is pretty straightforward.  If you haven&#8217;t already, start WAMP.  (If you see the dashboard with a lock icon in your systray, and it&#8217;s white, then it&#8217;s running.  If not, go to Start-&gt;Programs-&gt;WampServer-&gt;Start Wampserver.)  Then, just fire up a web browser and browse to <a href="http://127.0.0.1/wikipedia/">http://127.0.0.1/wikipedia/</a>.  If all goes well, it should be accessible just like Wikipedia, searches and all.</p>
<p align="center"><a href="http://www.blindedbytech.com/wp-content/uploads/2006/08/wikipedia_up.jpg"><img id="image27" src="http://www.blindedbytech.com/wp-content/uploads/2006/08/wikipedia_up.thumbnail.jpg" hspace="5" vspace="5" alt="wikipedia_up.jpg" /></a></p>
<p><strong>Anticipated Questions</strong></p>
<hr noshade/>
<ul>
<li><strong>Why do this?</strong><br />
I&#8217;m not always connected to the Internet, and think Wikipedia is a great resource.  Now I can take it wherever I want.  I suppose if I were paranoid about Wikipedia tracking my searches, then I could do this and do all the searches I wanted offline.  Doing it this way also seemed like a fun tech project.</li>
<li><strong>Is this legal?</strong><br />
Sure!  Wikipedia offers all of their data for use by interested parties.  All of the software involved is open source, except for Windows.</li>
<li><strong>Where are the pictures?</strong><br />
You can download a dump of the English Wikipedia images from <a href="http://download.wikimedia.org/images/wikipedia/en/">here</a>.  Wikipedia doesn&#8217;t package these with the dump for two reasons: 1) the images might be copyrighted, so they don&#8217;t want to distribute them; and 2) the dump file would be <em>huge</em>.  As of this writing, the dump file is about 75 GB, which was larger than the hard drive on my laptop.</li>
<li><strong>Isn&#8217;t it overkill to install full MediaWiki?</strong><br />
Yes, but it&#8217;s not nearly as much effort as you might think.  Plus, with WAMP, I can experiment with other types of LAMP-based software.  You can always <a href="http://en.wikipedia.org/wiki/Wikipedia:Database_download#Static_HTML_tree_dumps_for_mirroring_or_CD_distribution">build static pages</a> if you&#8217;d prefer something a little more lightweight.</li>
<li><strong>Won&#8217;t the data fall out of date?</strong><br />
Yes, but I&#8217;m doing this more to just have a quick reference, rather than something that&#8217;s kept constantly up to date.  In that sense, it&#8217;s similar to those encyclopedia CD-ROMs!  Besides, the way the dumps are handled, you&#8217;re <em>guaranteed</em> to be slightly out of date.  If you really need to be that current, you should probably be going online.</li>
<li><strong>How can updates be done?</strong><br />
I&#8217;m presuming I can just go in mysql and delete from the &#8216;page&#8217;, &#8216;revision&#8217;, and &#8216;text&#8217; tables; download a new dump; and re-import using mwdumper.jar.  I haven&#8217;t actually tried this, though.</li>
<li><strong>Can I use these instructions to run a wiki web site?</strong><br />
There are a few problems with this.  First, the WAMP folk note that &#8220;WAMP5 is not meant to be a production server.&#8221;  Also, running a web site takes a fair bit of security knowledge to prevent hacking, so you&#8217;ll get yourself in trouble if you just use it to publish on the &#8216;net.  Finally, you can&#8217;t republish the contents of Wikipedia as your own site.  So, technically, you could use the first few parts to set up wiki, but it&#8217;s not a good idea.  You&#8217;re better off getting a proper web host that has a one-click install of wiki, such as <a href="http://www.dreamhost.com/r.cgi?84839">DreamHost</a>.
</li>
<li><strong>How do I uninstall?</strong><br />
If you want to trash the whole thing, go to &#8220;Add or Remove Programs&#8221; in the Control Panel, and select WAMP5.  Remove it, then be sure to delete <code>C:\wamp\</code> as well.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.blindedbytech.com/2006/08/31/how-to-install-wikipedia-for-offline-access/feed/</wfw:commentRss>
		<slash:comments>68</slash:comments>
		</item>
	</channel>
</rss>
