[mythtv-users] Clean Shutdown from Frontend??
dave at theansells.com
Wed Aug 23 09:33:23 UTC 2006
Thanks for that. I hadnt realised the command was in the setup menu!
I have noticed since posting that the "poweroff" command works well for the
Mythtv user from the commandlline so I have programmed that in the settings.
Works a treat.
I'll have to loo into keymaps and inittab in a bit more detail to get the
powerbutton working but that can wait.
I can now map the
----- Original Message -----
From: <chris at cpr.homelinux.net>
To: "Discussion about mythtv" <mythtv-users at mythtv.org>
Sent: Wednesday, August 23, 2006 12:53 AM
Subject: Re: [mythtv-users] Clean Shutdown from Frontend??
On Tue, Aug 22, 2006 at 02:27:59PM +0100, Dave Ansell wrote:
> When I exit the Mythfrontend with "Exit and Shutdown" the system
> shutsdown but fails to finally switch off power. However if I log in
> remotely and execute "shutdown -h now" it switches off completely.
> Is there any way to improve the mythfrontend shutdown command?
> Secondly, is there a way to link a keystroke to a shutdown command?
> have a remote which generates keystrokes directly rather than lirc and I
> would like to link up the power button to something useful)
Have you checked the setup screen to see what command is being
executed? The default MythTV installation simply puts "halt" in
the "halt command" field. You would have to edit that field to say
"sudo shutdown -h now" and configure sudo to allow your frontend
login to execute that command.
The /etc/inittab file allows you to specify a few special commands.
Here's a sample:
# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
# Action on special keypress (ALT-UpArrow).
#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this
# What to do when the power fails/returns.
If you can find a way to get the remote control to generate an
ALT-UpArrow keypress then you could edit inittab to do a shutdown
when it gets a kbrequest. The other solution would be to find a
way to convert some other keypress into a powerfailnow signal.
mythtv-users mailing list
mythtv-users at mythtv.org
More information about the mythtv-users