[mythtv-users] help control mythtv via telnet

Paul Bender pebender at san.rr.com
Tue Jan 22 23:46:41 UTC 2008


Steve Peters - Priority Electronics wrote:
> Hello all, i have this idea to control my mythtv frontend over telnet.
> I want to have different bash files that can be run that execute a 
> telnet command...i just don't know how to do it.
> I tried this:
> ------------------------------------------
> #!/bin/bash
> telnet mythtv-frontend 6546
> jump mythgallery
> exit
> exit 0
> ------------------------------------------
> The idea with that above script is that it just changes my mythfrontend 
> to open the gallery then exit telnet and then exit the script...it 
> didn't work. Anyone use scripts of any sort to do only a particular 
> function? I want to run these scripts and have them just work, and just 
> do one thing, like live tv, volume up, mute, gallery, channel 34, etc 
> etc etc.
> -Thanks

I do some minimal control in one of my MiniMyth scripts using the telnet 
interface. Here is the snippet.

nc localhost 6546 > /dev/null 2>&1 << EOF
jump mainmenu
EOF

For your example, I think something like the following would work

#!/bin/bash
nc mythtv-frontend 6546 > /dev/null 2>&1 << EOF
jump mythgallery
exit
EOF
exit 0


More information about the mythtv-users mailing list