[mythtv-users] Best way to cleanly stop mythfrontend?

Nick Rout nick.rout at gmail.com
Sat Oct 1 21:24:22 UTC 2011


On Sun, Oct 2, 2011 at 4:44 AM, Marc MERLIN <marc_mtv at merlins.org> wrote:
> On Sun, Sep 25, 2011 at 11:20:28PM +0100, Thomas Boehm wrote:
>> Thomas Boehm wrote:
>> > Marc MERLIN wrote:
>> >> On Sun, Sep 25, 2011 at 04:01:31PM +1000, Michael Watson wrote:
>> >>> On my Frontends, I run XScreensaver and a script via cron that waits for
>> >>> the screensaver to be active for X minutes, then shutsdown the machine,
>> >>> (or if it is a FE/SBE closes mythfrontend and allows mythwelcome to
>> >>> shutdown the machine when the backend is idle).
>> >
>> > Would you mind sharing it with us? I'm looking for such a working solution.
>>
>> To answer my own question, here's a perl script which does it.
>> ---------------------------------------------------------------------
>> #!/usr/bin/perl
>> #my $cmd = "dbus-monitor --session
>> \"type='signal',interface='org.gnome.ScreenSaver',
>> member='ActivateChanged'\"";
>>
>> my $cmd = "dbus-monitor --session
>> \"type='signal',interface='org.gnome.ScreenSaver',member='ActiveChanged'\"";
>>
>> open (IN, "$cmd |");
>>
>> while (<IN>) {
>>     if (m/^\s+boolean true/) {
>>         exec('killall mythfrontend.real');
>
> I'm looking at this now.
>
> So, if I'm in the middle of playing a show (paused) and I do killall
> mythfrontend.real, that won't save my position, or does it?

If it doesn't, you could use network control to save the position,
then exit mythfrontend.


More information about the mythtv-users mailing list