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

Chris Adams rocket at extremelan.net
Mon Jun 7 02:19:01 UTC 2010


On Mon, Jun 7, 2010 at 11:22 AM, 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.
>
> So I'd like it if we could shut this down by pressing the power button
> on the front of the box.
>
> Looking at the Settings>Power Management>General menu (the xfce menu,
> not a MythTV menu), I see 2 options: "Suspend" and "Hibernate" for the
> "When the power button is pressed" option.  Everything I've read says
> there should also be a "shut down" option.
>
> Did Mythbuntu disable the "shut down" option?
>
> Is there some way to turn it back on?
>
> Is there some reason I shouldn't turn that option back on?  (Keeping
> in mind that this is for very occasional use).
>
> --wpd

I have a combined fe/be HTPC which also does torrents, xbmc and the
occasional bit of web browsing

When I want to force a shutdown I do it via irexec and a button on my
remote. The rest of the time I use a cron job, since mythbackend
doesn't go idle with a frontend connected. The scripts have become so
thorough that I usually let the machine turn itself off :-)

I'm using irexec and some scripts. During shutdown the machine gets
set to wake up before the next recording. My combined fe/be machine
won't shut down unless:
- the remote/mouse/keyboard are idle for 15 mins
- either mythfrontend or xbmc are running
- neither mythfrontend nor xbmc are playing a recording
- firefox is not running
- the backend isn't locked
- the backend isn't recording/transcoding/commflagging/fetching EPG data/etc.
- it's more than 5 minutes until the next recording
- there are no ssh logins
- there are no screen sessions
- no torrents are downloading in transmission (I don't worry about seeding)
The idle and not-currently-playing-a-recording checks are skipped when
forcing shutdown via remote, but otherwise it refuses to shutdown and
pops up a box telling the user what's happening.

I've been meaning to put it all up somewhere but the code needs a fair
bit of cleanup.

Want me to send it to you?


More information about the mythtv-users mailing list