Difference between revisions of "Frontend Loading Script"

From MythTV Official Wiki
Jump to: navigation, search
m (Keep mythfrontend running moved to Frontend Loading Script)
Line 1: Line 1:
Well, technically it's near impossible to guarantee that mythfrontend will stay running.  Although it rarely crashes for me, 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:
+
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.
 +
 
 +
= Script =
 +
To avoid having to break out the keyboard and restart mythfrontend, here's a little script I use to restart it automatically:
 
<pre><nowiki>
 
<pre><nowiki>
#!/bin/bash
+
#!/bin/bash
# mythrestart.sh
+
# mythrestart.sh
# Automatically restart mythfrontend if it fails.
+
# Automatically restart mythfrontend if it fails.
+
 
# Just for fun, lets start the myth transcode dameon, too.
+
# Just for fun, lets start the myth transcode dameon, too.
sudo mtd -d
+
sudo mtd -d
+
 
# Loop the call of mythfrontend.
+
# Loop the call of mythfrontend.
while [ /bin/true ]
+
while [ /bin/true ]
do
+
do
        sudo killall mythfrontend
+
        sudo killall mythfrontend
        sudo mythfrontend
+
        sudo mythfrontend
        sleep 2
+
        sleep 2
done
+
done
 
</nowiki></pre>
 
</nowiki></pre>
  
Line 20: Line 23:
  
 
== Other Options ==
 
== Other Options ==
 +
Another option is to have mythfrontend load automatically upon boot, this method is described at
 
[[Frontend Auto Login]]
 
[[Frontend Auto Login]]
  
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]

Revision as of 15:40, 17 January 2006

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.

Script

To avoid having to break out the keyboard and restart mythfrontend, here's a little script I use to restart it automatically:

#!/bin/bash
# mythrestart.sh
# Automatically restart mythfrontend if it fails.

# Just for fun, lets start the myth transcode dameon, too.
sudo mtd -d

# Loop the call of mythfrontend.
while [ /bin/true ]
do
        sudo killall mythfrontend
        sudo mythfrontend
        sleep 2
done

Then, instead of starting Myth with 'mythfrontend', start it with the script above.

Other Options

Another option is to have mythfrontend load automatically upon boot, this method is described at Frontend Auto Login