Mythv and Steam box

I’ve finally upgraded from Mythdora 12!  This is how I rebuilt using a fresh installation of Fedora 20 x64.  Note, a few of the steps pertain to restoring my previous MySQL database used from my Mythdora installation.  I’m happy to report I was able to successfully use my Database files and all recordings used with my old Mythdora system.  I lost NO DATA during this process and now love my TV even more now that it has Steam Streaming configured.

A little background first; I decided to stick with Fedora since my thought process around Linux has always been more inline with Fedora – Pick an OS with the latest stable software that offers the most choice and the least artificial limitations.

I plan to provide more specific information around each step, but that takes time.  So currently here is the down and dirty of it:

Click here for a download of the text, as to avoid any WordPress formatting changes.


Okay… enough delay, here it is:

#My Disk layout
Software Raid1 = 2 x 1TB /dev/md127,/dev/md0
Software Raid1 = 2 x 3TB /dev/md1

/dev/md127 /boot 1GB
/dev/md0 /dev/vg-root
\_ root00 48.8GB
\_ swap00 4GB
/dev/md1 /storage

#Lay down basic packages with some niceties
rpm -ivh
rpm -ivh
yum update -y

#Reboot first, then install remaining packages
init 6
yum install kernel-headers kernel-devel strace cairo-dock thunderbird rdesktop gcc sshfs xdm vnc-server samba samba-client samba-winbind-clients gvfs gvfs-smb htop evince libreoffice gimp gnote brasero wget minicom vlc mozilla-vlc gvim nmon xfce4-mixer compiz fusion-icon compiz-plugins-extra compiz-xfce emerald emerald-themes emerald-themes-extra ccsm -y

#Install Steam
cd /etc/yum.repos.d; wget; yum install steam -y

# Install MythTV packages
yum install mythtv* -y

#Install Google Chrome
wget; sudo rpm –import

#If you want MATE, I didn’t as XFCE has everything I want
yum group install “MATE Desktop” -y; yum install compiz-mate -y

#Install Webmin
##Download from
yum localinstall ./webminpkgname.rpm -y

#Install V4L apps
yum install xorg-x11-drv-v4l.x86_64 v4l-utils.x86_64 gtk-v4l.x86_64 -y

#Disable SELinux
vi /etc/sysconifg/selinux
\_ Change “Enforcing” to “Permissive”

#Setup services
chkconfig sshd on
service sshd start
chkconfig mariadb on
service mariadb start
chkconfig mythbackend on
service mythbackend start
chkconfig firewalld off
service firewalld stop
chkconfig httpd on
service httpd start

#Setting up Nvidia GT 210, Fanless PCIe card
yum install akmod-nvidia xorg-x11-drv-nvidia-libs xorg-x11-drv-nvidia-libs.i686 kernel-devel acpid -y
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
dracut /boot/initramfs-$(uname -r).img $(uname -r)
yum install vdpauinfo libva-vdpau-driver libva-utils -y

#Set your hostname
vi /etc/hosts
vi /etc/hostname
vi /etc/sysconfig/network

#Set your IP address settings via NetworkManager

#Configure Database (MySQL/MariaDB)

##Go to Webmin and set MariaDB root password

##import the basic database structure – UPDATE TO REFLECT CURRENT VERSION
mysql -u root -p < /usr/share/doc/mythtv-docs/database/mc.sql ## Configure Database vi /etc/my.cnf \_ bind-address = "" ##Set correct privileges: mysql -u root mythconverg -p grant all on mythconverg.* to mythtv@"%" identified by "P@ssW0rd"; flush privileges; ##Import existing database, bunzip2 /mythtvbackend-restore/mythconverg.sql bunzip2 /mythtvbackend-restore/mysql.sql mysql -u root -p mythconverg < /mythtvbackend-restore/mythconverg.sql mysql -u root -p mythconverg < /mythtvbackend-restore/mysql.sql # Create Raid 1 mirror for /dev/md0 and mount as /storage for recordings at boot time mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sdc/dev/sde mdadm --detail --scan >> /etc/mdadm.conf

#Create XFS filesystem on /dev/md1
mkfs.xfs /dev/md1

#Use blkid to find uuid of /dev/md1 and add to /etc/fstab so it mounts at boot time
vi /etc/fstab UUID=123987129873-1293872-129873-291837-98127398712938 /storage xfs defaults 1 3

#Mount /storage
mount -a

#Fix timezone info and launch MythTV setup
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql

##In MythTV setup, configure the following:
Configure /storage as the default storage location
Change playback to use OpenGL
Enable commercial auto skip
Change the minimum show start time difference to 2 minutes so the program guide will prompt to record instead of changing the channel

###IF YOU GET THE ERROR “table ‘internetcontent’ already exists” ###
mysql -u -p mythconverg
DROP TABLE IF EXISTS internetcontent;
DROP TABLE IF EXISTS internetcontentarticles;

#Configure GUI

##Enable autologin
vi /etc/lightdm/lightdm.conf
\_ autologin-user=mythtv

#Disable powermanagement and screensaver settings

##Add to the mythtv user’s .bash_profile
/usr/bin/xset s off
/usr/bin/xset -dpms

#Make sure users next session will be xfce
vi /var/lib/AccountsService/users/mythtv
\_ XSession=xfce

#Install switchdesk for easy desktop switching
yum install switchdesk -y

#Enable VNC through XFCE
vi /etc/lightdm/lightdm.conf
command=Xvnc -PasswordFile /home/mythtv/.vnc/passwd

##Autolaunch mythfrontend upon login
Go to Settings =>; Session and Startup =>; Application Autostart
Choose Add
Name = Mythfrontend
Command = /usr/bin/mythfrontend

# Copy FW for capture cards
##tar -xzvf cx18-firmware.tar.gz
cp /mythdora_config/scripts/cx18-firmware/*.fw /lib/firmware/
cp /mythdora_config/hvr2250_drivers/saa7164-v4l/NXP7164-2010-03-10.1.fw /lib/firmware/

#Setup Mythweb
cp /usr/share/mythweb /var/www/html/
chgrp -R apache /var/www/html/data
chmod g+rw /var/www/html/data

#begin copying old recordings from previous Mythdora installation from the source “/storage” to destination “/storage”
mount /dev/olddisk /storageold
rsync -auvE /storageold /

#In XFCE enable CairoDock, enable other desktops, disable screensaver and lock screen, disable all powermanagement

#Create keyboard shortcut in XFCE to Ctrl-Esc to launch /usr/bin/steam %U – just like the application launcher is set – this allows you to bring up Steam in big-screen mode without having to exit the MythTV frontend.

#To get Steam to stream over the network, make sure to enable it in the Steam settings labeled “In-Home Streaming”

Backup your Google + photos

It’s great that Google integrates with Google + and your Android device to automatically back up all your precious photos, but how do you get a copy of those backed up photos on your local PC?  This is where Google Takeout come in.

Go to, login with your Google account you use on your Android phone, click “Create an Archive”, uncheck everything except “Google Photos”, click “Create Archive” and download each of the zip files displayed. That’s it!

Disable all Linux screensaver and monitor power management features

I recently was tasked to create a thin client type device and needed to disable all power management features. I found it to be more convoluted then I expected, so here are the options I found. In the end, the options in bold were all I needed to disable the screen blank power management and all screen savers in gnome.

Disabled the screen blank during a text based login:
Added consoleblank=0 to the kernel line in /boot/grub/menu.lst
Added /usr/bin/setterm -blank 0 to the /etc/rc.local

Should add to user’s .bash_profile or other user specific login file:
Disable all Xorg power management:
/usr/bin/xset s off
/usr/bin/xset -dpms

Disable screensaver settings on Gnome 2 – CentOS 6
yum remove gnome-screensaver gnome-power-manager -y


Dynamic DNS updates with a Linux DHCP client and Windows DHCP/DNS servers

Windows DHCP server:

In Administrative Tools->DHCP
On the Scope properties:
On the DHCP IPV4 object properties:

Windows DNS server:
In Administrative Tools->DNS
On the zone properties:

On CentOS/RHEL linux clients requesting a dhcp address on eth0:

Create the file /etc/dhcp/dhclient-eth0.conf with the following command:
echo "send host-name \"`hostname -s`\";" > /etc/dhcp/dhclient-eth0.conf

That’s it! To confirm it’s working as expected:

Reboot the linux dhcp client. Then type cat /var/run/nm-dhclient-eth0.conf to verify dhclient-eth0.conf was used and merged into eth0′s running config.

Use nslookup from a network client

On the DNS server:
Check the applicable zone under “Forward Lookup Zones” for an “A” record for the linux client. Also, check the applicable network zone under the “Reverse Lookup Zones” for a PTR record for the linux client.

On the DHCP server:
Check “Address Leases” under the applicable scope

Netbackup encryption client option configuration

Push the encryption binaries to the client using the following command on the master:

Install the license keys for encryption on the master server.

Create an encryption key file on the client by running the following command on the client (or on the master server with the -client option):

“<install_path>\NetBackup\bin\bpkeyutil -client <client_name>”

Enter new NetBackup passphrase: **********
Re-enter new NetBackup passphrase: **********

Verify the following files are on the client:
(this file is created by the bpkeyutil command)

 (this file is created by the bpkeyutil command)

On Netbackup administration console In the policy under the Attributes tab there is a selection for Encryption that determines if the backup will be encrypted. Check the check box.

In the NetBackup Administration Console, Expand NetBackup Management > Host Properties > Clients, double click to launch client properties window. Click on  “Encryption” and Configure this client to be enabled for encryption.

Install and run ClusterSSH

If you’re running Fedora 18+ type:
sudo yum install clusterssh -y

If you’re running RHEL or a RHEL clone..

Download Cluster SSH from Sourceforge

yum install gcc make kernel-devel kernel-headers perl perl-CPAN libX11-devel -y
perl -MCPAN -e shell
install Tk
install X11::Protocol

cd to your Download location and into clusterssh
make install

Run the program!
cssh server1 server2

Or create a “clusters” config file for commonly access servers and assign a “tag” (aka label for the group of servers)
mkdir ~/.clusterssh
vi ~/.clusterssh/clusters
linux user@server1 user@server2 user@server3

Run cssh using the tag contained in the clusters file with:
cssh linux


vCenter 5.1 install with SEP, uninstall SEP first!

I had to install vCenter twice for a customer upgrade. Twice? Why?

In this case it was SEP 12 that was pushing VMware Update Manager around. The Update Manager database would not connect when trying to enable the vSphere Client plugin. So I bounced the Update manager services and found in the Event Viewer application log, that the “Threat” was being blocked by SEP12. Ok, so this was obvious that this was the issue since every time I would restart the service, the errors would follow. So you could say, why did you just uninstall it? We did and we found ourselves with corrupted vCenter services and an Update Manager wouldn’t start.

I proceeded to uninstall all vCenter components because there was no way to tell what had installed properly and what may have been corrupted. After uninstalling I rebooted for good measure and had everything installed and setup in another 45 minutes.

So I guess you never stop learning and I will from now on make sure virus scans are completely removed from the OS until the installation is complete.

The vCenter 5.5 appliance is very capable of replacing this process entirely though, so maybe this will be the last time I install it on a Windows server :)

- A place for me to share with you.