[mythtv-users] Use LIRC to run /etc/init.d/gdm restart
jedi
jedi at mishnet.org
Mon Dec 24 00:41:41 UTC 2007
On Sun, Dec 23, 2007 at 09:59:29AM +1000, Lachlan McIntosh wrote:
> Hi everyone
>
> Been running myth for quite awhile now and being the adventuresome type,
> I run it using the SVN build.
>
> However occasionally the front end segfaults leaving me with a blank
> screen, and seeing as I don't have a keyboard plugged into the box, it
> means I have to wander down the other end of the house to another PC,
> ssh in and run "/etc/init.d/gdm restart" (well I don't really have to do
> >that<, but after much fluffing about it seems the quickest way to get
> back to watching my program)...
>
>
> Does anyone have a procedure for setting up my box so I can press the
> "power" button (or I'm thinking the "recessed" "Record" button) on my
Here is the "kill switch" I have setup for this sort of situation.
------------------------- lircrc ----------------------
#Power Button
begin
prog = irexec
button = Power
repeat = 4
config = /usr/local/bin/mythpowerbutton.sh
end
----------------------------- mythpowerbutton.sh ---------------
#!/bin/bash
if [ "$USER" = "mythtv" ]; then
kill -9 -1
else
ps -aef | grep mythtv | awk '{print $2}' | xargs -ifred kill -9 fred
fi
> MCE remote and for LIRC to kick off a "/etc/init.d/gdm restart"?
>
> Or for that matter can anyone suggest a better way to restart the
> frontend after a segfault??
>
> Thanks
>
> Lachlan
My mythfrontend runs from init. The mythtv user gets logged in
automatically. If I do a killall on the mythtv user, that user
will end up logged out and then logged back in again.
This is a pretty tidy mythtv only reset.
More information about the mythtv-users
mailing list