<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://anthology.spacemonkeys.ca/feeds/atom.xml" rel="self" title="Anthology of Interest" type="application/atom+xml" />
    <link href="http://anthology.spacemonkeys.ca/"                        rel="alternate"    title="Anthology of Interest" type="text/html" />
    <link href="http://anthology.spacemonkeys.ca/rss.php?version=2.0"     rel="alternate"    title="Anthology of Interest" type="application/rss+xml" />
    <title type="html">Anthology of Interest</title>
    <subtitle type="html">Bastard coated bastard with a creamy bastard centre</subtitle>
    <icon>http://anthology.spacemonkeys.ca/templates/default/img/s9y_banner_small.png</icon>
    <id>http://anthology.spacemonkeys.ca/</id>
    <updated>2010-08-12T02:28:47Z</updated>
    <generator uri="http://www.s9y.org/" version="1.0">Serendipity 1.0 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://anthology.spacemonkeys.ca/archives/946-Mythbuntu-upstart-job-to-set-channel-3.html" rel="alternate" title="Mythbuntu upstart job to set channel 3" />
        <author>
            <name>Matt Hughes</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2010-08-12T02:28:47Z</published>
        <updated>2010-08-12T02:28:47Z</updated>
        <wfw:comment>http://anthology.spacemonkeys.ca/wfwcomment.php?cid=946</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://anthology.spacemonkeys.ca/rss.php?version=atom1.0&amp;type=comments&amp;cid=946</wfw:commentRss>
    
    
        <id>http://anthology.spacemonkeys.ca/archives/946-guid.html</id>
        <title type="html">Mythbuntu upstart job to set channel 3</title>
        <content type="xhtml" xml:base="http://anthology.spacemonkeys.ca/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I switched to digital cable recently, which means that there is now an external cable box for tuning.  That means the analog tuner on my mythbox must be set to channel 3 to receive the input from the cable box.  Unfortunately, <tt>ivtv-tune</tt> has a quirk that made it difficult to get the PVR-250 tuned to channel 3.  The problem is that <tt>ivtv-tune</tt> needs the HOME environment variable to be set, and it needs there to be a ~/.ivtv-tune file there.  Finally I got it working with this upstart script:</p>

<pre><tt>
# Ensures the PVR 250 card is set to channel 3 so that the cable box works.

description "Ensures the PVR 250 card is set to channel 3"
author "Matt Hughes <matt.c.hughes@gmail.com>"

start on mounted
stop on starting shutdown 

task

console output

script
echo "Changing tuner to channel 3..."
export HOME=/tmp
echo "device /dev/video0" > /tmp/.ivtv-tune
echo "freqtable us-cable" >> /tmp/.ivtv-tune
exec /usr/bin/ivtv-tune -c 3 -d /dev/video0
end script
</tt></pre>

<p>Now the ir-blaster can do it's thing and everything works.  As a side note, if your remove control stops working, you should replace the batteries be for messing with the LIRC configuration, even if you just updated your kernel.   !$!@#$@# Linux.</p> 
            </div>
        </content>
        
    </entry>

</feed>
