Frontend Loading Script
There are a few methods to load mythfrontend depending on your setup. This method uses a script that will continually reload mythfrontend if it ever crashes. While technically near impossible to guarantee that mythfrontend will stay running, it should rarely crash and it's more likely that someone will hit ESC too many times and we'll be left with an empty display on our big TV.
To avoid having to break out the keyboard and restart mythfrontend, here's a little script I use to restart it automatically:
Then, instead of starting Myth with 'mythfrontend', start it with the script above.
Here is a different script I use to start mythfrontend and/or lircd if either quit/crash. The script is launched by irexec whenever I press the 'PC Power' button on my MCE remote.
It's also useful when you would like to start mythfrontend remotely (from SSH session for example), and having it forked to background.
Yet another script
I wrote this script to be executed from .xinitrc. The idea of the script is to restart the mythtv frontend if it crashes, but if the user chooses to quit, it quits gracefully. There are times when the user may not want the frontend to keep restarting.
It sends all of the frontend's output to the MYTHERRORS file and includes a line if it restarted the frontend after a crash.
Mythbuntu oriented script + LIRC support
I updated the 'Alternate Script' to enable me to run mythfrontend from my IR remote when pressing the Start button. It includes an addition to the .lircrc file. It also requires that irexec will be running (maybe by adding it to the auto start list).
The script (I named it 'run_myth')
My addition to the .lircrc file:
begin remote = mceusb2 prog = irexec button = Start repeat = 0 config = /home/mythtv/run_myth end
Note: you can change the button to any button you want. I prefer the Start button in my remote, but your remote could have a different buttons layout/naming.
Another option is to have mythfrontend load automatically upon boot, this method is described at Frontend Auto Login