I’ve been wanting to fix a number of issues with normal operation of MythTV.
Sometimes when I turn on the TV to watch something, another window has popped up in front of the MythTV frontend. So I get on a computer and log on through VNC and hit Alt-Tab once to fix it. Or I get a keyboard plugged in and do the alt-tab on it. Sure, trivial, but still annoying for me. And for others in the house, it means the “TV is broken” and unusable.
Another issue that is less common is that the MythTV Frontend isn’t running. That’s usually my fault – I’ll do some maintenance and forget to turn it on before I walk away. Similarly, sometimes the MythTV Frontend is doing something goofy and needs to be killed and restarted.
As I discovered recently with this new build, sometimes switching my receiver off or on can cause the computer MythTV is on to lose track of the video. And the whole window manager and X11 needs to be restarted. Although, I hope I have that fully fixed now.
And then there is the simple request from other household members: What button on the remote do I press to turn it on when it is off? (It is never off – the screen just blanks out through xscreensaver.) I always say “any button” but unfortunately, sometimes the button pushed turns out to actually do something they don’t want and then they get frustrated.
I’ve come up with a solution to all of it! I created one script that does it all. Okay, actually it is really two scripts but the second is just for the unlikely event of needing to get lightdm restarted and that requires root privileges so I had to do it separately. The main script will ensure that the MythTV Frontend is running (and if it isn’t, it will start), raise it to the front, and even change the menu to the main menu and deactivate the screensaver – just like you were turning on an appliance. And this one script can be fired from the Power button on the remote. I see peace and tranquility in my future. [ continue reading »» ]