[mythtv-users] How to shutdown combined fe/be machine from the front panel switch?

Another Sillyname anothersname at googlemail.com
Mon Jun 7 16:28:03 UTC 2010

On 7 June 2010 16:46, Patrick Doyle <wpdster at gmail.com> wrote:
> On Sun, Jun 6, 2010 at 10:39 PM, Nick Morrott <knowledgejunkie at gmail.com> wrote:
>> On 7 June 2010 02:22, Patrick Doyle <wpdster at gmail.com> wrote:
>>> I have mythbuntu (9.10/0.22) running on a combined fe/be machine.
>>> Occasionally, I would like to shut the whole thing down.  Typically,
>>> I've grabbed the laptop, ssh'ed in, and shut down from the command
>>> line.  I've decided that that is getting cumbersome (and is also
>>> problematic when I'm not home and I need to figure out how to tell my
>>> wife/family how to shut down.
>> If you want to do this from within the mythfrontend GUI, you can
>> configure the exit menu to show exit, reboot and shutdown options (or
>> any combination thereof). These options can use sudo to allow the
>> regular mythfrontend user to execute reboot and poweroff (the actual
>> commands are also customisable).
> Thanks for the tips folks, I really appreciate them.
> I'm a bit leery of wiring the shutdown command into the remote -- too
> much chance of accidentally turning the thing off when I didn't want
> to.  (And I've been bitten by the Wii -- not realizing that the on/off
> button on the Wii remotes actually turn the whole system off, not just
> the remote.  But I guess I could get past that and figure out some
> sort of secret double handshake on my universal remote impersonating
> an MCE remote that would reduce the probability of accidentally
> turning things off).
> I've specifically disabled the exit command from mythfrontend -- again
> I didn't want my family to exit out of myth and then not be able to
> restart it.
> I am curious why the front-panel power button doesn't "work".
> My definition of "work":
> Pressing the power button should generate an event.
> XFCE has a configuration item for what to do when it gets a power-off event
> but XFCE doesn't include "shut down" as one of the options
> I'm curious to learn why "shut down" isn't one of the options for
> responding to one of the power-off events.  Is that a Mythbuntu
> customization?  Is that a feature that was added to the GUI since
> Ubuntu 9.10?
> --wpd
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


You can always program the remote to start myth up as well.

in .lircrc


begin irexec

#### This starts mythfrontend using the MCE start button

remote = mceusb
prog = irexec
button = Home
repeat = 4
config = /usr/local/bin/mythpoweron

end irexec


The mythpoweron script is....




STATUS=`ps -e | grep $PROG | grep -v grep | wc -l | awk '{print $1}'`

if [ `echo $DISPLAY | grep -c ":0"` -ge 1 ]
       if [ $STATUS -eq 0 ]
           (export $PROG & )
exit 0


Allows you to shutdown and restart the mythfrontend all from the remote.

More information about the mythtv-users mailing list