[mythtv-users] using telnet to improve mythtv menus

Ronald Frazier ron at ronfrazier.net
Fri Mar 14 22:54:40 UTC 2008


> My issue is that it doesn't seem to work from the myth gui, but works
> perfectly from the command line.

My guesses would be either a permission or environment problem.
Presumably, when you run it from the command line, you are either
running as root or as your own personal user account. However, myth is
usually setup to run as the mythtv user. Does the mythtv user have
permission to execute your script? Is telnet in the path for the
mythtv user or will you need to specify a full path?


Also, you can optimize this to require fewer calls. Instead of

echo "key pageup" | telnet 192.168.1.3 6546
echo "key pageup" | telnet 192.168.1.3 6546
echo "key pageup" | telnet 192.168.1.3 6546

try

echo -e "key pageup\nkey pageup\nkey pageup" | telnet 192.168.1.3 6546

As long as you don't require a pause between, you can join all the
commands together.

-- 
Ron


More information about the mythtv-users mailing list