[mythtv-users] Fixed starting channel

Bill Meek keemllib at gmail.com
Wed Jun 30 02:23:36 UTC 2010


On Tue, 2010-06-29 at 23:43 +0100, malcolm wrote:
<snip>
> I thought about a script to fettle this but I wouldn't know where to 
> start. Perhaps a request to the dev list for a feature request asking 
> for a 'always start channel'.
<snip>

Hi;

The developers have already smiled on you (again.)

This is a great example for using a System Event.

Each time Live TV is started, have its System Event
execute the following script which changes to channel 2,
for example.

This could be a bit more graceful by testing if the host
(frontend) was up by pinging it 1st, but you are in control
of what it does.

Pick a file for a script like this to live, save the
following in it and make it executable.

--- script ---
# SAVE THIS SCRIPT IN A FILE 1st!!!
#
# Use mythtv-setup, 7 System Events->Live TV Started to point at the
# full path of the filename used, e.g. /home/mythtv/LiveTVStarted.sh.
# 
# Be sure that Frontend Utilities/Setup->Setup->General->
#   Remote Control (8th screen) Enable Network Remote Control interface
#   is checked (restart the mythfrontend if it had to be turned on.)
# 
# See: http://www.mythtv.org/wiki/MythTV_System_Events
# and: http://www.mythtv.org/wiki/Telnet_socket
# and: man netcat

netcat one_frontend_of_interest 6546 << EOF
play channel 2
quit
EOF

netcat another_frontend 6546 << EOF
play channel 2
quit
EOF 
--- script ---
                                                                                                                                                                                                                                         
Remember, this is just an example (one that I tried on my system and it
works.)  You can make it more complex or simpler as you choose.

And, I'm sure there are other ways to do this, but this way, the channel
is only changed when Live TV is started.

Take care,

Bill Meek




More information about the mythtv-users mailing list