<?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>James Emmrich</title>
	<atom:link href="http://www.lwp.ca/james/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lwp.ca/james</link>
	<description>Just another motorcycle linux geek</description>
	<lastBuildDate>Mon, 18 Apr 2011 15:38:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Mount Remote Filesystem Over ssh</title>
		<link>http://www.lwp.ca/james/2011/03/mount-remote-filesystem-over-ssh/</link>
		<comments>http://www.lwp.ca/james/2011/03/mount-remote-filesystem-over-ssh/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 02:27:32 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[ProTip]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.lwp.ca/james/?p=582</guid>
		<description><![CDATA[Here is a nice tip when having to access remote files. Whether it&#8217;s a personal computer or a device somewhere running an ssh server, sometimes it&#8217;s great to use those files as if they were local. I use this for sharing my media collection between computers outside of my local network. &#160; Install the Packages [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a nice tip when having to access remote files. Whether it&#8217;s a personal computer or a device somewhere running an ssh server, sometimes it&#8217;s great to use those files as if they were local.</p>
<p>I use this for sharing my media collection between computers outside of my local network.</p>
<p>&nbsp;</p>
<h2>Install the Packages</h2>
<pre>apt-get install sshfs</pre>
<p>&nbsp;</p>
<h2>Mount the Remote Filesystem</h2>
<pre>sshfs james@james.dyns-home.com:/home/james/music /home/james/music</pre>
<p>As you can see here, I am using dyndns&#8217;s service so that my home pc&#8217;s dynamic IP is always accessible. I suggest checking them out and installing the <em>ddclient</em> package to maintain your dyndns account.</p>
<p>&nbsp;</p>
<h2>Unmounting the Remote Filesystem</h2>
<pre>fusermount -u /home/james/music</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lwp.ca/james/2011/03/mount-remote-filesystem-over-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running GUI applications as another user in Linux</title>
		<link>http://www.lwp.ca/james/2011/03/running-gui-applications-as-another-user-in-linux/</link>
		<comments>http://www.lwp.ca/james/2011/03/running-gui-applications-as-another-user-in-linux/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 01:12:29 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ProTip]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.lwp.ca/james/?p=577</guid>
		<description><![CDATA[Here is a handy script I made for those situations where you are logged into a user account but require running a program as another user. Why would this be handy? Well in my case, I have two users on my laptop. My personal account which I use at home, and my work account. This [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a handy script I made for those situations where you are logged into a user account but require running a program as another user.</p>
<p>Why would this be handy? Well in my case, I have two users on my laptop. My personal account which I use at home, and my work account. This helps me keep my work data separate from my personal data. But how do I use my instant messenger or IRC chat and retain chat logs and preferences without having to duplicate them or create weird symbolic links everywhere?</p>
<p>The bash script:</p>
<pre>#!/bin/bash
xhost +
gksudo -u $1 $2
xhost -</pre>
<p>Set the permissions to for executing:</p>
<pre>chmod +x ﻿AppAsDiffUser.sh</pre>
<p>The script takes two arguments, the user you want to run as and the application you want to run. Now we can run the script:</p>
<pre>./AppAsDiffUser.sh james xchat</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lwp.ca/james/2011/03/running-gui-applications-as-another-user-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Brother HL-2170W Laser Printer on Ubuntu</title>
		<link>http://www.lwp.ca/james/2010/06/installing-brother-hl-2170w-laser-printer-on-ubuntu/</link>
		<comments>http://www.lwp.ca/james/2010/06/installing-brother-hl-2170w-laser-printer-on-ubuntu/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 03:15:20 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.lwp.ca/james/?p=566</guid>
		<description><![CDATA[The reason I love Brother laser printers &#38; multi-function laser printers is Brothers support for Linux operating systems. If you have a multi-function laser printer, you can enjoy scanning and printing from Linux over the network or by USB just like our Windows friends. The Brother HL-2170W is just a simple laser printer, with built [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lwp.ca/james/wp-content/uploads/2010/06/brother-hl-2170w.jpg"><img class="size-full wp-image-569 alignright" title="brother-hl-2170w" src="http://www.lwp.ca/james/wp-content/uploads/2010/06/brother-hl-2170w.jpg" alt="" width="300" height="196" /></a>The reason I love Brother laser printers &amp; multi-function laser printers is Brothers support for Linux operating systems.</p>
<p>If you have a multi-function laser printer, you can enjoy scanning and printing from Linux over the network or by USB just like our Windows friends.</p>
<p>The Brother HL-2170W is just a simple laser printer, with built in wireless and a wired network port as backup. Here is how to install it.</p>
<p>First thing you need is to download the drivers to your desktop:</p>
<ol>
<li>brhl2170wlpr-2.0.2-1.i386.deb</li>
<li>cupswrapperHL2170W-2.0.2-1.i386.deb</li>
</ol>
<p>Since I am pretty much only going to use the wireless connectivity, I configured it directly over wireless, I have a spare windows laptop which I used. I installed the drivers on it as I use this laptop for my windows development and graphics editing. To do the configuring, I had to connect to the Ad-hoc network SETUP which I assume is the printers default SSID. Once the printer is configured this connection disappears. I had to hold the GO button on the printer for 10 seconds to get a printout of the current configuration. Don&#8217;t get me wrong, Brother does not require you to use a Windows computer to set this device up!</p>
<p>Anyways, with the printer setup for networking, time to set up Ubuntu from command line:</p>
<pre>cd ~/Desktop
sudo aa-complain cupsd
sudo mkdir /usr/share/cups/model
sudo ln -s /etc/init.d/cups /etc/init.d/lpd
sudo mkdir /var/spool/lpd
sudo dpkg  -i  --force-all brhl2170wlpr-2.0.2-1.i386.deb
sudo dpkg  -i  --force-all cupswrapperHL2170W-2.0.2-1.i386.deb
</pre>
<p>Make sure that it is installed:</p>
<pre>dpkg  -l  |  grep  Brother
ii  brhl2170wlpr  ....  2.0.2-1  ....  Brother HL-2170W LPR driver
ii  cupswrapperhl2170w  ....  2.0.2-1  ....  Brother HL2170W CUPS wrapper driver</pre>
<p>Depending on the current state of your computer you might have to reboot.</p>
<p>Now add and configure the printer<br />
<a href="http://localhost:631">http://localhost:631/</a></p>
<p>I have two printers connections installed for this printer, one for over networking, and one setup as USB. I wasn&#8217;t paying attention when I set this up ha, I think it did it auto-magically.</p>
<p>Once the printers are setup, go into System &gt; Administration &gt; Printing</p>
<p>Right click on the networking printer and click Properties.</p>
<p>Make sure that the Device URI is correct. For me, since I use static IP&#8217;s on my network I had to remove the device name and put in the IP address like so:</p>
<p>lpd://<a class="linkification-ext" title="Linkification: http://192.168.1.29/BINARY_P1" href="http://192.168.1.29/BINARY_P1">192.168.1.29/BINARY_P1</a></p>
<p>That&#8217;s it. I hit Print Test Page and it worked, as expected!</p>
<p>I recommend Brother printers to anyone, this printer was pretty cheap and they all use virtually the same cartridges and drums so you can swap with your other Brother devices when in a pinch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lwp.ca/james/2010/06/installing-brother-hl-2170w-laser-printer-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Potato Chips made Awesomer: Homemade</title>
		<link>http://www.lwp.ca/james/2010/05/potato-chips-made-awesomer-homemade/</link>
		<comments>http://www.lwp.ca/james/2010/05/potato-chips-made-awesomer-homemade/#comments</comments>
		<pubDate>Mon, 31 May 2010 00:31:44 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Cooking]]></category>

		<guid isPermaLink="false">http://www.lwp.ca/james/?p=555</guid>
		<description><![CDATA[My Mom got me a neat little gadget to slice stuff. All day I have been slicing anything I could find. So I tried to make potato chips. Whatcha need: Cardboard &#38; Scissors to make a chip holder (optional) Russet Potatos Mandolin or Knife Microwave Steps: Wash the potatos keeping the skins on Cut the [...]]]></description>
			<content:encoded><![CDATA[<p>My Mom got me a neat little gadget to slice stuff. All day I have been slicing <a href="http://www.youtube.com/watch?v=wcFZIj96LwY" target="_blank">anything I could find</a>. So I tried to make potato chips.</p>
<p>Whatcha need:</p>
<ul>
<li>Cardboard &amp; Scissors to make a chip holder (optional)</li>
<li>Russet Potatos</li>
<li>Mandolin or Knife</li>
<li>Microwave</li>
</ul>
<p>Steps:</p>
<ol>
<li>Wash the potatos keeping the skins on</li>
<li>Cut the potatos into thin slices, thiner the better and easier to cook</li>
<li>Rinse the slices and pat dry with a paper towel</li>
<li>Sprinkle on your seasoning and lay evenly on a plate, parchment paper or in a holder like I did</li>
<li>Put in microwave on high for 5-7 minutes.</li>
<li>Carefully watch for browning.</li>
</ol>
<p>Notes:</p>
<p>It took me 3 or 4 attempts in different ways to find something that worked ok. The first try the slices were too thick so I created a little insert to make the mandolin cut thiner slices. Even with the mandolin at its thinest setting, the chips came out a bit too thick. I took two margarine container lids, cutting the edges off so what remained with two thin plastic disks. Together these disks were just the right thickness to make the slices of potato half as thick than previous attempts.</p>
<p>I also put the chips on a plate but they stuck on pretty good. You end up spending more time getting them off than eating them! So I made a little cardboard stand for them. I think with a couple more you could load up the microwave with them.</p>
<p>Not rinsing and drying them made them take longer to cook, and they stuck on the plate even more. The first attempt took a long time to cook, the second attempt I burnt them to a crisp from putting them on for 2 minutes more.</p>
<p>After the second batch, you should watch the time on the microwave, it will end up being shorter time to cook the following batches.</p>
<p>Your microwave will differ in its power settings, best to try and try again. Great thing is that its very fast and easy to experiment with different thicknesses and time settings.</p>
<p>Things to try:</p>
<p>I&#8217;d like to try using the oven and see if you can cook a bunch at a time, not sure if they will just stick or never go crispy.</p>
<p>Final Results:</p>
<p><a href="http://www.lwp.ca/james/wp-content/uploads/2010/05/photo-1.jpg"><img class="size-medium wp-image-556 alignnone" title="Chip standing device" src="http://www.lwp.ca/james/wp-content/uploads/2010/05/photo-1-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://www.lwp.ca/james/wp-content/uploads/2010/05/photo-2.jpg"><img class="size-medium wp-image-557 alignnone" title="Chips on a plate" src="http://www.lwp.ca/james/wp-content/uploads/2010/05/photo-2-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Crispy homemade microwave potato chips. They actually tasted better than your average potato chips, it&#8217;s the freshness I guess. I did sprinkle on some salt before placing them in the microwave but it did not stick very well and ended up not tasting it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lwp.ca/james/2010/05/potato-chips-made-awesomer-homemade/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux and the Mercury EZ View TV Tuner Card</title>
		<link>http://www.lwp.ca/james/2010/05/linux-and-the-mercury-ez-view-tv-tuner-card/</link>
		<comments>http://www.lwp.ca/james/2010/05/linux-and-the-mercury-ez-view-tv-tuner-card/#comments</comments>
		<pubDate>Wed, 26 May 2010 00:16:57 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Entertainment Centre]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.lwp.ca/james/?p=539</guid>
		<description><![CDATA[I am not one to watch much TV, but when I do, I prefer to do so by PVR with commercials cut, and live pausing. I also like to set recording schedules in advance and do it from my cellphone if need be. I bought this little card originally for my parents PVR that I [...]]]></description>
			<content:encoded><![CDATA[<p>I am not one to watch much TV, but when I do, I prefer to do so by PVR with commercials cut, and live pausing. I also like to set recording schedules in advance and do it from my cellphone if need be.</p>
<p>I bought this little card originally for my parents PVR that I built them, unfortunately I could not get it to work. I believe I paid a little less than $100.00 for it. After a lot of messing with it, I put it back in the box and left it.</p>
<p>Four years later, I attempted again ha.</p>
<p>This is how to get your Mercury EZ View PCI Card to work in Ubuntu 10.04 LTS.</p>
<h2>The Mercury EZ View PCI Card</h2>
<div id="attachment_544" class="wp-caption alignleft" style="width: 460px"><a href="http://www.lwp.ca/james/wp-content/uploads/2010/05/pr_tvtunercard_ezview_b.jpg"><img class="size-full wp-image-544   " title="mercury_ezview1" src="http://www.lwp.ca/james/wp-content/uploads/2010/05/pr_tvtunercard_ezview_b.jpg" alt="" width="450" height="350" /></a><p class="wp-caption-text">Product Image</p></div>
<p><strong>FM Radio Reception</strong></p>
<ul>
<li> Auto Scan FM channels</li>
</ul>
<p><strong>TV / Video Display</strong></p>
<ul>
<li> Full motion display @ 30fps</li>
<li>Resizable video window from free size to full screen</li>
<li>Full screen display: Max resolution up to 720 x 576</li>
<li>Supports overlay mode to get the best quality</li>
</ul>
<p><strong>TV / Video Capture</strong></p>
<ul>
<li> Full motion video capture up to 30 fps</li>
<li>Video capture format: AVI, MPEG-1/2/4, DVD, VCD, MP3</li>
<li>Still image snapshot format BMP</li>
<li>Video capture size up to 352 x 288 (AVI), 325 x 240 (VCD NTSC) and 322 x 288 (VCD PAL)</li>
</ul>
<p><strong>Digital Video Capture</strong></p>
<ul>
<li>Capture and display video from Digital Video (DV) camcorder</li>
<li>Record DV video into MPEG-I or MPEG-II and AVI files</li>
<li>Camera control via GUI</li>
</ul>
<p><strong>System Requirements </strong></p>
<ul>
<li> Outdoor antenna or cable TV connection</li>
<li> Pentium III 700MHz or higher processor</li>
<li> 128MB of system memory recommended</li>
<li> Microsoft Windows 98 SE/ME/2000/XP with DirectX 8.1 installed</li>
<li> DirectX 8.1 compatible VGA card</li>
</ul>
<p><strong>Hardware</strong></p>
<ul>
<li> Conexant CX 23881 chipset, 10bits high quality ADC</li>
<li> Multiple tuner receptions (NTSC, PAL system)</li>
<li> PCI 2.1 compatible Interface</li>
<li> 4 layer PCB</li>
<li> Remote power on</li>
<li> Full IR remote control function</li>
</ul>
<h2>Installing the Card</h2>
<div id="attachment_547" class="wp-caption alignright" style="width: 310px"><a href="http://www.lwp.ca/james/wp-content/uploads/2010/05/photo.jpg"><img class="size-medium wp-image-547" title="mercury_cables" src="http://www.lwp.ca/james/wp-content/uploads/2010/05/photo-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Jumper cables provided</p></div>
<p>Duh, just like any card. But on the serious side, it came with a bunch of jumper cables as shown on the left. The back of the card has a cable coaxial input, a IR input port for the remote, and an &#8220;S-Video&#8221; like connector. The jumper cables provided, allow you to split this into the following connections:</p>
<ul>
<li>Splitter cable:
<ul>
<li>Audio Out &#8211; 3.5mm female</li>
<li>Audio In &#8211; 3.5mm female</li>
<li>Video Composite Out &#8211; male</li>
<li>S-Video Out &#8211; female</li>
</ul>
</li>
<li>3.5mm headphone cable jumper &#8211; male/male</li>
</ul>
<p>It seems to be a funky way of doing things, but in any case&#8230;</p>
<p>Upon system reboot, the card is not detected, the syslog shows the following:</p>
<ol>
<li>
<div>May 24 19:38:20 lonewolf kernel: [    13.296313] Linux video capture interface: v2.00</div>
</li>
<li>
<div>May 24 19:38:20 lonewolf kernel: [    13.766829] Console: switching to colour frame buffer device 80&#215;30</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.010115] cx88/0: cx2388x v4l2 driver version 0.0.7 loaded</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.010171] cx8800 0000:02:0a.0: PCI INT A -&gt; GSI 22 (level, low)  -&gt; IRQ 22</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.010469] cx88[0]: Your board has no valid PCI Subsystem ID and thus  can&#8217;t</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.010471] cx88[0]: be autodetected.  Please pass card=&lt;n&gt; insmod  option to</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.010473] cx88[0]: workaround that.  Redirect complaints to the vendor  of</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.010474] cx88[0]: the TV card.  Best regards,</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.010475] cx88[0]:         &#8212; tux</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.012313] cx88[0]: Here is a list of valid choices for the  card=&lt;n&gt; insmod option:</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.012815] cx88[0]:    card=0 -&gt; UNKNOWN/GENERIC</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.013152] cx88[0]:    card=1 -&gt; Hauppauge WinTV 34xxx models</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.013521] cx88[0]:    card=2 -&gt; GDI Black Gold</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.013841] cx88[0]:    card=3 -&gt; PixelView</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.014143] cx88[0]:    card=4 -&gt; ATI TV Wonder Pro</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.014468] cx88[0]:    card=5 -&gt; Leadtek Winfast 2000XP Expert</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.014832] cx88[0]:    card=6 -&gt; AverTV Studio 303 (M126)</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.015178] cx88[0]:    card=7 -&gt; MSI TV-@nywhere Master</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.015518] cx88[0]:    card=8 -&gt; Leadtek Winfast DV2000</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.015858] cx88[0]:    card=9 -&gt; Leadtek PVR 2000</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.016214] cx88[0]:    card=10 -&gt; IODATA GV-VCP3/PCI</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.016554] cx88[0]:    card=11 -&gt; Prolink PlayTV PVR</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.016893] cx88[0]:    card=12 -&gt; ASUS PVR-416</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.017208] cx88[0]:    card=13 -&gt; MSI TV-@nywhere</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.017532] cx88[0]:    card=14 -&gt; KWorld/VStream XPert DVB-T</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.017900] cx88[0]:    card=15 -&gt; DViCO FusionHDTV DVB-T1</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.018252] cx88[0]:    card=16 -&gt; KWorld LTV883RF</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.018570] cx88[0]:    card=17 -&gt; DViCO FusionHDTV 3 Gold-Q</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.018925] cx88[0]:    card=18 -&gt; Hauppauge Nova-T DVB-T</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.019270] cx88[0]:    card=19 -&gt; Conexant DVB-T reference design</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.019644] cx88[0]:    card=20 -&gt; Provideo PV259</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.019960] cx88[0]:    card=21 -&gt; DViCO FusionHDTV DVB-T Plus</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.020356] cx88[0]:    card=22 -&gt; pcHDTV HD3000 HDTV</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.030618] cx88[0]:    card=23 -&gt; digitalnow DNTV Live! DVB-T</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.040737] cx88[0]:    card=24 -&gt; Hauppauge WinTV 28xxx (Roslyn)  models</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.051028] cx88[0]:    card=25 -&gt; Digital-Logic MICROSPACE  Entertainment Center (MEC)</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.071494] cx88[0]:    card=26 -&gt; IODATA GV/BCTV7E</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.081762] cx88[0]:    card=27 -&gt; PixelView PlayTV Ultra Pro (Stereo)</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.091783] cx88[0]:    card=28 -&gt; DViCO FusionHDTV 3 Gold-T</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.101925] cx88[0]:    card=29 -&gt; ADS Tech Instant TV DVB-T PCI</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.111947] cx88[0]:    card=30 -&gt; TerraTec Cinergy 1400 DVB-T</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.122069] cx88[0]:    card=31 -&gt; DViCO FusionHDTV 5 Gold</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.132337] cx88[0]:    card=32 -&gt; AverMedia UltraTV Media Center PCI  550</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.142650] cx88[0]:    card=33 -&gt; Kworld V-Stream Xpert DVD</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.152954] cx88[0]:    card=34 -&gt; ATI HDTV Wonder</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.163478] cx88[0]:    card=35 -&gt; WinFast DTV1000-T</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.174010] cx88[0]:    card=36 -&gt; AVerTV 303 (M126)</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.184401] cx88[0]:    card=37 -&gt; Hauppauge Nova-S-Plus DVB-S</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.194992] cx88[0]:    card=38 -&gt; Hauppauge Nova-SE2 DVB-S</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.205465] cx88[0]:    card=39 -&gt; KWorld DVB-S 100</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.215970] cx88[0]:    card=40 -&gt; Hauppauge WinTV-HVR1100  DVB-T/Hybrid</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.226649] cx88[0]:    card=41 -&gt; Hauppauge WinTV-HVR1100  DVB-T/Hybrid (Low Profile)</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.247883] cx88[0]:    card=42 -&gt; digitalnow DNTV Live! DVB-T Pro</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.259172] cx88[0]:    card=43 -&gt; KWorld/VStream XPert DVB-T with  cx22702</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.270560] cx88[0]:    card=44 -&gt; DViCO FusionHDTV DVB-T Dual Digital</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.282025] cx88[0]:    card=45 -&gt; KWorld HardwareMpegTV XPert</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.293396] cx88[0]:    card=46 -&gt; DViCO FusionHDTV DVB-T Hybrid</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.304702] cx88[0]:    card=47 -&gt; pcHDTV HD5500 HDTV</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.315830] cx88[0]:    card=48 -&gt; Kworld MCE 200 Deluxe</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.327030] cx88[0]:    card=49 -&gt; PixelView PlayTV P7000</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.338171] cx88[0]:    card=50 -&gt; NPG Tech Real TV FM Top 10</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.349322] cx88[0]:    card=51 -&gt; WinFast DTV2000 H</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.360277] cx88[0]:    card=52 -&gt; Geniatech DVB-S</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.371133] cx88[0]:    card=53 -&gt; Hauppauge WinTV-HVR3000 TriMode  Analog/DVB-S/DVB-T</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.392302] cx88[0]:    card=54 -&gt; Norwood Micro TV Tuner</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.403119] cx88[0]:    card=55 -&gt; Shenzhen Tungsten Ages Tech  TE-DTV-250 / Swann OEM</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.425351] cx88[0]:    card=56 -&gt; Hauppauge WinTV-HVR1300  DVB-T/Hybrid MPEG Encoder</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.448397] cx88[0]:    card=57 -&gt; ADS Tech Instant Video PCI</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.460250] cx88[0]:    card=58 -&gt; Pinnacle PCTV HD 800i</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.472088] cx88[0]:    card=59 -&gt; DViCO FusionHDTV 5 PCI nano</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.483859] cx88[0]:    card=60 -&gt; Pinnacle Hybrid PCTV</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.495621] cx88[0]:    card=61 -&gt; Leadtek TV2000 XP Global</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.507511] cx88[0]:    card=62 -&gt; PowerColor RA330</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.519250] cx88[0]:    card=63 -&gt; Geniatech X8000-MT DVBT</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.531312] cx88[0]:    card=64 -&gt; DViCO FusionHDTV DVB-T PRO</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.543210] cx88[0]:    card=65 -&gt; DViCO FusionHDTV 7 Gold</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.554938] cx88[0]:    card=66 -&gt; Prolink Pixelview MPEG 8000GT</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.566832] cx88[0]:    card=67 -&gt; Kworld PlusTV HD PCI 120 (ATSC 120)</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.578525] cx88[0]:    card=68 -&gt; Hauppauge WinTV-HVR4000  DVB-S/S2/T/Hybrid</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.589973] cx88[0]:    card=69 -&gt; Hauppauge WinTV-HVR4000(Lite)  DVB-S/S2</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.601279] cx88[0]:    card=70 -&gt; TeVii S460 DVB-S/S2</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.612676] cx88[0]:    card=71 -&gt; Omicom SS4 DVB-S/S2 PCI</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.624058] cx88[0]:    card=72 -&gt; TBS 8920 DVB-S/S2</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.635450] cx88[0]:    card=73 -&gt; TeVii S420 DVB-S</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.646784] cx88[0]:    card=74 -&gt; Prolink Pixelview Global Extreme</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.658301] cx88[0]:    card=75 -&gt; PROF 7300 DVB-S/S2</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.669770] cx88[0]:    card=76 -&gt; SATTRADE ST4200 DVB-S/S2</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.681486] cx88[0]:    card=77 -&gt; TBS 8910 DVB-S</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.692933] cx88[0]:    card=78 -&gt; Prof 6200 DVB-S</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.704146] cx88[0]:    card=79 -&gt; Terratec Cinergy HT PCI MKII</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.715313] cx88[0]:    card=80 -&gt; Hauppauge WinTV-IR Only</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.726179] cx88[0]:    card=81 -&gt; Leadtek WinFast DTV1800 Hybrid</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.736853] cx88[0]:    card=82 -&gt; WinFast DTV2000 H rev. J</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.736865] cx88[0]: subsystem: 0000:0000, board: UNKNOWN/GENERIC  [card=0,autodetected], frontend(s): 0</div>
</li>
<li>
<div>May 24 19:38:21 lonewolf kernel: [    14.736872] cx88[0]: TV tuner type -1, Radio tuner type -1</div>
</li>
</ol>
<p>Never had to deal with this before. Annoying, as my Hauppauge 250 PVR card works amazing and out of the box. As you can see there is no EZ View or Mercury in there.</p>
<h2>Debugging</h2>
<p>I needed to find out more information:</p>
<pre>sudo lspci -v</pre>
<pre>02:0a.0 Multimedia video controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder (rev 03)
 Flags: medium devsel, IRQ 22
 Memory at f9000000 (32-bit, non-prefetchable) [size=16M]
 Capabilities: [44] Vital Product Data &lt;?&gt;
 Capabilities: [4c] Power Management version 2
 Kernel modules: cx8800</pre>
<p>I installed my usual software:</p>
<ul>
<li>tvtime</li>
<li>xawtv</li>
</ul>
<pre>sudo apt-get install tvtime xawtv</pre>
<p>I tried all, obviously, got nothing.</p>
<p>After posting numerous posts around the web, reading, my last resort was to figure out how to set the card types. To do so I needed to learn the modprobe command.</p>
<p>One thing to note here is that it seems the cx8800 driver creates the device /dev/video0 and the cx88xx provides new functionality, therefore they work together. You need to unload and reload them both. My initial problems was that the cx8800 driver does not support the modprobe command &#8220;card&#8221; as that was moved to the cx88xx driver.</p>
<p>Another thing was you can&#8217;t unload the cx88xx module from the kernel unless you first remove the cx8800 module. These little things caused a lot of initial confusion for me.</p>
<p>I wrote a little script to test each card type, surprisingly, this card seems to work on a couple different types. It was working and I didn&#8217;t even know it a couple times. Here&#8217;s a simple shell script I wrote:</p>
<pre>rmmod cx8800
rmmod cx88xx</pre>
<pre>modprobe cx88xx card=$1 tuner=$2
modprobe cx8800</pre>
<pre>tvtime</pre>
<p>When tvtime opens, you can then set the input for the card, in my case it was Television, but for some it might be composite, s-video, dvb whatever your case may be. It took a few seconds before my video started producing color video.</p>
<h3>Freenode help</h3>
<p>A friendly fellow from Iceland, <strong>kizi</strong>, from Freenode&#8217;s IRC ##linux channel, provided some expertise here and helped me on the rest of the journey. He found me this interesting site:</p>
<p><a title="Linkification:  http://translate.google.is/translate?js=y&amp;prev=_t&amp;hl=en&amp;ie=UTF-8&amp;layout=1&amp;eotf=1&amp;u=http%3A%2F%2Fsugo.ubuntu.hu%2Fcommunity-doc%2Fhardy%2Funiverse%2Fhardware%2Fmercury_ezview_cx88xx.html&amp;sl=hu&amp;tl=en" href="http://translate.google.is/translate?js=y&amp;prev=_t&amp;hl=en&amp;ie=UTF-8&amp;layout=1&amp;eotf=1&amp;u=http%3A%2F%2Fsugo.ubuntu.hu%2Fcommunity-doc%2Fhardy%2Funiverse%2Fhardware%2Fmercury_ezview_cx88xx.html&amp;sl=hu&amp;tl=en">http://translate.google.is/translate?js=y&amp;prev=_t&amp;hl=en&amp;ie=UTF-8&amp;layout=1&amp;eotf=1&amp;u=http%3A%2F%2Fsugo.ubuntu.hu%2Fcommunity-doc%2Fhardy%2Funiverse%2Fhardware%2Fmercury_ezview_cx88xx.html&amp;sl=hu&amp;tl=en</a></p>
<p>Honestly cannot thank him enough!</p>
<p>Interestingly this link had the card and tuner number I needed! card=27 tuner=69</p>
<p>So I ran the script again with the following:</p>
<pre>./mercury 27 69</pre>
<p>Viola! seemed to work even better!</p>
<p>To make this work after rebooting the computer, I made a config file: /etc/<a class="linkification-ext" title="Linkification: http://modprobe.conf/mercury.conf" href="http://modprobe.conf/mercury.conf">modprobe.conf/mercury.conf</a></p>
<pre>options cx88 card=27 tuner=69</pre>
<p>So I rebooted and to make sure it worked still. Yay!</p>
<p>As for setting it up in MythTV, well, that is a whole different post. Due to the way my audio is configured, it&#8217;s like a puzzle of jumper cables and only just figured it out 24 hours later with lots of frustration. <strong>Boy, do I hate </strong>the way Ubuntu 10.04 LTS handles the audio card configurations!!</p>
<p>Hope this will help anyone else getting their card to work.</p>
<h2>Related pages:</h2>
<ul>
<li>Mercury EZ view tv tuner card (Conexant CX 23881 chipset) &#8211; http://ubuntuforums.org/showthread.php?t=512551</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.lwp.ca/james/2010/05/linux-and-the-mercury-ez-view-tv-tuner-card/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Testing updates on the run</title>
		<link>http://www.lwp.ca/james/2010/04/testing-updates-on-the-run/</link>
		<comments>http://www.lwp.ca/james/2010/04/testing-updates-on-the-run/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 06:01:35 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.lwp.ca/james/2010/04/testing-updates-on-the-run/</guid>
		<description><![CDATA[This is a test to see what it&#8217;s like to post something from the wordpress iPhone app. Seems to be clearly for sple short posts or memos. No wysiwyg editor for some odd reason. I was hoping that this would be similar to squarespace&#8217;s iPhone app&#8230;]]></description>
			<content:encoded><![CDATA[<p>This is a test to see what it&#8217;s like to post something from the wordpress iPhone app. Seems to be clearly for sple short posts or memos. No wysiwyg editor for some odd reason. I was hoping that this would be similar to squarespace&#8217;s iPhone app&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lwp.ca/james/2010/04/testing-updates-on-the-run/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tethering with the iPhone 3Gs on Ubuntu Karmic Koala 9.10</title>
		<link>http://www.lwp.ca/james/2010/04/tethering-with-the-iphone-3gs-on-ubuntu-karmic-koala-9-10/</link>
		<comments>http://www.lwp.ca/james/2010/04/tethering-with-the-iphone-3gs-on-ubuntu-karmic-koala-9-10/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 17:53:15 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Cellphone]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ProTip]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Tips 'n Hacks]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.lwp.ca/james/?p=530</guid>
		<description><![CDATA[Ok, this seemed to be a headache for a good hour. Under Windows it was easy easy easy. It seems to be an issue with pairing and Internet Tethering being off and turned on without the iPhone being restarted and how Ubuntu handles the pairing over this transition. Most notable issue is that Network Manager [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, this seemed to be a headache for a good hour. Under Windows it was easy easy easy. It seems to be an issue with pairing and Internet Tethering being off and turned on without the iPhone being restarted and how Ubuntu handles the pairing over this transition.</p>
<p>Most notable issue is that Network Manager will just fail to connect to the bluetooth access point immediately. If you install blueman, a great bluetooth manager, you will get the message &#8220;Connection refused (111)&#8221; or something similar which is a little more helpful, but not quite. To fix this, follow these steps.</p>
<ol>
<li>Turn on tethering, on your iPhone click Settings &gt; General &gt; Network and turn on Internet Tethering. Tethering seems to be turned off by default on the iPhone.</li>
<li>Make sure that you delete all pairing with your iPhone in the bluetooth-manager (right click and go to preferences)</li>
<li>In your iPhone, go to Settings &gt; General &gt; Bluetooth, slide the computer paired connection, to the left and &#8220;Forget this Device&#8221;</li>
<li>Hold down the power button and restart your iPhone</li>
<li>In Ubuntu, right click bluetooth-manager and go to Preferences</li>
<li>Set your friendly name and then click Set up new Device&#8230;</li>
<li>On your iPhone enter the passcode on your laptop</li>
<li>Success on pairing!</li>
<li>On the computer make sure to check the option to use this as a network connection.</li>
<li>Test: Turn off your Wifi on the computer, and click the Network Manager icon, you should see 23:AF:45:BE:12:FA PANU or something similar. Click to connect.</li>
</ol>
<p><strong>Important notes:</strong></p>
<p>Wifi Issues</p>
<p>Bluetooth does not seem to work well with Wii connections that are active. I tend to get my bluetooth connections dropping out or just plain will not connect. So make sure if you are having problems at all, turn Wifi to remove one more variable from problem.</p>
<p>Cellular Provider</p>
<p>I am with Telus Mobility and they offer the ability to tether on all their smartphone/data plans.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lwp.ca/james/2010/04/tethering-with-the-iphone-3gs-on-ubuntu-karmic-koala-9-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Git to manage online website projects</title>
		<link>http://www.lwp.ca/james/2010/03/using-git-to-manage-online-website-projects/</link>
		<comments>http://www.lwp.ca/james/2010/03/using-git-to-manage-online-website-projects/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 20:25:33 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ProTip]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.lwp.ca/james/?p=522</guid>
		<description><![CDATA[I have recently been getting into using Git for my more complicated projects. After a bit of google foo, I came across some references to using Git to push and pull website updates. This post is my way of remembering how I set up new git repositories. I did not &#8220;figure&#8221; this out myself, but [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently been getting into using Git for my more complicated projects. After a bit of google foo, I came across some references to using Git to push and pull website updates. This post is my way of remembering how I set up new git repositories. I did not &#8220;figure&#8221; this out myself, but I have linked to the originator. But I did modify it slightly.</p>
<p><strong>Related material:</strong></p>
<ul>
<li>This is one of the websites that I used as a reference, quite a bit is the same, even the borrowed graphic:<br />
<a class="linkification-ext" title="Linkification: http://dmiessler.com/blog/using-git-to-maintain-your-website" href="http://dmiessler.com/blog/using-git-to-maintain-your-website">http://dmiessler.com/blog/using-git-to-maintain-your-website</a></li>
<li>Some basic information on Git usage<br />
<a class="linkification-ext" title="Linkification: http://www.kernel.org/pub/software/scm/git-core/docs/v1.2.6/tutorial.html" href="http://www.kernel.org/pub/software/scm/git-core/docs/v1.2.6/tutorial.html">http://www.kernel.org/pub/software/scm/git-core/docs/v1.2.6/tutorial.html</a></li>
</ul>
<p><strong>First how it works</strong><br />
The server has the htdocs of the live website as well as a htdocs.git as the central main repository. Everything will be pushed there, and once completed, automatically pulled into the live website. The structure is as so:</p>
<p><a href="http://www.lwp.ca/james/wp-content/uploads/2010/03/git-tree.gif"><img class="aligncenter size-full wp-image-523" title="git-tree" src="http://www.lwp.ca/james/wp-content/uploads/2010/03/git-tree.gif" alt="" width="263" height="316" /></a></p>
<p>Install Git on all systems, I use Debian.</p>
<p><span style="font-family: courier new;">sudo apt-get install git-core</span></p>
<p>On the server enter your websites htdocs:</p>
<p><span style="font-family: courier new;">git init</span><br />
<span style="font-family: courier new;">git add .</span><br />
<span style="font-family: courier new;">git commit -a -m &#8220;Initial import of project.&#8221;</span></p>
<p>Now we want to clone this repository.</p>
<p><span style="font-family: courier new;">cd ..</span><br />
<span style="font-family: courier new;">git clone &#8211;bare htdocs htdocs.git</span></p>
<p>On the local system now:</p>
<p><span style="font-family: courier new;">git clone ssh://<a class="linkification-ext" title="Linkification: http://root@lwp.ca/full/path/to/htdocs.git" href="http://root@lwp.ca/full/path/to/htdocs.git">root@lwp.ca/full/path/to/htdocs.git</a></span></p>
<p>On the server:</p>
<p><span style="font-family: courier new;">mv htdocs htdocs.backup</span><br />
<span style="font-family: courier new;">git clone htdocs.git</span></p>
<p>Note: htdocs.backup can be removed once the system is setup and working.<br />
<strong><br />
Final updates to the server</strong><br />
Due to the clone process, file permissions and ownership are now all root. So use the htdocs.backup to figure out what the file ownership/permissions were. Make sure that your new htdocs and all its sub files are back to normal.</p>
<p><span style="font-family: courier new;">chown -R vu2000:vu2000 htdocs</span></p>
<p><strong>Prevent the versioning of useless files</strong><br />
In the server repository edit htdocs/.gitignore, and make sure we do not back up cache directories and backup files *~ and config files. Do not add trailing slashes as this will prevent the exclude from working. Prep-ending slashes means the root of the git repo. By placing the .gitignore here, it will be part of the repository so anyone else working on the project will be using the same ignore rules.</p>
<p><span style="font-family: courier new;">*~</span><br />
<span style="font-family: courier new;">/wp-content/uploads</span><br />
<span style="font-family: courier new;">/cache</span><br />
<span style="font-family: courier new;">/users/uploads<br />
/configuration.php<br />
</span><br />
Now because we issued a &#8220;git add .&#8221; we should untrack files we don&#8217;t want to send back and forth.</p>
<p><span style="font-family: courier new;">git rm &#8211;cache configuration.php</span></p>
<p>Now when we do pushes and pulls we don&#8217;t have to keep updating our config file every time. We should make a backup however so we always have a copy.</p>
<p><span style="font-family: courier new;">cp configuration.php configuration.php.live</span></p>
<p><strong>Protecting the source</strong><br />
Also, place a file in all .git folders called .htaccess containing:</p>
<p><span style="font-family: courier new;">Deny from all</span></p>
<p>This will prevent visitors with crafty google foo to download and view source code files.</p>
<p><strong>Auto updating Live site</strong><br />
Now to enable auto updates when updates are pushed from offline dev machine to server.</p>
<p>On the server in our <a class="linkification-ext" title="Linkification: http://htdocs.git/hooks/post-update" href="http://htdocs.git/hooks/post-update">htdocs.git/hooks/post-update</a>, make sure it contains <strong>only</strong> the following:</p>
<p><span style="font-family: courier new;">cd ../htdocs</span><br />
<span style="font-family: courier new;">env -i git pull</span></p>
<p>Then make it executable</p>
<p><span style="font-family: courier new;">chmod +x post-update</span></p>
<p><strong>Done, now test</strong><br />
Now on the development machine make some changes and test.</p>
<p><span style="font-family: courier new;">touch &#8220;new file&#8221;</span><br />
<span style="font-family: courier new;">git add .</span><br />
<span style="font-family: courier new;">git commit -a -m &#8220;Testing first update&#8221;</span><br />
<span style="font-family: courier new;">git push</span></p>
<p><em>Yay! Everything should be working!</em></p>
<p><strong>Notes on usage.</strong></p>
<p>Updates on dev machine can be pushed to server like so:</p>
<p><span style="font-family: courier new;">git add .</span><br />
<span style="font-family: courier new;">git commit -a -m &#8220;This is an update&#8221;</span><br />
<span style="font-family: courier new;">git push</span></p>
<p>If changes were done on the server from some reason, navigate to the htdocs folder and run:</p>
<p><span style="font-family: courier new;">git add .</span><br />
<span style="font-family: courier new;">git commit -a -m &#8220;Changes made online&#8221;</span><br />
<span style="font-family: courier new;">git push</span></p>
<p>Then on your dev machine pull the updates.</p>
<p><span style="font-family: courier new;">git pull</span></p>
<p>If you need to check what has happened since the last update:</p>
<p><span style="font-family: courier new;">git status</span></p>
<p>Merge one branch into another:</p>
<p><span style="font-family: courier new;">git checkout master<br />
git merge myBugFixes</span></p>
<p>Delete your old branch:</p>
<pre>git branch -D myBugFixes
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lwp.ca/james/2010/03/using-git-to-manage-online-website-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Updates</title>
		<link>http://www.lwp.ca/james/2010/03/website-updates/</link>
		<comments>http://www.lwp.ca/james/2010/03/website-updates/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 02:17:06 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.lwp.ca/james/?p=512</guid>
		<description><![CDATA[I have been updating various pages throughout the site, mainly my Fresh Ubuntu install page which can be found under the Linux section. Over the next few days I will have more updates. I am also going to add a post on using Git and possibly include it in a post regarding rapid web development. [...]]]></description>
			<content:encoded><![CDATA[<p>I have been updating various pages throughout the site, mainly my <em>Fresh Ubuntu install</em> page which can be found under the <em>Linux</em> section.</p>
<p>Over the next few days I will have more updates. I am also going to add a post on using Git and possibly include it in a post regarding rapid web development. However both are pretty big and can be quite complex topics.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lwp.ca/james/2010/03/website-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic database backup via script</title>
		<link>http://www.lwp.ca/james/2010/02/automatic-database-backup-via-script/</link>
		<comments>http://www.lwp.ca/james/2010/02/automatic-database-backup-via-script/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 19:13:16 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ProTip]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tips 'n Hacks]]></category>

		<guid isPermaLink="false">http://www.lwp.ca/james/?p=475</guid>
		<description><![CDATA[As mentioned before somewhere in my blog, here is the script I have written to back up my databases. This is actually my local backup script, I have a much different one on the server which uses a passwordless ssh connection to backup the databases offsite. #!/bin/sh # Database backup 2008 &#60;jemmrich@gmail.com&#62; # Nightly Usage: [...]]]></description>
			<content:encoded><![CDATA[<p>As mentioned before somewhere in my blog, here is the script I have written to back up my databases. This is actually my local backup script, I have a much different one on the server which uses a passwordless ssh connection to backup the databases offsite.</p>
<pre>#!/bin/sh
# Database backup 2008 &lt;jemmrich@gmail.com&gt;
# Nightly Usage:
# 0 0 * * * /home/james/Dropbox/Home/mobilewolf/scripts/backup.sh &amp;&gt; /dev/null

LOGFILE="/home/james/Dropbox/Home/mobilewolf/databases/databases.log"
BACKUPDIR="/home/james/Dropbox/Home/mobilewolf/databases"
STARTTIME="$(date +%Y-%m-%d-%r)"

# MySQL Login
SQLUSER="sqluser"
SQLPASS="sqlpass"

# Dump databases
echo "*** Database Backup Started: $STARTTIME" &gt;&gt; $LOGFILE

# Keep yesterdays databases
rm -f $BACKUPDIR/yesterday/*
mv $BACKUPDIR/*.gz $BACKUPDIR/yesterday/

for i in `echo "show databases" | mysql -u $SQLUSER -p$SQLPASS | grep -v Database`;
do
 mysqldump -u $SQLUSER -p$SQLPASS $i &gt; /tmp/$i.sql
 echo $i &gt;&gt; $LOGFILE
 gzip /tmp/$i.sql

 # Send Databases
 cp /tmp/*.sql.gz $BACKUPDIR/

 # Remove our dumps to keep us clean
 rm -f /tmp/*.sql.gz
done

echo "*** Database Backup Ended: $(date +%Y-%m-%d-%r)" &gt;&gt; $LOGFILE
echo "\n" &gt;&gt; $LOGFILE</pre>
<p><strong>Setup</strong></p>
<ol>
<li>Change the user and password to a user that has ability to access all databases for dump</li>
<li>Download and set executable permissions chmod +x backup_databases.sh</li>
<li>edit cron to execute every night: crontab -e</li>
<li>add: 0 0 * * * /home/james/Dropbox/Home/mobilewolf/scripts/backup_databases.sh &amp;&gt; /dev/null</li>
</ol>
<p><strong>Ideas for your setup</strong></p>
<ul>
<li>The line following &#8220;Send databases&#8221; replace cp, with scp to send the databases to remote server. You will need to have passwordless ssh connections setup.</li>
<li>Have the log file emailed to you once completed</li>
</ul>
<p><strong>My Future Improvements</strong></p>
<ul>
<li>Enable backup archiving for the past week rotated daily so I can go back to a database from 2 or 3 days or even a week ago</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.lwp.ca/james/2010/02/automatic-database-backup-via-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

