[mythtv-users] Restart Myth by remote control

Dan Conti dconti at acm.wwu.edu
Wed Apr 23 04:32:46 UTC 2003


Why not have a script that runs mythfrontend in the foreground in a loop,
and whenever the process exits it checks the error code. Intentional exits
should give back 0, and crashes should give back nonzero, so the script
could automagically start mythfrontend again on nonzero results. Then
start the script in the background.

I guess another factor is that if you are using CVS and getting segfaults
it would be of more use to actually track these in hopes of debugging
them, rather than work around them as best as possible..

On Wed, 23 Apr 2003, ben wrote:

> Just thought I'd share a little idea I had.  Since Mythfrontend still
> has a seg fault every now and then, and since my wife doesn't understand
> how to restart Mythfront end.  I mapped one of my remote keys to a
> script that restarts mythfrontend.  The basic gist is this.  I'm using
> Xdialog (http://www.chez.com/godefroy/) to display a window that you can
> select to restart or not, thus avoiding accidental restarts. If you
> don't want to do this you can just ignore remove everything but the
> killall and and mythfrontend commands.
>
> Script looks like this:
>
> #!/bin/sh
>
> Xdialog --title "Restart Mythtv" --yesno "Would you like to restart
> MythTV?" 0 0
>
> if [ $? -eq 0 ]
> then
>     sudo killall mythfrontend
>     mythfrontend &
> fi
>
> Save this and store it somewher in you path.  I used /bin
>
> Next add this to your lircrc:
>
> begin
>     prog = irexec
>     button = tivo #Whatever Button you want to use
>     config = RestartMyth.sh
> End
>
> Finally, add irexec to whatever script you are using to start irxevent.
>
> Now you have a restart key.  Makes the Spousal Approval Level much
> higher.
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>


More information about the mythtv-users mailing list