[mythtv-users] Ways to jump to a window at startup
Tobias Maier
diespambox at gmx.net
Fri Sep 10 08:04:33 UTC 2010
Chris Adams <rocket at extremelan.net> wrote:
> On Thu, Sep 9, 2010 at 9:32 PM, Tobias Maier <diespambox at gmx.net> wrote:
> > Chris Adams <rocket at extremelan.net> wrote:
> >> Hi,
> >>
> >> I'm looking into programming some buttons on my remote to launch
> >> mythfrontend directly into various screens. For instance say a user
> >> presses the "Guide" button, mythfrontend launches and the user is
> >> immediately presented with the EPG. Bypassing the menus.
> >>
> >> The only way I can think of is to launch mythfrontend then frantically
> >> poll the telnet socket so I can send it a jump command before the menu
> >> is displayed. Haven't tried it (yet) but it seems this will flicker
> >> since the main menu will display briefly then be replaced by the
> >> desired screen. Not a great user experience, but acceptable.
> >>
> >> Has anyone done this? Is there a more elegant way?
> >>
> >> NB. Sadly the only relevant command-line option I could find is one to
> >> launch a plugin. So MythVideo could be started this way but not the
> >> EPG or the watch recordings screen.
> > I think you can directly start a plugin if you create a symlink to
> > mythfrontend with the plugin name an use the symlink to start the
> > frontend.
> >
> > Tobi
>
> Tobias, is the "watch recordings" screen avaiable via plugin? I
> suspect because the bits of the frontend I want aren't plugins this
> approach won't work..
no, i don't think the watch recordings screen is a plugin...
but as i mentioned in my other reply it is possible to achieve this
with some bash scripting and telnet.
The following is a quick sample i created, and it works for me, but be
aware that it may loop forever.. especialy if the telnet port of the
frontend is disabled... but i think you get the idea. Use the
Jumppoint as first parameter...
#!/bin/bash
mythfrontend &> /dev/null &
while ( ! (echo 'Xquit')|telnet localhost 6546 -e X );do
echo frontend not ready
sleep 1s;
done
(sleep 3s; echo "jump $1";sleep 1s;echo echo "Xquit") |telnet localhost 6546 -e X;
Tobi
More information about the mythtv-users
mailing list