Automatically restart Myth Frontend (Mythbuntu; Patch)

Bug #692697 reported by Pieter Hoekstra
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mythtv (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: mythtv-frontend

Every once in a while, mythfrontend crashes. This is often in MythMusic using a visualization or when using corrupt media files, etc.

Because not having a keyboard on my Mythbuntu mediacenter, there is often no other option than poweroff and reboot the machine. (unless I'm at home ofcource...)

I have changed the existing /usr/bin/mythfrontend script to be a "watchdog" to automatically restart mythfrontend.real (see attached patch)

The script only restarts with a exit code other than 0 or 1 and only in "--service" mode. This prevents restarting mythfrontend while the user uses the Exit option, or when X stops, or machine reboots or when starting myth from the command-line.

While restarting, it displays a "Restarting Frontend" message. Test it using: pkill -9 -f mythfrontend.real
The display-messages requires "notify-send" in package libnotify-bin. I used this, so you don't have to click it away.

I'm using this with Myth 0.23 and Myth 0.24 for a few months now. Since checking for exit-codes, I do not have any issues.

Tags: patch
Revision history for this message
Pieter Hoekstra (pieter-hoekstra) wrote :
Revision history for this message
Mario Limonciello (superm1) wrote :

Hi Pieter:

This looks good for the most part, but as it doesn't actually add a dependency on libnotify-bin, could you do the following:

1) Make this relative to the bzr branch at lp:~mythbuntu/mythtv/mythtv-fixes
2) Make libnotify-bin a Recommends in debian/control.in and debian/control
3) Test if notify-send is in PATH, and if not, just log it to that log file.

tags: added: patch
Revision history for this message
Pieter Hoekstra (pieter-hoekstra) wrote :

Ok, I did 1 and 3

I don't know how to do 2... :-)

Revision history for this message
Mario Limonciello (superm1) wrote :

Sorry for the delays, I just got this tested. It looks good, i've committed it to autobuilds (and made the change for <2>). It will be in the next set of autobuilds and included by default in Natty.

Changed in mythtv (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 2:0.24.0+fixes.20110208.6318d52-0ubuntu1

---------------
mythtv (2:0.24.0+fixes.20110208.6318d52-0ubuntu1) natty; urgency=low

  [ Pieter Hoekstra ]
  * Automatically restart the frontend if it crashes. Also notify the user
    using libnotify. (LP: #692697)

  [ Mario Limonciello ]
  * debian/control:
    - Depends on libnotify-bin.
  * New upstream checkout (6318d52)
  * >>Upstream changes since last upload (6dd5e4b):
  * [6318d52] Replace 'xml' version check with one that checks Python
    version, for Python 2.7 compatibility. (LP: #711762)
 -- Mario Limonciello <email address hidden> Tue, 08 Feb 2011 11:59:28 -0600

Changed in mythtv (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.