PDA

View Full Version : [SOLVED] How can I get MythTV to shut down the PC


GuiGuy
July 16th, 2008, 05:13 PM
In the front end settings I have configured to have the reboot and shutdown options show on the exit menu.

However, selecting reboot or shutdown only takes me to the desktop. It doesn't shutdown.

Does anyone know how to fix that so it works as expected?

TIA

laga
July 16th, 2008, 05:15 PM
Somewhere in the settings, you can enter shutdown and reboot commands. What entries do you have there?

GuiGuy
July 16th, 2008, 05:27 PM
Somewhere in the settings, you can enter shutdown and reboot commands. What entries do you have there?

The "Halt" command = halt
The "Reboot" command = reboot

These settings were the default, i.e. I did not enter them. The install did.

NB: I tried "Halt=poweroff" as suggested in the wiki. Made no difference.

Thanks

laga
July 16th, 2008, 05:57 PM
You can try /usr/share/mythtv/myth-reboot.sh and /usr/share/mythtv/myth-halt.sh respectively.

These use a rather naive approach to HAL to shutdown your computer.. if it doesn't work, you'll have to use sudo and modify /etc/sudoers accordingly. Let me know how myth-halt.sh works for you.

GuiGuy
July 16th, 2008, 06:38 PM
You can try /usr/share/mythtv/myth-reboot.sh and /usr/share/mythtv/myth-halt.sh respectively.

These use a rather naive approach to HAL to shutdown your computer.. if it doesn't work, you'll have to use sudo and modify /etc/sudoers accordingly. Let me know how myth-halt.sh works for you.

Cheers. I'll give a go tonight after work.

freymann
July 16th, 2008, 07:44 PM
In the front end settings I have configured to have the reboot and shutdown options show on the exit menu.

However, selecting reboot or shutdown only takes me to the desktop. It doesn't shutdown.

Does anyone know how to fix that so it works as expected?



I believe what you need to do is set the shutdown command in the setup to:

sudo /sbin/halt

and then, in a terminal window, you have to:

sudo visudo

and add a line that reads:

%mythtv ALL=NOPASSWD: /sbin/halt

I don't know if you need to reboot before this works.

GuiGuy
July 19th, 2008, 01:28 AM
sudo visudo

and add a line that reads:

%mythtv ALL=NOPASSWD: /sbin/halt

I don't know if you need to reboot before this works.

Didn't work. But thanks anyway.

BTW, the people who invented visudo. Do they look like real geeks? ;)

Cheers

GuiGuy
July 19th, 2008, 01:40 AM
You can try /usr/share/mythtv/myth-reboot.sh and /usr/share/mythtv/myth-halt.sh respectively.

That worked! Thanks

laga
July 19th, 2008, 04:38 AM
Cool! I'm glad it worked.