Bob's Notepad

Notes on projects I have done and things I have learned saved for my reference and for the world to share

Sunday, September 30, 2007

Google Repositories (apt-get)

Add this line to /etc/apt/sources.list

  • deb stable non-free

Import the key by running this

  • wget -q -O - | apt-key add

Then of course run "apt-get update" and your ready to instantly install Google's apps using apt-get.

Labels: , , , ,

Reference Link

Tuesday, September 25, 2007

System Rescue CDs

I just wanted to put a little note here because I was reminded tonight of 2 very good rescue CDs that I have used in the past and I highly recommend to anyone who has a broken system (Linux, Windows, and I think even Mac).

The first and primary CD that I carry in my arsenal when I go on jobs is SystemRescueCD. This Linux distro is based on GenToo -- but fear not as there is no knowledge of GenToo required. The CD boots and detects just about any hardware you can throw at it and has a lot of VERY useful tools for recovering data and fixing stuff. The kernel has NTFS support built into it and the distro includes ntfs3g. There are also tools that rival (and maybe beat) PartitionMagic. It's also extremely handy for booting a system in a data center and letting a customer access the machine remotely (great for remote hands type services) as it includes setup scripts for networking and for starting sshd.... so you could walk even the most novice (ok, not all, I'll admit) techs. They also now have a PPC distro which theoretically will let you recover even MaxOS systems -- but I havent had the opportunity to try this yet.

You definately don't want to be without this CD if you do any kind of computer services. You'd be amazed at how handy it is.


The second CD is the same similar idea but it's based on Debian with an Ubuntu kernel. The name of this one is Kanotix. The advantage this CD has over SysRescueCD is that it allows you to apt-get applications on the fly. It also has a slightly different hardware driver selection but you'll probably find it has the majority of what you need. I'm definately a synaptics fan but this is still only my second choice for recovering systems because I think SysRescueCD definately has the streamlining down and makes quick tasks remain just that: quick tasks.

This is still something that you want to keep in your arsenal. There have been a few situations where SysRescueCD didn't cut it for me and I pulled out Kanotix and it worked fine. It's also handy if you have some advanced stuff that you need to work on since you can easily apt-get utilities that you may need.


Labels: , , , , , , ,

Reference Link

Wednesday, September 19, 2007

Making TrixBox not like TrixBox

Today I was hammered with information about why TrixBox is starting to suck..... my easy-to-install VoIP solution was recently acquired by fonality who wants to make it an easy-to-pay-them VoIP solution. Fear not... I have been provided with solutions from my friend over at eicomm.

Those of us who like open source and VoIP solutions and are lazier than most have a new hero: Tom King

Right now the currently solution is to install TrixBox and then run the script from Tom's site ( Yes -- this will break a lot of the trixbox functionality but from what I'm reading this is exactly what you want to do.

Of course, if you have lots of money you can go with TrixBox Pro which does offer some cool features such as online backup and sync.... but for those of us that are maintaining systems for Non-Profit organizations and for personal hobby, well, that just isn't an option.

So basically, if you want paid solutions, look no further than TrixBox Pro but if you want real open source, visit Tom's site above and see what he currently has cooking. As of this post, he is working on a bare centos5 script which will seemingly be the way to go once he releases it.

Thanks Tom!

Labels: , , ,

Reference Link

Sunday, September 09, 2007

MythArchive on a seperate front end machine

Apparently MythBuntu (and MythTV under Ubuntu) will only support MythArchive if it is on the same machine as the backend. Basically, if you have a backend only machine you are unable to burn your recordings to a DVD from your front end machine. There is currently a bug open (118700) but, sadly, it doesnt seem like anyone has an interest in fixing it soonish. The good news is there is a very easy solution to the problem.

First, mount your recordings directory from your backend server on to your front end machine. This requires installing nfs.

apt-get install nfs-user-server
nano /etc/exports

Add this line: /var/lib/mythtv/recordings
(Make sure you replace the IP address with your front end's IP)

/etc/init.d/nfs-user/server restart

Now you need to mount that on your front end machine.

apt-get install nfs-client
nano /etc/fstab

Add this line: /mnt/recordings nfs
(Replace that IP address with your backend's IP; Make sure /mnt/recordings exists)

mount -a

Now you need to add an entry to the mythconverg database. You can do this from either machine.

mysql -h -u mythtv -p mythconverg
(Replace the IP with your database server - usually same as your backend)

Now you need to run this command at the mysql prompt:

insert into settings (value, data, hostname) VALUES ('RecordFilePrefix', '/mnt/recordings', 'myth-frontend');
(You'll need to change myth-frontend to whatever the hostname is of your front end)

That should take care of it
DISCLAIMER: I am not a database guy.... I don't even fully understand what that command does. I am simply taking information from the bug report and putting it in to a step by step list. I can confirm that this worked for me in my situation and it most likely will work for you.

Labels: , ,

Reference Link

Saturday, September 08, 2007

MythMusic with iTunes

Now that I am putting more effort into MythTV being the control of entertainment in my house, I've begun working on the MythMusic application. Currently I use iTunes on my iMac for my music library which syncs with my iPod and scrobbles tracks to The last thing I want is another application that I need to keep synced. Here are things I found to make life a little easier/

Trick #1: Share your iTunes Music folder via NFS

On my Mac I moved my iTunes store folder to /music-lib/ rather than the directory it uses by default. My primary reason for doing this was nothing more than the default folder contains a space in the name and this makes things a little harder for NFS. Once all your MP3 files are there, we need to set up the NFS share.... which really isn't all that hard. I used the following guide to do this:

Note: On Windows you could substitute this process to use Samba and adjust accordingly

Now you need to mount that share on all applicable MythTV machines. Currently I use Mythbuntu and I have a primary backend machine and 2 front end only machines. First thing you'll need to do is "apt-get install nfs-client" to allow Mythbuntu to connect to an NFS share. Once that's installed, create an empty directory to mount your music in. I created /mnt/music/ for my systems. Now add the following line into your /etc/fstab file on all of your myth machines:

SERVER:/music-lib /mnt/music nfs
(Substitue SERVER with your iTunes' machines IP address and adjust the share names as needed)

Now what's left is to go into the mythmusic settings and change the recordings directory to /mnt/music.

You're ready to listen to music!

Trick #2: iTunes Playlists

So MythMusic has an extreme lack of intuitive playlist editting.... actually, you can't even call it a playlist editor. I want an easy was to use my iTunes playlists. Two people have done an amazing job at a perl script that takes care of a conversion and imports the iTunes playlists into your mythconverg database.

Grab that perl script and throw it on the machine that serves as your mythtv backend. On mythbuntu you need to install XML:Parser which can be done by "apt-get install libxml-parser-perl". Edit the variables at the top of that script and do a chmod +x on the perl script. If you have multiple machines, you will need to run the script different times with the hostname set as each of the myth machines you want the playlists to be active on.

Before you run that script, you need to make sure the iTunes library XML file is in your music-lib directory. I renamed mine to exclude spaces and then copied it to the music-lib directory on my iMac.

Run the script and you should now have playlists in MythMusic.

Trick #3: Automate Trick #2

I have a lot of smart playlists and I am often creating new playlists and, of course, always adding new music to my library. I don't want to have to do this everytime I make an update so I automated the process. I created a script on my iMac to copy the "real" iTunes XML file into the music-lib directory every hour. OSX has dropped the use of cron and replaced it with launchd. Here is a guide you can use to get this set up:

Once that's set up, you need to set up a crontab on your myth system(s) to run the perl script. If you do this hourly, make sure you set your iTunes computer to copy the file before the crontab runs on your myth machines. For instance, make your itunes machine run on minuet 05 and the myth machines run on 08.

Now you're set.... things should automatically update for you.

Trick #4: Scrobble to your account

I use an awful lot and if I start using MythMusic over iTunes, I lose that scrobbling. I have not completed this yet (or even really began looking at it) but here is a link where you can get a patch. I need to figure out how to apply this on an active mythbuntu system. I'll report back when/if I come up with something :)

Labels: , , , , , ,

Reference Link

Tuesday, September 04, 2007

Mythbuntu: My new favorite MythTV solution

As much as I love KnoppMyth and it's ease of installation I have constantly ended up haunted by the lack of upgradeability. If you even think about using apt-get, the system cries and stops working. It's an amazing distro but if you run into a problem with it not playing nicely with some hardware device you have or you get a cool idea that you want to implement, you're most likely going to render your box useless once you start tinkering.

So I installed Mythbuntu last night and.... WOW. I ran into a hardware incompatibility with the new machine I was building. I have a dual opteron 246 mainboard that I wanted to use as my mythbuntu system but the issue was with compatibility with PCI-X and PVR-150's. I have 2 of the older PVR-150 retail versions (these are the cards that the new knoppmyth and it's ivtv version were having issues with) and a PVR-150 MCE version. I also have a Chaintech 710 sound card (*HIGHLY* recommended by me for anyone who wants 5.1). The mainboard only has 1 32 bit (5v) slot and the sound card runs only at 5v. All of the PVR-150's run at either 3.3v or 5v but there is apparently something in the chipsets of the PVR-150 retail versions that make them inoperable in a PCI-X slot. The MCE version works fine so I had a choice of either my chaintech card or a second tuner because the PVR-150 Retails would work fine in the 32 bit slot but the machine wouldnt boot if they were in a PCI-X slot. I have a Sound Blaster Live card so I figured I'd try it and it worked until I wanted to do the digital 5.1 and then hell broke lose which is the same results in ANY distro including KnoppMyth..... so I opted to make that my server and build a seperate front end machine.
Note: Hauppauge will apparently update your PVR-150 to work with PCI-X but who has time for that? :P See this link.)

I can not tell you how easy the install was. In Mythbuntu you can select advanced configuration and select any configuration you want. You have options of the following:

  • Master backend and Front end
  • Secondary backend and Front end
  • Master backend only
  • Secondary backend only
  • Front end only

In all of these configurations, the plugins are installed and 100% working..... installation of the frontend machine asks you for the address and login information for the primary backend and.... it's running.

One thing even more amazing about Mythbuntu.... since I wasn't going to have any PVR-150's in my front end, the use of my Hauppauge remote control wasn't an option. Years ago I bought a StreamZap USB remote control which I previously tried to use on KnoppMyth and I eventually gave up. I decided I'd fight with it in this scenario and dug it out of the "archives" .... Mythbuntu asked me what remote I had and StreamZap was actually an option. When the system booted the remote worked without a single bit of configuration from me. The only thing that I think I need to do is configure the red button for delete like my Hauppauge remote was.... other than that, it's working great even in the DVD program.

Mythbuntu also puts the display to sleep automagically.... if you're sitting at a menu for a while, the screen will go into sleep mode and as soon as you press a button on the remote it will turn back on. This is a huge advantage for me because there are times I'll fall asleep while watching TV and the fact that my 19" CRT is going to sleep is a great savings in energy costs.

Another thing is the DVD player. I adjusted my general settings to use /dev/adsp for the SPDIF port and I figured I'd have to set up the DVD seperately.... I put a DVD in to see what state it was in and not only did my audio come out of the SPDIF optical port but my receiver went to digital mode..... Mythbuntu handles everything with the DVD player internally so there aren't any options that you need to pass... it's very impressive.

For everyone's reference, here is my configuration

  • Server:
    • Tyan S-2882D Mainboard
    • (Qty: 2) Opteron 246 - 2ghz
    • 4GB DDR333 Crucial (128bit mode)
    • 3ware 7500-8 Raid Controller
    • (Qty: 8) 250GB Western Digital SATA drives (Raid 5)
    • Hauppauge PVR-150 Retail version (26052)
    • Hauppauge PVR-150 MCE

  • Front End:
    • Intel 815 Server Board
    • Pentium 3 @ 1.2ghz
    • 512MB PC133 Ram
    • 40GB IDE Seagate
    • Lite-On DVD Burner
    • Chaintech AV-710 with optical out
    • StreamZap USBIR2 Remote Control

I really like the front end being the configuration it is. I was a bit concerned about the Pentium 3 with only 512MB of RAM (thats all the 815 chipset supports) but it runs incredibly smooth.... the network keeps up, the CPU keeps up.... no slow downs at all. The best part about it is all it has is a VERY low speed fan on the power supply and a cpu cooler.... the box makes almost no noise at all. Right now the server is sitting next to eat but I will be moving that to my crawlspace eventually and it should get really quiet in my living room :)

Here are some URLs for anyone interested in some of the things above:

  • (Chaintech AV-710)

    • I really can not recommend this card highly enough. It worked flawlessly on my KnoppMyth box as well as this Mythbuntu box. The quality is amazing.... and the Envy24 chipset is so much enjoyed by linux distros. If you're just getting into MythTV I would highly recommend not even thinking about touching a Creative Labs sound card (that is, if you want anything more than standard 2 channel). Their chipsets are a 3 ring circus and it's always a nightmare

  • StreamZap USB Remote control
  • Mythbuntu
    • My installation was based on Alpha 4..... so far I have seen no reason why this is still considered Alpha.... I havent run into an issue yet.

Keep in mind I have only been running this set up for 24 hours but I have had a very large queue of recordings and I'd say more than half of that time the system was recording two shows at the same time. I haven't tested all of the plug ins yet (like mythweb, archive, etc) but from navigation it appears they are installed and operating.


  • Installation is quite easy. KnoppMyth may be a touch easier for someone who hasn't a clue about linux but if you know even a tiny bit of computer hardware and the ideas behind the OS, this is a piece of cake.
  • MythBuntu has a sleep function for the monitor out of the box
  • Mythbuntu has a front end only installation option as well as a front end live CD option
  • Mythbuntu is designed from the ground up to be placed in multiple machine configurations. Having mutliple backends and frontends is a breeze
  • Using 5.1 optical on the Chaintech is as simple as changing your audio device in myth setup to /dev/adsp - and it takes it from there (including DVD player)
  • The base system is 100% Ubuntu and is designed with the Ubuntu repositories in mind. Updating packages appears to be no issue at all.
  • Supports my StreamZap USB remote which I previously had not been able to get to work easily
  • Gives you the option to set up VNC access during the install
  • Allows you to select plugins rather than forcing you to install all of them

There is no doubt that this is now my MythTV distro of choice. MythDora has got some great reviews but I'm not such a fan of RPM based distros so when looking for a KnoppMyth replacement I decided to try Mythbuntu - and I'm glad I did.

Please keep in mind that KnoppMyth is still considered a great distro to me. It works flawlessly in what it does but I just sometimes feel trapped by it. That trapped feeling is a trade off, however, as it is designed with the widest automatic support of hardware and it can generally have you set up and running without many technical questions at all.

As far as I'm concerned, KnoppMyth, Mythdora, and Mythbuntu are all very great options but I think Mythbuntu fits into my scenario (as well as many other's) the best.

Labels: , ,

Reference Link