restart mythfrontend using your remote control and irexec

mythfrontend sometimes freezes on me. So I configured a button on my remote control to enable me to kill mythfrontend and restart it. This is really useful especially if you don’t have a keyboard and mouse plugged into your machine all the time or if you just want to make it all wife friendly. Here’s how I did it on my Fedora Core 12 mythtv frontend.

First of all – I’m assuming you already have your remote control working under lircd.

Second of all I used this guide to get me started –> http://www.mythtv.org/wiki/Setting_A_Button_On_Your_Remote_To_Restart_mythfrontend

But I found it didn’t quite work for me, so I modified it a little.

First I created the script similar to the guide above in my mythtv user local bin directory (in my case /home/mythtv/bin/) and called it runmythfrontend.sh
#!/bin/bash
# script to restart mythfrontend
for x in `ps -C mythfrontend | grep -v PID` end; do
test $x != 'mythfrontend' && continue
RUNNING=1;
done
if [ $RUNNING = 1 ]; then
`killall mythfrontend`
else
`mythfrontend &`
fi

Next I created an entry in my .lircrc file to run irexec. irexec is used to run programs when a particular button is pressed on your remote – in my case I wanted the Power button on my remote to run the script above when pressed – this is defined in the .lircrc file and in my case it is stored under /home/mythtv/.lircrc – yours might be somewhere esle depending on your setup. Go here to read more about irexec –> http://www.lirc.org/html/irexec.html

begin
prog = irexec
remote = mceusb
button = Power
config = /home/mythtv/bin/runmythfrontend.sh &
end

Now you need to setup your session to run up irexec when you log in or the server starts up. This is done whilst logged into the user you run mythfrontend as. In my case I have gnome installed so I just go to “System” –> “Perferences” –> “Startup Applications” on the gnome display. You should get something like this (mine is a little cut-off):

Startup Application Perferences

Press “Add” and fill in the name as “irexec” or anything you want really; command as “/usr/local/bin/irexec -d /home/mythtv/.lircrc”; put in a comment if you like or not; then press “Add”. This should now startup irexec when your session starts up.

I suggest you now give your machine a reboot and test it – you might want to check whether your mythbackend is recording anything before you reboot otherwise you will interrupt your recordings. Also if you haven’t already, your might find it easier to setup Fedora to auto login at startup - I’ve written a guide here.

Once rebooted you should be able to press the power button on your remote once to kill mythfrontend and again to start it back up again. That’s it. I welcome comments, feedback and suggestions to make this better or easier.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Live
  • MySpace
  • Slashdot
  • Technorati
  • YahooMyWeb
  • email
  • LinkedIn
  • RSS
  • Twitter
  • Twitthis
  • Yahoo! Bookmarks

Auto Login on Fedora Core 12

I previously posted details on how to setup Fedora Core 9/10/11 for auto login. Well I’ve recently downloaded and install Fedora Core 12 on my mythtv server and it still works. Here’s how to do it:

Edit /etc/gdm/custom.conf and add this to the file. You could use gedit or vi whatever suits you, but you need to do it as root.
[daemon]
TimedLoginEnable=true
AutomaticLoginEnable=true
AutomaticLogin=username
TimedLogin=username
TimedLoginDelay=0

Obviously you would replace “username” above with the actually “username” you wish to login automatically.

Now reboot and test it!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Live
  • MySpace
  • Slashdot
  • Technorati
  • YahooMyWeb
  • email
  • LinkedIn
  • RSS
  • Twitter
  • Twitthis
  • Yahoo! Bookmarks

Disabling outlook plugins/add-ins

I recently has a problem with an Outlook plugin (or add-in) which caused outlook to crash. I couldn’t for the life of me uninstall the stupid thing. But I did manage to disable the add-in by doing the following:

  1. Quit Outlook.
  2. Click Start, click Run, type regedit, and then click OK.
  3. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins\
    You should be able to see all the addins for outlook. Just find the one you want.
  4. Right-click LoadBehavior, and then click Modify.
  5. In the Value data box, type 1, and then click OK.
  6. Quit Registry Editor.
  7. Start Outlook and the addin shouldn’t load.

It might be a good idea to take a back of your registry or make a system restore point before doing this – just in case you make a mistake or something goes wrong.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Live
  • MySpace
  • Slashdot
  • Technorati
  • YahooMyWeb
  • email
  • LinkedIn
  • RSS
  • Twitter
  • Twitthis
  • Yahoo! Bookmarks

mythtv 0.22 released – finally

Mythtv 0.22 frontend screen shot

Mythtv 0.22 frontend screen shot

In case you didn’t here, mythtv 0.22 has finally been released. I’ve been waiting more than 1 year for it to be released! Check it out now http://www.mythtv.org

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Live
  • MySpace
  • Slashdot
  • Technorati
  • YahooMyWeb
  • email
  • LinkedIn
  • RSS
  • Twitter
  • Twitthis
  • Yahoo! Bookmarks

Auto Login on Fedora Core 9, 10 & 11

As you may not I’m a big fan of mythtv and I want to have Fedora Core 9 (it’s works for 10 and 11 too) login automatically when the PC is booted up.

For some reason on Fedora 9 gdm is different and you can’t easily configure it to auto login through the GUI, but here’s another way.

Edit /etc/gdm/custom.conf and add this to the file. You could use gedit or vi whatever suits you, but you need to do it as root.
[daemon]
TimedLoginEnable=true
AutomaticLoginEnable=true
AutomaticLogin=username
TimedLogin=username
TimedLoginDelay=0

Obviously you would replace “username” above with the actually “username” you wish to login automatically.

Now reboot and test it!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Live
  • MySpace
  • Slashdot
  • Technorati
  • YahooMyWeb
  • email
  • LinkedIn
  • RSS
  • Twitter
  • Twitthis
  • Yahoo! Bookmarks