Thursday, January 10, 2008

Linux and the HVR 950

Just purchased a Hauppauge WinTV-HVR-950, which is essentially a small USB device that acts as an analog / digital television tuner. Not only can one tune into new digital over-the-air broadcasts, but also HD programming as well. Using a home-made DB2 antenna, I am able to pull in 31 digital channels including 6 HD channels. This was a very pleasant surprise :)

My ultimate goal is to connect this tuner to my PC and the PC to my old HD television so that I can get over-the-air digital channels and rid myself of cable. I attempted to get the tuner working with Ubuntu 7.10 (Gutsy) using this guide ( http://lunapark6.com/usb-hdtv-tuner-stick-for-windows-linux-hauppauge-wintv-hvr-950.html)

This guide ( http://parker1.co.uk/mythtv_ubuntu.php) was also helpful in my attempt to set up MythTV. Unfortunately, I did not succeed in getting the software to work. I may try again at a future date. I was able to get the tuner to work with a few simple command line utilities though. I installed the following packages in Ubuntu:

dvb-utils, dvbsnoop, dvbstream, dvbtune

These utilities allowed me to scan all digital channels identified by the receiver. The scan takes a few minutes, so be patient. Also look at the other example scan files in the dvb-utils directory. Another may be more directly applicable, depending upon your location and interests.

sudo /usr/bin/scan /usr/share/doc/dvb-utils/examples/scan/atsc/us-ATSC-center-frequencies-8VSB > channels

This gives output like the following to a file called channels:

WBFF-HD:665028615:8VSB:49:52:3
Good TV:665028615:8VSB:65:68:4

Dont be surprised if you get allot of output on the command line...it complained about every unavailable channel for me. The information above includes the name of the channel, frequency, and encoding. To tell the tuner to tune into a channel, use a command like the following:

azap -r -c channels "Good TV"

Note that we are using 'azap' (for ATSC digital programming). See http://www.linuxtv.org/wiki/index.php/Zap for more information.

Finally, the following command will stream the output of the tuner directly to mplayer for display on the screen:

mplayer /dev/dvb/adapter0/dvr0 -cache 8192 -framedrop -vo x11

I have successfully tuned into standard and HD digital broadcasts using this simple technique.

Friday, December 14, 2007

Installed Packages

I've been searching for an easy way to itemize all installed packages on a Debian / Ubuntu system, but just found it today. To list all installed packages,

dpkg --get-selections > installed-software

Now, you can use this list to re-install an existing system or duplicate its configuration on a new system:

dpkg --set-selections < installed-software

Finally, run deselect to make the selection changes take effect!

dselect

Thank you to Ubuntu Forums for the answer: http://ubuntuforums.org/showthread.php?t=261366

Monday, December 03, 2007

Finishing my previous thought

After expanding the virtual disk and the partition, simply run resize2fs on the device of interest and the filesystem (EXT2 or EXT3) will be expanded to occupy the full extent of the partition :)

Virtual Disks

Expanding a virtual disk in VMWare is very simple:

vmware-vdiskmanager -x 10GB myDisk.vmdk

Just remember that you still have to expand the partition and the filesystem living on that partition as well. Thanks to http://4sysops.com/archives/expanding-a-virtual-vmware-disk/ for the information!

Monday, October 29, 2007

a simple reminder

Two things today...first, a simple way to determine how much work you are causing your laptop harddrive:

 sudo smartctl -a /dev/sda | grep Load_Cycle_Count

Apparently anything above 600000 means your drive is about to kick the bucket :(

I've always wanted an easy way to pop up a reminder message at some point in the future from the command line on a Linux system. I wonder why it took me so long to find the answer?

 echo "DISPLAY=$DISPLAY zenity --info --text='go home'" | at "5pm"

Thursday, October 25, 2007

another vim trick

Just found this amazing tip which allows VIM to automatically open a GPG encrypted text file, edit it, and save it back to disk in encrypted form without writing the unencrypted data to a buffer. Thank you Wouter Hanegraaff!

Friday, September 14, 2007

The Internet from Afar

I recently attempted to fire up an instance of Firefox on a remote system that I was connected to through SSH (with X forwarding enabled). I remember doing this back in the day with no problems. However, Firefox apparently has a "feature" now that checks the DISPLAY settings and starts the process locally if you attempt to run it over the remote connection. This behavior seems to be counter-intuitive and unwanted. Someone somewhere decided to start treating users as idiots. Now for the fix:

 firefox -no-remote

Of course this option is not mentioned in the help menu...