Autostart mythtv (using restartscript)

mythbox:~$ sudo vim /usr/local/bin/restartmyth.sh

#!/bin/bash
## mythrestart.sh
## Automatically restart mythfrontend if it fails.
## Loop the call of mythfrontend.

while [ /bin/true ]
do
        killall mythfrontend
        killall mythlogserver
        killall mythlcdserver
        mythfrontend -v playback >> /tmp/mythfrontend.log
sleep 2
done

mythbox:~$ sudo chmod 755 /usr/local/bin/restartmyth.sh

First enable Automatic login from the gnome Settings panel.
Schedule the script to start after login (using gnome)

mythbox:~$ vim .config/autostart/restartmythtv.desktop

[Desktop Entry]
Name=restartmythtv
GenericName=Restart mythfrontend
Comment=Restart mythtfrontend when it crashes
Exec=/usr/local/bin/restartmyth.sh
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true

Restart the computer

Leave a Reply

Your email address will not be published. Required fields are marked *

*