Difference between revisions of "User:AndrewAllison"

From MythTV Official Wiki
Jump to: navigation, search
Line 1,410: Line 1,410:
 
  echo "Glitch finished at $NEWNOW, end of Run" >> "$LOADOUTPUT"
 
  echo "Glitch finished at $NEWNOW, end of Run" >> "$LOADOUTPUT"
 
_______________________________________________
 
_______________________________________________
 +
 +
UDEV
 +
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{subsystem_device}=="8003"    SYMLINK+="video-PVR150-0"
 +
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{subsystem_device}=="8801"    SYMLINK+="video-PVR150-1"
 +
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{subsystem_device}=="e807"    SYMLINK+="video-PVR150-2"
 +
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{subsystem_device}=="e817"    SYMLINK+="video-PVR150-3"
 +
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{subsystem_device}=="8389"    SYMLINK+="video-HVR950-0"

Revision as of 22:19, 26 February 2013

Hardware

Asus M4A77TD motherboard
AMD Phenom II X4 965 Processor
nVidia Corporation NV44 [GeForce 6200 TurboCache
Hauppaupe 150 with ir input
Hauppauge 150
Hauppauge 500 

Standard Files

Because these files are spread out everywhere, I usually get a mismatched set :-(
/etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
key_buffer = 16M
table_cache = 128
sort_buffer_size = 2M
myisam_sort_buffer_size = 8M
query_cache_size = 16M
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
/etc/lircmd
# 
# lircmd config file
# 
PROTOCOL IntelliMouse
# ACCELERATOR start max multiplier
ACCELERATOR 2 30 5
ACTIVATE * RESERVED
MOVE_N  * 2
MOVE_NE * 3
MOVE_E  * 6
MOVE_SE * 9
MOVE_S  * 8
MOVE_SW * 7
MOVE_W  * 4
MOVE_NW * 1
MOVE_IN * CH+
MOVE_OUT * CH-
BUTTON1_TOGGLE * 5
BUTTON1_TOGGLE * RADIO
BUTTON2_TOGGLE * VOL+
BUTTON3_TOGGLE * SOURCE
BUTTON1_CLICK * TV
BUTTON1_CLICK * VOL-
BUTTON3_CLICK * MUTE
# BUTTONx_CLICK, BUTTONx_UP, BUTTONx_DOWN are also possible
/etc/lirc/lircd.conf
#
# this config file was automatically generated
# using lirc-0.5.5pre8 on Sun Apr 18 11:43:45 1999
#
# contributed by Jens Leuschner <leuschner@gmx.net>
#
# brand:             Hauppauge
# model:             
# supported devices: WinTV primo; WinTV pci; WinTV radio
#
# This config file will work with both homebrew receivers and 
# original Hauppauge TV cards !!!
#
begin remote
 name  Hauppauge
 bits           13
 flags SHIFT_ENC
 eps            30
 aeps          100
 one           950   830
 zero          950   830
 plead         960
 gap          89584
 repeat_bit      2
     begin codes
         TV                       0x000000000000100F
         RADIO                    0x000000000000100C
         FULL_SCREEN              0x000000000000102E
         CH+                      0x0000000000001020
         CH-                      0x0000000000001021
         VOL-                     0x0000000000001011
         VOL+                     0x0000000000001010
         MUTE                     0x000000000000100D
         SOURCE                   0x0000000000001022
         1                        0x0000000000001001
         2                        0x0000000000001002
         3                        0x0000000000001003
         4                        0x0000000000001004
         5                        0x0000000000001005
         6                        0x0000000000001006
         7                        0x0000000000001007
         8                        0x0000000000001008
         9                        0x0000000000001009
         0                        0x0000000000001000
         RESERVED                 0x000000000000101E
         MINIMIZE                 0x0000000000001026
     end codes
end remote
#
# this config file was automatically generated
# using lirc-0.6.6(animax) on Tue Apr 15 19:50:27 2003
#
# contributed by 
#
# brand:                                Hauppauge
# model no. of remote control: 
# devices being controlled by this remote: PVR 2/350
#
begin remote
 name  hauppauge_pvr
 bits           13
 flags RC5|CONST_LENGTH
 eps            30
 aeps          100
 one           969   811
 zero          969   811
 plead        1097
 gap          114605
 toggle_bit      2
     begin codes
         Power                    0x00000000000017FD
         Go                       0x00000000000017FB
         1                        0x00000000000017C1
         2                        0x00000000000017C2
         3                        0x00000000000017C3
         4                        0x00000000000017C4
         5                        0x00000000000017C5
         6                        0x00000000000017C6
         7                        0x00000000000017C7
         8                        0x00000000000017C8
         9                        0x00000000000017C9
         Back/Exit                0x00000000000017DF
         0                        0x00000000000017C0
         Menu                     0x00000000000017CD
         Red                      0x00000000000017CB
         Green                    0x00000000000017EE
         Yellow                   0x00000000000017F8
         Blue                     0x00000000000017E9
         Ch+                      0x00000000000017E0
         Ch-                      0x00000000000017E1
         Vol-                     0x00000000000017D1
         Vol+                     0x00000000000017D0
         Ok                       0x00000000000017E5
         Mute                     0x00000000000017CF
         Blank                    0x00000000000017CC
         Full                     0x00000000000017FC
         Rewind                   0x00000000000017F2
         Play                     0x00000000000017F5
         Forward                  0x00000000000017F4
         Record                   0x00000000000017F7
         Stop                     0x00000000000017F6
         Pause                    0x00000000000017F0
         Replay                   0x00000000000017E4
         Skip                     0x00000000000017DE
     end codes
end remote
#
# this config file was automatically generated
# using lirc-0.7.0(any) on Sun Nov 28 20:25:09 2004
#
# contributed by 
#
# brand:   Hauppauge 350
# Created: G.J. Werler (The Netherlands)
# Project: Mythtv Fedora Pundit-R www.mythtvportal.com
# Date:    2004/11/28
# model no. of remote control: Hauppauge A415-HPG
# devices being controlled by this remote: PVR-350
#
begin remote
 name  Hauppauge_350
 bits           13
 flags RC5|CONST_LENGTH
 eps            30
 aeps          100
 one           969   811
 zero          969   811
 plead        1097
 gap          114605
 toggle_bit      2
     begin codes
         Go                       0x00000000000017BB
         Power                    0x00000000000017BD
         TV                       0x000000000000179C
         Videos                   0x0000000000001798
         Music                    0x0000000000001799
         Pictures                 0x000000000000179A
         Guide                    0x000000000000179B
         Radio                    0x000000000000178C
         Up                       0x0000000000001794
         Left                     0x0000000000001796
         Right                    0x0000000000001797
         Down                     0x0000000000001795
         OK                       0x00000000000017A5
         Back/Exit                0x000000000000179F
         Menu/i                   0x000000000000178D
         Vol+                     0x0000000000001790
         Vol-                     0x0000000000001791
         Prev.Ch                  0x0000000000001792
         Mute                     0x000000000000178F
         Ch+                      0x00000000000017A0
         Ch-                      0x00000000000017A1
         Record                   0x00000000000017B7
         Stop                     0x00000000000017B6
         Rewind                   0x00000000000017B2
         Play                     0x00000000000017B5
         Forward                  0x00000000000017B4
         Replay/SkipBackward      0x00000000000017A4
         Pause                    0x00000000000017B0
         SkipForward              0x000000000000179E
         1                        0x0000000000001781
         2                        0x0000000000001782
         3                        0x0000000000001783
         4                        0x0000000000001784
         5                        0x0000000000001785
         6                        0x0000000000001786
         7                        0x0000000000001787
         8                        0x0000000000001788
         9                        0x0000000000001789
         Asterix                  0x000000000000178A
         0                        0x0000000000001780
         #                        0x000000000000178E
         Red                      0x000000000000178B
         Green                    0x00000000000017AE
         Yellow                   0x00000000000017B8
         Blue                     0x00000000000017A9
     end codes
end remote
#
# this config file was automatically generated
# using lirc-0.7.0pre4(serial) on Sun Oct  2 00:24:32 2005
#
# contributed by anton|ganthaler.at and juergen.wilhelm|aon.at
# members of linux user group Vorarlberg www.lugv.at
# 
# for ir remote controler from Hauppauge WinTV Nexus-S
# most of the keys are supported
#
# brand:                       Hauppauge
# model no. of remote control: WinTV Nexus-S
# devices being controlled by this remote:
#
begin remote
 name  Hauppauge_WinTV_Nexus-S
 bits           13
 flags RC5|CONST_LENGTH
 eps            30
 aeps          100
 one           944   828
 zero          944   828
 plead         980
 gap          113932
 min_repeat      1
 toggle_bit      2
     begin codes
         Up                       0x0000000000001794
         Down                     0x0000000000001795
         Left                     0x0000000000001796
         Right                    0x0000000000001797
         Power                    0x00000000000017BD
         Ok                       0x00000000000017A5
         Menu                     0x000000000000178D
         Back                     0x000000000000179F
         Red                      0x000000000000178B
         Green                    0x00000000000017AE
         Yellow                   0x00000000000017B8
         Blue                     0x00000000000017A9
         0                        0x0000000000001780
         1                        0x0000000000001781
         2                        0x0000000000001782
         3                        0x0000000000001783
         4                        0x0000000000001784
         5                        0x0000000000001785
         6                        0x0000000000001786
         7                        0x0000000000001787
         8                        0x0000000000001788
         9                        0x0000000000001789
         Play                     0x00000000000017B5
         Pause                    0x00000000000017B0
         Stop                     0x00000000000017B6
         Record                   0x00000000000017B7
         FastFwd                  0x00000000000017B4
         FastRwd                  0x00000000000017B2
         Channel+                 0x00000000000017A0
         Channel-                 0x00000000000017A1
         Volume+                  0x0000000000001790
         Volume-                  0x0000000000001791
         Mute                     0x000000000000178F
         Timers                   0x000000000000178A
         Recordings               0x000000000000178E
         Back                     0x000000000000179F
         Record                   0x00000000000017B7
         Pause                    0x00000000000017B0
     end codes
end remote
#
# this config file was automatically generated
# using lirc-0.8.3pre1(default) on Sat Jun 21 12:36:46 2008
#
# contributed by Matthew Wright
#
# brand:  Hauppauge (HRV-1600 RT Remote)
# model no. of remote control: A415-HPG-A
# devices being controlled by this remote:
#
begin remote
 name  Hauppauge
 bits           13
 flags RC5|CONST_LENGTH
 eps            30
 aeps          100
 one           919   852
 zero          919   852
 plead         930
 gap          112908
 toggle_bit_mask 0x800
     begin codes
         power                    0x17BD
         go                       0x17BB
         tv                       0x179C
         videos                   0x1798
         music                    0x1799
         pictures                 0x179A
         guide                    0x179B
         radio                    0x178C
         exit                     0x179F
         menu                     0x178D
         prevch                   0x1792
         mute                     0x178F
         up                       0x1794
         down                     0x1795
         left                     0x1796
         right                    0x1797
         ok                       0x17A5
         volup                    0x1790
         voldown                  0x1791
         chup                     0x17A0
         chdown                   0x17A1
         record                   0x17B7
         stop                     0x17B6
         rewind                   0x17B2
         fastfwd                  0x17B4
         play                     0x17B5
         replay                   0x17A4
         skip                     0x179E
         pause                    0x17B0
         1                        0x1781
         2                        0x1782
         3                        0x1783
         4                        0x1784
         5                        0x1785
         6                        0x1786
         7                        0x1787
         8                        0x1788
         9                        0x1789
         *                        0x178A
         0                        0x1780
         #                        0x178E
         red                      0x178B
         green                    0x17AE
         yellow                   0x17B8
         blue                     0x17A9
         sub/cc                   0x178E
         text                     0x178A
         home                     0x17BB
     end codes
end remote
#
# this config file was automatically generated
# using lirc-0.8.5(default) on Wed Dec 30 21:52:35 2009
#
# contributed by 
#
# brand:                       Hauppauge
# model no. of remote control: 
# devices being controlled by this remote: MVP
#
begin remote
 name  Hauppauge_MVP
 bits           13
 flags RC5|CONST_LENGTH
 eps            30
 aeps          100
 one           912   857
 zero          912   857
 plead         937
 gap          113935
 toggle_bit_mask 0x800
     begin codes
         KEY_1                    0x10C1
         KEY_2                    0x10C2
         KEY_3                    0x10C3
         KEY_4                    0x10C4
         KEY_5                    0x10C5
         KEY_6                    0x10C6
         KEY_7                    0x10C7
         KEY_8                    0x10C8
         KEY_9                    0x10C9
         KEY_0                    0x10C0
         KEY_POWER                0x10FD
         KEY_GOTO                 0x10FB
         KEY_BACK                 0x10DF
         KEY_MENU                 0x10CD
         KEY_RED                  0x10CB
         KEY_GREEN                0x10EE
         KEY_YELLOW               0x10F8
         KEY_BLUE                 0x10E9
         KEY_UP                   0x10E0
         KEY_DOWN                 0x10E1
         KEY_LEFT                 0x10D1
         KEY_RIGHT                0x10D0
         KEY_MUTE                 0x10CF
         KEY_FN_1                 0x10CC
         KEY_FN_2                 0x10FC
         KEY_OK                   0x10E5
         KEY_REWIND               0x10F2
         KEY_FASTFORWARD          0x10F4
         KEY_PLAY                 0x10F5
         KEY_RECORD               0x10F7
         KEY_STOP                 0x10F6
         KEY_PAUSE                0x10F0
         KEY_PREVIOUS             0x10E4
         KEY_NEXT                 0x10DE
     end codes
end remote

/home/mythtv/.lircrc

# ~/.mythtv/lircrc
#
# MythTV native LIRC config file for
# the new grey Hauppauge remote
#
# Modified from Jarod Wilson's which came from Jeff Campbell's
# By Brad Templeton
# Here we have the jump point commands. They only work if you have
# defined function keys for these jump points. For me the most
# common command is the menu of recordings, so I put that on "videos"
# even though that's counter-intuitive
begin
prog = mythtv
button = TV
repeat = 2
config = F5
end
begin
prog = mythtv
button = Videos
repeat = 2
config = F2
end
# Not yet defined
begin
prog = mythtv
button = Music
repeat = 2
config = Up
end
# Given another function for now, I don't use mythgallery
begin
prog = mythtv
button = Pictures
repeat = 2
config = F
end
begin
prog = mythtv
button = Guide
repeat = 2
config = F3
end
# I stuck the "todo" list on here as Myth has no radio function
begin
prog = mythtv
button = Radio
repeat = 2
config = F4
end
begin
prog = mythtv
button = Up
repeat = 1
config = Up
end
begin
prog = mythtv
button = Down
repeat = 1
config = Down
end
begin
prog = mythtv
button = Left
repeat = 1
config = Left
end
begin
prog = mythtv
button = Right
repeat = 1
config = Right
end
# Channel Up
begin
prog = mythtv
button = Ch+
repeat = 1
config = Up
end
# Channel Down
begin
prog = mythtv
button = Ch-
repeat = 1
config = Down
end
# OK/Select
begin
prog = mythtv
button = Ok
config = Space
end
# Play
begin
prog = mythtv
button = Play
config = Return
end
# Stop
begin
prog = mythtv
button = Stop
config = I
end
# Escape/Exit/Back
begin
prog = mythtv
button = Back/Exit
config = Esc
end
# Power Off/Exit
begin
prog = mythtv
button = Power
config = Esc
end
# Pause
begin
prog = mythtv
button = Pause
repeat = 2
config = P
end
# Mute
begin
prog = mythtv
button = Mute
repeat = 2
config = |
end
# Fast forward (30 sec default)
begin
prog = mythtv
button = Rewind
repeat = 2
config = <
end
# Rewind (10 sec default)
begin
prog = mythtv
button = Forward
repeat = 2
config = >
end
# Skip forward (10 min default)
begin
prog = mythtv
button = SkipForward
repeat = 2
config = End
end
# Skip backward (10 min default)
begin
prog = mythtv
button = SkipBackward
repeat = 2
config = Home
end
# Record
begin
prog = mythtv
button = Record
repeat = 2
config = R
end
# Delete
begin
prog = mythtv
button = Red
repeat = 2
config = D
end
# Decrease play speed
begin
prog = mythtv
button = Green
repeat = 2
config = J
end
# Display EPG while in live TV,
# View selected show while in EPG
begin
prog = mythtv
button = Menu/i
repeat = 2
config = M
end
# Scroll up
begin
prog = mythtv
button = Vol+
repeat = 2
config = F11
end
# Scroll down
begin
prog = mythtv
button = Vol-
repeat = 2
config = F10
end
# Bring up OSD info
begin
prog = mythtv
button = Go
repeat = 2
config = I
end
# Change display aspect ratio
begin
prog = mythtv
button = Prev-Channel
repeat = 2
config = W
end
# double speed watch
begin
prog = mythtv
button = Yellow
repeat = 2
config = J
end
# change tuners
begin
prog = mythtv
button = hash
repeat = 2
config = Y
end
# Bring up Time stretch
begin
prog = mythtv
button = Blue
repeat = 2
config = A
end
# Numbers 0-9
begin
prog = mythtv
button = 0
repeat = 2
config = 0
end
begin
prog = mythtv
button = 1
repeat = 2
config = 1
end
begin
prog = mythtv
button = 2
repeat = 2
config = 2
end
begin
prog = mythtv
button = 3
repeat = 2
config = 3
end
begin
prog = mythtv
button = 4
repeat = 2
config = 4
end
begin
prog = mythtv
button = 5
repeat = 2
config = 5
end
begin
prog = mythtv
button = 6
repeat = 2
config = 6
end
begin
prog = mythtv
button = 7
repeat = 2
config = 7
end
begin
prog = mythtv
button = 8
repeat = 2
config = 8
end
begin
prog = mythtv
button = 9
repeat = 2
config = 9
end
### MPlayer lirc setup
# Show OSD
begin
prog = mplayer
button = MENU
repeat = 2
config = osd
end
# Pause playback
begin
prog = mplayer
button = PAUSE
repeat = 2
config = pause
end
# Skip ahead a minute if playing
# If paused, resume playing
begin
prog = mplayer
button = PLAY
repeat = 2
config = seek +1
end
# Stop playback and exit
begin
prog = mplayer
button = STOP
repeat = 2
config = quit
end
# Mute
begin
prog = mplayer
button = MUTE
repeat = 2
config = mute
end
# Seek back 10 seconds
begin
prog = mplayer
button = REW
repeat = 2
config = seek -10
end
# Seek forward 30 seconds
begin
prog = mplayer
button = FFW
repeat = 2
config = seek +30
end
# Quit
begin
prog = mplayer
button = BACK/EXIT
repeat = 2
config = quit
end
# Seek forward 10 minutes
begin
prog = mplayer
button = SKIP
repeat = 2
config = seek +600
end
# Seek backward 10 minutes
begin
prog = mplayer
button = REPLAY
repeat = 2
config = seek -600
end
# Toggle full-screen
begin
prog = mplayer
button = FULL
repeat = 2
config = vo_fullscreen
end
### Xine lirc setup
begin
prog = xine
button = PLAY
repeat = 2
config = Play
end
begin
prog = xine
button = STOP
repeat = 2
config = Stop
end
begin
prog = xine
button = OFF
repeat = 2
config = Quit
end
begin
prog = xine
button = PAUSE
repeat = 2
config = Pause
end
begin
prog = xine
button = CH+
repeat = 2
config = EventUp
end
begin
prog = xine
button = CH-
repeat = 2
config = EventDown
end
begin
prog = xine
button = VOL-
repeat = 2
config = EventLeft
end
begin
prog = xine
button = VOL+
repeat = 2
config = EventRight
end
begin
prog = xine
button = OK
repeat = 2
config = EventSelect
end
begin
prog = xine
button = BACK/EXIT
repeat = 2
config = Menu
end
begin
prog = xine
button = FFW
repeat = 2
#config = SpeedFaster
config = SeekRelative+60
end
begin
prog = xine
button = REW
repeat = 2
#config = SpeedSlower
config = SeekRelative-60
end
begin
prog = xine
button = FULL
repeat = 2
config = Volume+
end
begin
prog = xine
button = BLANK
repeat = 2
config = Volume-
end
begin
prog = xine
button = MUTE
repeat = 2
config = Mute
end
begin
prog = xine
button = MENU
repeat = 2
config = RootMenu
end
begin
prog = xine
button = SKIP
repeat = 2
config = EventNext
end
begin
prog = xine
button = REPLAY
repeat = 2
config = EventPrior
end
begin
prog = xine
button = GO
repeat = 2
config = OSDStreamInfos
end
begin
prog = xine
button = RED
repeat = 2
config = Quit
end
begin
prog = xine
button = RED
repeat = 2
config = Quit
end

My Backup script

date= date -I
nice -n 19 mysqldump -u root --password=testers --extended-insert --no-create-db --add-drop-table --database mythconverg  > `date -I`_myth_backup_data.sql
nice -n 19 mysqldump -u root --password=testers --extended-insert --database mythconverg  > `date -I`_myth_complete_backup_data.sql
nice -n 19 gzip `date -I`_myth_backup_data.sql
nice -n 19 gzip `date -I`_myth_complete_backup_data.sql
chmod 777 `date -I`_myth_backup_data.sql.gz
chmod 777 `date -I`_myth_complete_backup_data.sql.gz
mv `date -I`_myth_backup_data.sql.gz /storage1/Database/ 
mv `date -I`_myth_complete_backup_data.sql.gz /storage1/Database/

My Restore

mysql -u root -p < myth_complete_backup_data.sql

Setting Atrpms.repo

[atrpms]
name=Fedora Core $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
enabled=1
gpgcheck=1

Setting up Autologin

/etc/gdm/custom
# GDM configuration storage
[daemon]
TimedLoginEnable=true
TimedLogin=mythtv
TimedLoginDelay=5
[security]
[xdmcp]
[greeter]
[chooser]
[debug]

Crontab

* 3 * * *  /home/mythtv/backup-mysql.sh
* 4 1 * *  /home/mythtv/optimize-myth-db.sh

/etc/init.d/mythbackend

#!/bin/bash
#
# Rename this file to:
#
#    /etc/rc.d/init.d/mythbackend
#
###############################################################################
#
# chkconfig:   - 86 14
# pidfile:     /var/run/mythbackend.pid
# description: Starts the mythbackend process as a daemon after X and MySQL \
#              have started, in runlevel 5. This allows scheduled recordings \
#              to occur without manual intervention.
# processname: mythbackend
# config:      /etc/sysconfig/mythbackend
#
###############################################################################
#
# Copyright (c) by the MythTV Development Team.
#
# Derived from work by:
#
#     Michael Thomson <linux at m-thomson dot net>
#     Stu Tomlinson <stu at nosnilmot dot com>
#     Axel Thimm <axel.thimm at atrpms dot net>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
#
###############################################################################
# Default values to use if none are supplied in the config file.
# Running mythbackend as non-root requires you to ensure that audio/video
# devices used for recording have suitable user permissions. One way
# to achieve this is to modify existing or create new udev rules which
# assign these devices to a non-root group with rw permissions and add
# your mythbackend user to that group. Be aware that console.perms can
# also affect device permissions and may need additional configuration.
# Running as non-root may also introduce increased process latency.
#
# User who should start the mythbackend processes
   MBE_USER='root'
# Directory holding the mythbackend binary (empty means autodetect)
   MBE_DIR=
# Name of mythbackend binary
   MBE_PROG='mythbackend'
# Startup options for mythbackend
   MBE_OPTIONS=
# Directory holding the mythbackend log file
   LOG_DIR='/var/log/mythtv'
# Name of mythbackend log file
   LOG_FILE='mythbackend.log'
# Logging options for mythbackend (empty means '-v important,general')
   LOG_OPTS=
###############################################################################
# Source function library.
   . /etc/init.d/functions
# Source config file if available
   if [ -f "/etc/sysconfig/mythbackend" ]; then
     . /etc/sysconfig/mythbackend
   fi
# Find the executable
   if [ ! -z "$MBE_DIR" ]; then
       MBE_BIN="$MBE_DIR/$MBE_PROG"
   else
       MBE_BIN=`which "$MBE_PROG" 2>/dev/null`
       if [ ! -f "$MBE_BIN" ]; then
           if [ -f "/usr/bin/$MBE_PROG" ]; then
               MBE_BIN="/usr/bin/$MBE_PROG"
           elif [ -f "/usr/local/bin/$MBE_PROG" ]; then
               MBE_BIN="/usr/local/bin/$MBE_PROG"
           fi
       fi
   fi
# Error messages
   if [ ! -f "$MBE_BIN" ]; then
       echo "Cannot find $MBE_PROG executable"
       exit 1
   elif [ ! -x "$MBE_BIN" ]; then
       echo "$MBE_PROG is not executable"
       exit 1
   elif [ ! -d "$LOG_DIR" ]; then
       echo "Log directory does not exist"
       exit 1
   fi
# Initialize the return variable
   RETVAL=0
##############################################################################
#
# Start the process
#
   start() {
   # Already running?
       if [ -f "/var/lock/subsys/$MBE_PROG" ]; then
           echo "$MBE_PROG is already running."
           return 0
       fi
  # Start
       echo -n $"Starting $MBE_PROG: "
       touch "/var/run/$MBE_PROG.pid"
       chown "$MBE_USER":"$MBE_USER" "/var/run/$MBE_PROG.pid"
       daemon --user "$MBE_USER" "$MBE_BIN"              \
              --daemon                                   \
              --logfile "$LOG_DIR/$LOG_FILE" "$LOG_OPTS" \
              --pidfile "/var/run/$MBE_PROG.pid"         \
              $MBE_OPTIONS
       RETVAL=$?
       [ $RETVAL = 0 ] && touch /var/lock/subsys/$MBE_PROG
       echo
       return $RETVAL
   }
#
# Stop the process
#
   stop() {
       echo -n $"Stopping $MBE_PROG: "
       killproc "$MBE_PROG"
       RETVAL=$?
       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/${MBE_PROG} /var/run/${MBE_PROG}.pid
       echo
       return $RETVAL
   }
#
# Restart
#
   restart() {
       stop
       start
   }
###############################################################################
case "$1" in
start)
       start
       ;;
stop)
       stop
       ;;
restart)
       restart
       ;;
condrestart)
       if [ -f "/var/lock/subsys/$MBE_PROG" ]; then
           restart
       fi
       ;;
status)
       status "$MBE_BIN"
       RETVAL=$?
       ;;
*)
       echo "Usage: $0 {start|stop|restart|condrestart|status}"
       exit 1
esac
exit $RETVAL

/etc/init.d/mythjobqueue

#!/bin/bash
#
# Rename this file to:
#
#    /etc/rc.d/init.d/mythjobqueue
#
###############################################################################
#
# chkconfig:   - 86 14
# pidfile:     /var/run/mythjobqueue.pid
# description: Starts the mythjobqueue process as a daemon after X and MySQL \
#              have started, in runlevel 5. This allows jobs to be processed \
#              without manual intervention.
# processname: mythjobqueue
# config:      /etc/sysconfig/mythjobqueue
#
###############################################################################
#
# Copyright (c) by the MythTV Development Team.
#
# Derived from work by:
#
#     Michael Thomson <linux at m-thomson dot net>
#     Stu Tomlinson <stu at nosnilmot dot com>
#     Axel Thimm <axel.thimm at atrpms dot net>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
#
###############################################################################
# Default values to use if none are supplied in the config file.
# Running mythjobqueue as non-root may require you to ensure that the
# recording directories and files have suitable user permissions.  If
# all recording file access is done via streaming from the backends,
# this is not necessary.
#
# User who should start the mythjobqueue processes
   MBE_USER='root'
# Directory holding the mythjobqueue binary (empty means autodetect)
   MBE_DIR=
# Name of mythjobqueue binary
   MBE_PROG='mythjobqueue'
# Startup options for mythjobqueue
   MBE_OPTIONS=
# Directory holding the mythjobqueue log file
   LOG_DIR='/var/log/mythtv'
# Name of mythjobqueue log file
   LOG_FILE='mythjobqueue.log'
# Logging options for mythjobqueue (empty means '-v important,general')
   LOG_OPTS=
###############################################################################
# Source function library.
   . /etc/init.d/functions
# Source config file if available
   if [ -f "/etc/sysconfig/mythjobqueue" ]; then
     . /etc/sysconfig/mythjobqueue
   fi
# Find the executable
   if [ ! -z "$MBE_DIR" ]; then
       MBE_BIN="$MBE_DIR/$MBE_PROG"
   else
       MBE_BIN=`which "$MBE_PROG" 2>/dev/null`
       if [ ! -f "$MBE_BIN" ]; then
           if [ -f "/usr/bin/$MBE_PROG" ]; then
               MBE_BIN="/usr/bin/$MBE_PROG"
           elif [ -f "/usr/local/bin/$MBE_PROG" ]; then
               MBE_BIN="/usr/local/bin/$MBE_PROG"
           fi
       fi
   fi
# Error messages
   if [ ! -f "$MBE_BIN" ]; then
       echo "Cannot find $MBE_PROG executable"
       exit 1
   elif [ ! -x "$MBE_BIN" ]; then
       echo "$MBE_PROG is not executable"
       exit 1
   elif [ ! -d "$LOG_DIR" ]; then
       echo "Log directory does not exist"
       exit 1
   fi
# Initialize the return variable
   RETVAL=0
###############################################################################
#
# Start the process
#
   start() {
   # Already running?
       if [ -f "/var/lock/subsys/$MBE_PROG" ]; then
           echo "$MBE_PROG is already running."
           return 0
       fi
   # Start
       echo -n $"Starting $MBE_PROG: "
       touch "/var/run/$MBE_PROG.pid"
       chown "$MBE_USER":"$MBE_USER" "/var/run/$MBE_PROG.pid"
       daemon --user "$MBE_USER" "$MBE_BIN"              \
              --daemon                                   \
              --logfile "$LOG_DIR/$LOG_FILE" "$LOG_OPTS" \
              --pidfile "/var/run/$MBE_PROG.pid"         \
              $MBE_OPTIONS
       RETVAL=$?
       [ $RETVAL = 0 ] && touch /var/lock/subsys/$MBE_PROG
       echo
       return $RETVAL
   }
#
# Stop the process
#
   stop() {
       echo -n $"Stopping $MBE_PROG: "
       killproc "$MBE_PROG"
       RETVAL=$?
       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/${MBE_PROG} /var/run/${MBE_PROG}.pid
       echo
       return $RETVAL
   }
#
# Restart
#
   restart() {
       stop
       start
   }
###############################################################################
case "$1" in
start)
       start
       ;;
stop)
       stop
       ;;
restart)
       restart
       ;;
condrestart)
       if [ -f "/var/lock/subsys/$MBE_PROG" ]; then
           restart
       fi
       ;;
status)
       status "$MBE_BIN"
       RETVAL=$?
       ;;
*)
       echo "Usage: $0 {start|stop|restart|condrestart|status}"
       exit 1
esac
exit $RETVAL

/etc/rc.local

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
mount /dev/sda1 /storage1
mount /dev/sdc1 /storage3
mount /dev/sdd1 /storage2
/sbin/modprobe lirc_dev debug=1 && modprobe lirc_zilog
/etc/init.d/mysqld start
/etc/init.d/lirc start
/etc/init.d/mythbackend start
/etc/init.d/mythjobqueue start


Mythtv->Setup-General

LIRC daemon socket    /var/run/lirc/lircd

Notes on Fedora 15 Install

Using the default nouveau video driver GeForce 6200 SVideo

        Add boot option to grub.conf nouveau.tv_norm=NTSC-M 

kernel /vmlinuz-2.6.40.6-0.fc15.x86_64 ro root=UUID=4b78f456-a78b-4f2b-b4b6-392bd5a2b215 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us nouveau.tv_norm=NTSC-M quiet initrd /initramfs-2.6.40.6-0.fc15.x86_64.img

Installing MS Core Fonts

yum install rpm-build cabextract ttmkfdir wget
wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec
rpmbuild -ba msttcorefonts-2.0-1.spec
yum install --nogpgcheck /root/rpmbuild/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm


Useful Links

http://blog.grantgoodyear.org/2010_05_01_archive.html

Notes

Crash in MythNews

2012-01-01 10:26:35.859302 I  MythUIWebBrowser: Loading css from - file:///usr/local/share/mythtv/themes/default/htmls/mythbrowser.css
2012-01-01 10:26:35.866052 I  MythUIWebBrowser: enabling plugins
** (process:7422): DEBUG: NP_Initialize
** (process:7422): DEBUG: NP_Initialize succeeded
** (process:7422): DEBUG: NP_Initialize
** (process:7422): DEBUG: NP_Initialize succeeded
/builddir/build/BUILD/icedtea-web-1.0.6/plugin/icedteanp/IcedTeaNPPlugin.cc:2016: thread 0x2793a60: Error: Invalid plugin function table.
** (<unknown>:7422): DEBUG: NP_Initialize
** (<unknown>:7422): DEBUG: NP_Initialize succeeded
** (<unknown>:7422): DEBUG: NP_Initialize
** (<unknown>:7422): DEBUG: NP_Initialize succeeded
Solution
   Remove all files in .mythtv/MythNews
SQL Profiling script
Please remember to put the password for your admin user at the point marked XXX.
The script waits for the SQL load to get over 75% then starts to dump
a file called sqlload'timestamp' to your Desktop, it stops when the
load falls back below 75%.
If a few users could run it for testing it would be useful, it ONLY
starts to dump when load is > 75%
#!/bin/sh
FILENOW=`date +%a"."%b%d"."%H":"%M":"%S`
COUNT="0"
cd ~/Desktop
LOADOUTPUT="sqlload@""$FILENOW"
touch "$LOADOUTPUT"
SQLLOAD="0"
while [ "$SQLLOAD" -le 75 ] ; do
SQLLOAD=`top -b -n 1 | grep mysqld | awk -F " " '{ print $9 }'`
done;
while [ "$SQLLOAD" -ge 75 ]; do
mysql -uroot -pXXXADDYOURPASSWORDHEREXXX -e"SHOW full processlist;" >>
"$LOADOUTPUT"
NEWNOW=`date +%a"."%b%d"."%H":"%M":"%S`
echo -e "**************\n\n\n$NEWNOW\n\n\n Next Pass" >> "$LOADOUTPUT"
COUNT=`echo "$COUNT + 1" | bc`
echo "Count $COUNT  sqlload $SQLLOAD"
sleep 1
SQLLOAD=`top -b -n 1 | grep mysqld | awk -F " " '{ print $9 }'`
done
echo "Glitch finished at $NEWNOW, end of Run" >> "$LOADOUTPUT"

_______________________________________________

UDEV

KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{subsystem_device}=="8003"     SYMLINK+="video-PVR150-0"
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{subsystem_device}=="8801"     SYMLINK+="video-PVR150-1"
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{subsystem_device}=="e807"     SYMLINK+="video-PVR150-2"
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{subsystem_device}=="e817"     SYMLINK+="video-PVR150-3"
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{subsystem_device}=="8389"     SYMLINK+="video-HVR950-0"