[mythtv-users] MythTV Frontend shutdown

Martijn Morriën dj.escay at gmail.com
Fri May 16 19:37:48 UTC 2008


> Peter Øgaard Meyland wrote:
> > Ryan Pisani skrev:
> >>> Hi all
> >>>
> >>> I have a combo FE / BE in the livingroom and a FE Only in the bedroom.
> >>> My problem is that i can't shutodown the FE from within MythTV. Every
> >>> time i select Shutdown in the mainmenu nothing happends.
> >>>
> >>> I have done the following:
> >>>     1 I have enabled SHUTDOWN in mainmenu.xml
> >>>     2 As HaltCommand I have entered 'sudo /sbin/shutdown -h now' (I
> >>> guess that SHUTDOWN is executing this)
> >>>
> >> Try providing the full path to sudo in your shutdown command.
> >>
> >> /usr/bin/sudo (or where ever you have it installed) /sbin/shutdown -h
> now
> >>
> >>
> >>
> >>
> >>>     3 Using visudo I have entered the following line mythUser
> >>> ALL=NOPASSWD: /sbin/shutdown, /sbin/poweroff, /sbin/reboot, /sbin/halt
> >>>
> >>> The user MythUser can execute the command 'sudo /sbin/shutdown -h now'
> >>> from a terminal windows and everything works, but not from within
> >>> MythFrontend. What am I doing wrong?
> >>>
> >>> /Peter
> >>> _______________________________________________
> >>> mythtv-users mailing list
> >>> mythtv-users at mythtv.org
> >>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >>>
> >>>
> >> _______________________________________________
> >> mythtv-users mailing list
> >> mythtv-users at mythtv.org
> >> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> >>
> >>
> > Providing the absolute path to sudo did not work, the result are the
> same.
> > I think I can live with the script solution, it works right now :-)
> >
> > Thanks for the help
> >
> > /Peter
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> If you are running on Ubuntu 8.04+, try:
>
> /usr/share/mythtv/myth-halt.sh
>
> It uses hal to do things.
>
> --
> Mario Limonciello
> mario.mailing at gmail.com
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
I've installed Mythbuntu 8.04 and want to use Mythwelcome. When I use the
suggested myth-halt.sh I see in /var/log/mythtv/mythbackend.log:

2008-05-16 21:25:11.050 Running the command to shutdown this computer :-

/usr/share/mythtv/myth-halt.sh
Error org.freedesktop.DBus.Error.AccessDenied: A security policy in place
prevents this sender from sending this message to this recipient, see
message bus configuration file (rejected message had interface
"org.freedesktop.Hal.Device.SystemPowerManagement" member "Shutdown" error
name "(unset)" destination "org.freedesktop.Hal")
2008-05-16 21:25:13.089 I'm idle now... shutdown will occur in 60 seconds.

Also when I try the command manually it gives me this error.

I do not know what to do, can I solve this easily?

In the mean time I tried to add the mythtv user to the sudoers file with
visudo to not require a password. But sudo keeps asking for a password.

I added the following line:
mythtv ALL=NOPASSWD: /sbin/reboot, /sbin/halt, /sbin/shutdown
Does it matter where I add the line in the file? I assume spaces are ok, and
visudo does not complain when I save the file.

I gave the mythtv user a password. (Mythbuntu only uses the user via sudo ?)

But when I try it, it does not work, for example:

rmorrien at MythTV:~$ su mythtv
Password:
$ /usr/bin/sudo /sbin/reboot
[sudo] password for mythtv:

Suggestions are welcome,

Martijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20080516/d3f59665/attachment.htm 


More information about the mythtv-users mailing list