20 December 2014

Blank Kodi/XBMC MythTV channel icons

When mapping channel icons in my MythTV, they were showing up as blank! After some research, I determined this is the result from the removal of absolute paths from icon path in MythTV. Fixing this is a simple 2 step process.

  1. Create a new storage group in MythTV called "ChannelIcons" and map it to the directory with all the icons, Typically: /home/mythtv/.mythtv/channels
  2. Delete the cached empty icons off XBMC. On the firetv, they were located here: /storage/sdcard0/Android/data/org.xbmc.xbmc/files/.xbmc/userdata/addon_data/pvr.mythtv.cmyth/cache/channels
I used adb to remove the files:
adb kill-server
adb connect 192.168.1.XXX
adb shell
cd /storage/sdcard0/Android/data/org.xbmc.xbmc/files/.xbmc/userdata/addon_data/pvr.mythtv.cmyth/cache/channels
rm *.jpg *.png

Software versions:
Ubuntu 14.04
MythTV 0.27
XBMC Kodi 14 release candidate

Amazon Fire TV as a XBMC MythTV Frontend

Amazon FireTV + XBMC + MythTV

I am quite pleased with using the Amazon FireTV as my MythTV Frontend using Kodi(was XMBC) and the myth plugin. Here are my overall views on the FireTV.

  • Wireless Streaming works well across the 5GHz band (YMMV)
  • Quad Core in Fire TV can decode MPEG2 video without a stutter
  • One streaming box to do Amazon Prime, Netflix, and MythTV
  • HDMI CEC can turn on the TV
  • Amazon Prime streaming starts instantly

  • XBMC 14 release candidate seems to be unstable on the box, changing recordings causes it to crash
  • Cannot launch XBMC from the Fire TV home screen (must used buried application menu or FiredTV launcher that works most of the time)
  • No power-off function (must wait for it to time-out)

Other Thoughts/TBD:
  • PLEX works well with streaming CBS and CW shows as well as many others

  1. Download Kodi and FiredTV
  2. Enable ADB on Fire TV
    1. Settings
    2. Developer Options
    3. ADB -> On
  3. Determine IP Address of Fire TV
    1. Settings
    2. About
    3. Network
  4. Install ADB on your computer
    • apt-get install android-tools-adb
  5. Start the adb connection
    1. adb kill-server
    2. adb connect <ip-address>
  6. Install the 2 apks
    1. adb install path/kodi.apk
    2. adb install path/firedtv.apk

Xubuntu adb sideload Lollipop onto Nexus 5

As I was tired of waiting on the OTA to download directly to my phone, I decided to sideload it myself. Luckily, sideloading does not require root or an unlocked bootloader.

I followed this guide by Droid Life, but had to preface all adb commands with sudo as I was running it from my linux box. http://www.droid-life.com/2013/02/12/guide-how-to-use-adb-sideload-to-update-a-nexus-without-root-or-custom-recovery/

Fixing Tab in Xubuntu 14.04

One thing that was really annoying me was that on my Xubuntu 14.04 server, tab would switch windows by itself without holding alt. This was messing up my tab completion and putting tabs in files when using one of my VNC sessions.

After a bit of googling, I came across this forum which had other users experiencing the same problem: http://ubuntuforums.org/archive/index.php/t-1771058.html

The solution was simple.
  1. Edit this file: ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
  2. Find this line:
  3. Change it to this:
  4. Restart any session including VNC ones

13 October 2014

Hiding partitions in Xubuntu 14.04

Hiding partitions in Xubuntu 14.04

After installing Xubuntu 14.04 LTS, it put an sda1 icon on my desktop, which was my boot drive, and I did not want it to keep showing up. Here are the steps that I went thru to prevent it.

1. Create or edit the udev rules:
sudo vi /etc/udev/rules.d/99-hide-disks.rules

2. Add the following lines where sda1 is the drive you want to hide:

3. Then reboot the system.

21 September 2014

Update to VNC: tightvncserver instability

Update to http://zmodemz.blogspot.com/2010/03/ubuntu-vnc.html

tightvncserver was crashing on me when doing simple things like opening file manager. I was getting the following error:

Sep 14 00:21:45 servername kernel: [440445.907880] Xtightvnc[12447]: segfault at 7fffaf355000 ip 0000000000448a2e sp 00007fffaf352c80 error 6 in Xtightvnc[400000+178000]

Turns out that the instability is just in this version of tightvncserver, should be fixed in 1.3.10. So for the time being, I swapped out tightvncserver for vnc4server. The commands are identical as far as I can tell, so the switch was easy.

Software Versions:
Xubuntu 14.04.1 LTS (Trusty Tahr)
tightvncserver 1.3.9
vnc4server 4.1.1

20 September 2014

MythTV 0.27 backend setup

As I wanted my new server to act as a DVR, I decided to go with MythTV as my backend.

Install MythTV (server only, I will have separate frontends):

  1. Install htdigest (for password protecting MythWeb):
    • sudo apt-get install apache2-utils
  2. Install mythtv-backend-master (and all dependencies)
    • sudo apt-get install mythtv-backend-master
    • Answered yes to password protect MythWeb
    • Told it that MythWeb would not be the only thing running on Apache
    • Told it other computers would be connecting to it (remote frontends)
  3. Ran mythtv-setup
    1. Changed database password to match the one in /etc/mythtv/config.xml
    2. Changed it to listen on 192.168.1.XXX instead of
    3. Also change the backend ip to the same (learned this the hard way)
    4. Added my HDHomeRun Dual tuner (must do twice once as tuner 0, second as tuner 1)
    5. Created an OverAir video group (use EIT)
    6. Put both tuners in this group
    7. Scanned for channels
  4. Enable remote connections in mysql (learned this the hard way):
    1.  Change the bind-address in /etc/mysql/my.conf
      • bind-address            = 192.168.1.XXX
    2. Restart mysql
      • sudo service mysql restart

Software Versions:
Xubuntu 14.04.1 LTS (Trusty Tahr)
MythTV 0.27


Make sure MythWeb password protection is on. In /etc/apache2/sites-enabled/mythweb.conf the following lines should be un-commented:
        AuthType           Digest
        AuthName           "MythTV"
        AuthUserFile       /var/www/htdigest
        Require            valid-user
        BrowserMatch       "MSIE"      AuthDigestEnableQueryStringHack=On
        Order              allow,deny
        Satisfy            any

Restart apache: sudo service apache2 restart
For more info see: http://www.mythtv.org/wiki/Securing_MythWeb

Error: "mythtv cannot connect to database":

My remote frontend was unable to connect to my backend mysql database until I changed /etc/mysql/my.cnf to allow remote connections by changing bind-address from to 192.168.1.XXX (server ip)

Mythfilldatabase returning an error about no version response, really slow backend connections, and constant backend crashes:

Turns out that when changing the ip to listen on from to 192.168.1.XXX, you HAVE to make sure to also change the backend ip from to 192.168.1.XXX

10 September 2014

ZFS: quota, compression, and encryption

Here is how I used ZFS to setup my storage drive.

Initial setup:

Get the ZFS package:
    sudo apt-get install zfs-fuse

Find your drives:
    ls /dev/disk/by-id/

Create the array:
    sudo zpool create storage mirror /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-SERIAL#1 /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-SERIAL#2

Check pool status:
    sudo zpool status


Create a new zfs container:
    sudo zfs create storage/mythtv

Set the storage limit (quota):
    sudo zfs set quota=1T storage/mythtv


Create a new zfs container:
    sudo zfs create -o compression=on storage/.encrypted

Or to turn on compression on an existing container:
    sudo zfs set compression=on storage/.encrypted

Check CompressRatio:
    sudo zfs get all storage/encrypted | grep compressratio


Since Linux ZFS does not support the encryption option (as of 2014-09), there are 2 options. The first is to place the encryption below the ZFS layer using LUKS, and the second is to encrypt on top of the ZFS layer using a file based encryption. I have chosen to use the latter because I have heard that ZFS data reliability works better if it is the layer closest to the hardware.

Get the encryption package:
    sudo apt-get install ecryptfs-utils

Create a mount point and start the encryption process:
    sudo mkdir /storage/encrypted
    sudo mount -t ecryptfs /storage/encrypted /storage/encrypted

Follow the prompts. I chose AES, 32 bytes (256 bit), and yes to encrypt the filenames.

Save settings to be able to mount later:
    cat /etc/mtab | grep ecryptfs

Add results from above to /etc/fstab and add the options noauto (to prevent mounting at boot) and ecryptfs_passthrough=n (not sure why this is not on the mtab entry)

Example /etc/fstab entry:
    /storage/.encrypted /storage/encrypted ecryptfs noauto,rw,ecryptfs_sig=12a34b567c8de9ff,ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_fnek_sig=12a34b567c8de9ff,ecryptfs_unlink_sigs,ecryptfs_passthrough=n 0 0

    sudo umount /storage/encrypted

    sudo mount /storage/encrypted

Encryption Update (2014-09-26):

Enabling Filename Encryption in ecryptfs lowers your maximum filename from 255 characters to 143 characters.
See: https://bugs.launchpad.net/ecryptfs/+bug/344878

13 August 2014

ThinkServer TS140 Build

As my old server is 5 years old (2008-12) and been showing its age, I decided it was time for an upgrade.


1x Lenovo  ThinkServer TS140 70A4001LUX  -  $399.99 - $50 rebate (newegg)
  • Intel Xeon E3-1225v3 3.2GHz
  • 4GB DDR3 1600
  • No Hard Drive
  • Gigabit Ethernet 
2x Western Digital Red 3 TB  -  $114.99 a piece (newegg)
1x Old Western Digital Caviar 250 GB w/ sata cable  -  Already had
1x 18 inch Monoprice Sata III cable with 90 degree angle plug  -  $2.66 (amazon)
1x Trendnet USB to PS/2 adapter (TU-PS2)  -  $8.99 (amazon)
1x Small zip tie  -  Already had


Xubuntu 14.04 LTS 64bit  -  Free (xubuntu.org/getxubuntu/)

Total Cost: $591.62 + tax

Hardware Installation:

  1. Opened up the case
    1. Removed Thumb screws (had to use screwdriver to get it started)
    2. Pressed in the side release button
    3. Removed side panel
  2. Installed the 250GB primary drive (in what Lenovo calls the tertiary drive slot)
    1. Pressed the quick release button
    2. Pushed the 5.25 to 3.5 adapter out from the inside
    3. Be careful as the fan power cord is not long!
    4. Placed the hard drive in the adapter
    5. Flipped over while supporting hard drive
    6. Aligned screw holes and fastened screws (make sure to use included screws as they are longer due to anti-vibration gaskets)
    7. Pushed adapter back into place and assured that quick release snapped back into place
    8. Attached Sata
      1. Removed front USB motherboard connector
      2. Moved existing Sata cable from Sata0 to Sata1
      3. Reattached front USB motherboard connector
      4. Attached Sata cable to Sata0 ran thru cord fastener on motherboard side and attached to HD
    9. Attached Power
      1. Clipped zip tie holding power cable in place
      2. Un-did loop in power cable so it could reach HD
      3. Attached power cable to HD
      4. Zip tied all cables back into place
  3. Installed the 2x 3TB drives
    1. Pulled out the drive caddy
    2. Installed pegs into one side of the HD
    3. Stretched caddy so that pegs would go into other side of the HD
    4. Pushed HD + caddy back into place
    5. Attached sata (Sata1 and Sata2) and power cable


I wanted to do an extended drive test on all the drives to ensure they were in good working order before proceeding with my software install. I used the Western Digital DOS diagnostic tool (wdc.com). It took about 7 hours for each of the 3TB drives and just over an hour for the 250GB drive.

Software Installation:

  1. First I created a linux live USB from the ISO
  2. Booted from the USB in Try Xubuntu mode
  3. As I was recycling a drive from an old FakeRaid array, I had to delete the raid metadata. I opened up a terminal window and ran:
    • sudo dmraid -E -r /dev/sdX
    • where X is the letter of the old raid array drive
  4. Ran the install Xubuntu icon on the desktop
  5. Followed the prompts to install to the 250GB drive
    • Used advanced partition setup:
      • /boot: 537MB
      • /: 100GB
      • /home: 139 GB
      • swap: 8GB
  6. Remove USB and Reboot 
  7. Installed Updates
    • sudo update-manager
  8. Reboot 
  9. Made sure Red Drives had WD Load/Unload update installed
  10. Setup the ZFS mirrored raid 
    1. sudo apt-get install zfs-fuse
    2. ls /dev/disk/by-id/
    3. sudo zpool create storage mirror /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-SERIAL#1 /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-SERIAL#2
    4. sudo zpool status


  • The server is dead quiet which is one of the major reasons I bought it
  • With the Trendnet for some reason the scroll on the mouse causes the mouse to jump instead of scrolling, but as I plan to use this as a mainly server this is a small issue

11 August 2014

Ikea Dimmable LED Light Bulb Review

Ikea Dimmable LED Light Bulb Review

LEDARE - E26 - LED1207G11


Key Specs:
10 watt
600 lumens (~60 watt equivalent)
2700 kelvin
25000 hours

From Energystar.gov, here is a quick reference chart that shows approximate lumens for old incandescent light bulbs:
Old Incandescent Bulbs
ENERGY STAR Bulb Brightness
(Minimum Lumens)
40 450
60 800
75 1,100
100 1,600
150 2,600

We used 4 of them to replace 60W incandescent bulbs in a ceiling fan.

  • Despite being lower lumens, the lights actually appear brighter, in fact we normally only have to turn the dimmer half way up to get enough light!
  • Use only 10 Watts at max brightness, so we are saving over 75%
  • Price, was $10-12 when we bought them and have dropped in price to $7.49
  • They are "instant on", but I have noticed at lower dimmer settings they do take longer to come on, and it works best to turn them on fully and then dim them.
  • Hang out slightly farther in the light fixture than the bulbs they replaced
Other Thoughts:
  • Does not dim as low as the lights they replaced, but maintains a constant white (old bulbs would become redder as they dimmed)
  • Come in both frosted and clear

21 February 2014

Review ASUS AC66R wireless router

Review ASUS AC66R wireless router

  I picked up a refurbished ASUS ACC66R wireless router in June 2013 for 119.99 from newegg. The only difference between the AC66R and AC66U is that the R version is sold in brick and mortar retail stores and the U version is sold thru online channels.

  It had been running great until I moved it in Feb 2014 and then it did not like to stream 5GHz thru 3 walls (2 outside ones). However, upgrading the firmware to the latest and upping the 5Ghz transmit power to 110 mW stabilized the connection.

  • Simultaneous Dual Band (2.4 and 5GHz)
  • Gigabit LAN
  • Supports draft AC
  • Has guest networks that are isolated from your network
  • 2.4GHz range is much better than my old E2000
  • Stable, has needed very little rebooting (I think twice in 6 months)
  • Sleek looking
  • 3 adjustable external antennae (recommend 45, 90, 45 degree oreintation)
  • Supports IPv6

  • Not final AC

Other thoughts:
  • Have not tested AC streaming as I don't have any clients

20 February 2014

Review Canon Powershot s110

 Canon Powershot s110

  I was looking for a higher end point and shoot that works better in lowlight than our older models. I had a couple choices that I narrowed it down to:
  • Canon Powershot s110
  • Nikon Coolpix P7700
  • Sony DSC-RX100
  However Amazon and Bestbuy put the s110 on sale for $219.99 including a 32GB and a carrying case. This was enough to seal the deal.

  • Flash is bright, but does not give our dogs zombie eyes
  • Camera starts up quickly
  • Touch screen works well
  • Zoom is quick

  • Flash pops-up right where you want to put your left hand.
  • Lots of controls, made finding the timer shot difficult

Other thoughts: