[mythtv-users] Autostart frontend ONLY on manual startup?

Phill Edwards philledwards at gmail.com
Sat Mar 5 02:56:36 UTC 2005


> Has anyone figured out an elegant way to do the following:
> 
> - Have Myth frontend start up automatically if and only if the machine
> was started manually
> 
> Specifically, the frontend should autostart if I walk up to the
> computer and press the power button on the machine. The frontend
> should not start if nvram-wakeup set the BIOS start time and the
> machine started up by itself.
> 
> I have a combo frontend/backend box. I use nvram-wakeup, so once I
> exit the frontend, the machine shuts down after 5 mins if it's not
> recording anything. It wakes itself up 5 mins before it needs to
> record the next show.
> 
> Right now the frontend does not start automatically; I have to press
> the power button on my remote to start the frontend. This is so that
> the machine can start up automatically, record something, then shut
> down automatically.
> 
> It would be nice to have the frontend start automatically when I
> manually start the box, but not start when the box autostarted.
> 
> Any tips would be greatly appreciated!

Someone gave me their script which uses the following logic.

- Start mythfront/back ends every time the box boots up.
- At the same time as mythfrontend starts, start up irw in a script
which redirects its stdout to a log file and waits for 10 minutes
- When 10 minutes is up, check to see if the irw log file is empty. 
- If its not empty exit the script and do nothing
- If it is empty then assume that there is nobody using mythtv
(otherwise they would have pressed at least 1 button on the remote),
kill mythfrontend and exit the script.
- Now that mythfrontend is shut down the machine can go into its
auto-shutdown routine whenever it's ready.

I can send you the script if you want it.

Regards,
Phill


More information about the mythtv-users mailing list