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

Marc MERLIN marc_mtv at merlins.org
Sat Oct 1 15:44:39 UTC 2011

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?

Is killall mythfrontend.real the best recommended way to shutdown
mythfrontend cleanly?

"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  

More information about the mythtv-users mailing list