[mythtv-users] How to KEEP mythtv running when user exits

f-myth-users@media.mit.edu f-myth-users at media.mit.edu
Wed Jan 11 04:16:27 UTC 2006


    Date: Tue, 10 Jan 2006 16:50:07 -0800
    From: John Biundo <johnbiundo at sbcglobal.net>

    Hi all.

    I've got mythtv starting up automatically upon boot (by running 
    mythfrontend in user mythtv's .xsession).  No problem there.

    But when my wife/kids exit from the top menu by mistake (one too many 
    exit button presses) they're left at the befuddling command prompt.

    After futzing with inittab to try to get this working, and googling 
    around along a bunch of wild goose chases, I'm throwing my hands up and 
    beseeching the gurus how to do this.

If I understand you correctly, you might try putting something like
this in mythtv's .xsession:

while [ 1 ]
do
  mythfrontend
done

That way, if the frontend exits for any reason, it'll instantly
restart itself.  (It -also- means you can't log out of mythtv on
the X display directly; you'd have to kill the process running the
"while" loop, or one of its parents, to actually kill the frontend;
presumably you'd do this by ssh'ing in from somewhere else---note
that a cleaner way would be to make the loop check for the existence
of some file, and then just delete the file (again, from somewhere
else) and -then- exiting the frontend won't cause it to respawn.)

I did this when I was repeatedly restarting the frontend to get
various overscan/positioning parameters set correctly (via trial
and error), and it was so useful I just left it in place.


More information about the mythtv-users mailing list