copy from here: http://ubuntuforums.org/archive/index.php/t-351184.html
$ sudo nano /usr/share/mythtv/mainmenu.xml
Add the following to the end of mainmenu.xml
Create mythscript directory.
$ mkdir ~/.mythtv/mythscript
Create shutdown script.
$ sudo nano ~/.mythtv/mythscript/shutdown.sh
# ! /bin/bash
# This script will be used to shutdown the computer
# from within MythTV when the myth user selects
# the Shutdown button located on the mainmenu
# This script created on Jan 04 2007
# Shutdown
sudo /sbin/shutdown -h now
exit
Save and exit
Now we need to create a new group called "shutdown"
As Root:
# groupadd shutdown
# nano /etc/group
Add "mythtv" (without quotes) to end of shutdown group
Then
As Root: # visudo
Add: %shutdown ALL= NOPASSWD: /sbin/halt, /sbin/shutdown
## Make Script More Secure
$ sudo chgrp shutdown ~/.mythtv/mythscript/shutdown.sh
Make the script executable only for the group "shutdown"
$ sudo chmod g+x ~/.mythtv/mythscript/shutdown.sh
0 comments:
Post a Comment