Configure Gadmei USB TV Box TVR200 in Linux

I have an old GADMEI USB TV BOX, in the back it says MODEL: TVR200. I haven’t use this since few years ago in Windows. I am planning to learn a little bit about Wii homebrew, so I thought if I can use my computer as display, I don’t have to go back and forth to my TV. When I plugged the USB TV BOX, the kernel display some messages about em28xx:

[ 3662.345631] em28xx #0: Your board has no unique USB ID and thus need a hint to be detected.
[ 3662.345634] em28xx #0: You may try to use card= insmod option to workaround that.
[ 3662.345636] em28xx #0: Please send an email with this log to:
[ 3662.345638] em28xx #0: 	V4L Mailing List 
[ 3662.345640] em28xx #0: Board eeprom hash is 0x00000000
[ 3662.345643] em28xx #0: Board i2c devicelist hash is 0xc51200e3
[ 3662.345645] em28xx #0: Here is a list of valid choices for the card= insmod option:
[ 3662.345647] em28xx #0:     card=0 -> Unknown EM2800 video grabber
[ 3662.345650] em28xx #0:     card=1 -> Unknown EM2750/28xx video grabber
[ 3662.345652] em28xx #0:     card=2 -> Terratec Cinergy 250 USB
[ 3662.345654] em28xx #0:     card=3 -> Pinnacle PCTV USB 2
[ 3662.345656] em28xx #0:     card=4 -> Hauppauge WinTV USB 2
[ 3662.345659] em28xx #0:     card=5 -> MSI VOX USB 2.0
[ 3662.345661] em28xx #0:     card=6 -> Terratec Cinergy 200 USB
[ 3662.345663] em28xx #0:     card=7 -> Leadtek Winfast USB II
[ 3662.345665] em28xx #0:     card=8 -> Kworld USB2800
[ 3662.345667] em28xx #0:     card=9 -> Pinnacle Dazzle DVC 90/DVC 100
[ 3662.345670] em28xx #0:     card=10 -> Hauppauge WinTV HVR 900
[ 3662.345672] em28xx #0:     card=11 -> Terratec Hybrid XS
[ 3662.345674] em28xx #0:     card=12 -> Kworld PVR TV 2800 RF
[ 3662.345676] em28xx #0:     card=13 -> Terratec Prodigy XS
[ 3662.345679] em28xx #0:     card=14 -> Pixelview Prolink PlayTV USB 2.0
[ 3662.345681] em28xx #0:     card=15 -> V-Gear PocketTV
[ 3662.345683] em28xx #0:     card=16 -> Hauppauge WinTV HVR 950
[ 3662.685938] em28xx #0: V4L2 device registered as /dev/video0 and /dev/vbi0

So I tried modprobe em28xx card=0 and then card=1, and then card=2, thankfully it worked with card=2. I used tvtime program to see the output of the usb tv. To make it permanent, add this line:

options em28xx card=2

to your /etc/modprobe.conf, or create a new file (any name is fine) at /etc/modprobe.d and fill it with that line. Note: audio is not working yet, but I don’t really need it right now.

Hotlink Protection in Hostmonster's CPanel

So far I have been quite happy with hostmonster’s performance and quality. It is not really that good, but for the price, I get what I pay for. There is this one problem in the Hotlink Protection that I never bother to fix.  Sometimes ago, I enabled hotlink protection, and when I tried to disable it, suddenly all of my WordPress blogs permalinks stops working. I didn’t know what was wrong, and I just re-enabled the hotlink protection. Today I found out that the problem is in CPanel, it removes the "RewriteEngine  on" line from the .htaccess files when you turn off the hotlink protection (after turning it on).

Re-adding the "RewriteEngine on" to the first line of the .htaccess files fixed that. I have several blogs, so editing one by one will take a long time, so I did the editing from command line. Inserting a text to the first line of a file can be done using sed:

sed -i '1i\RewriteEngine on' $i filename

And to change a lot of files at once you can do this (bash shell):

for i in dir1/.htaccess dir2/.htaccess  ; do sed -i '1i\RewriteEngine on' $i; done