2011-04-12, 04:01
I'm trying to change the functionality of the Power Button on my remote control, but I can't seem to get it to do anything besides its default function.
Like many others before me, I want the power button to turn off the screen but not the machine itself, as it also functions as a seedbox and I want it to stay on 24/7.
Using this source, I was able to put together the script monitor_control.sh, shown here:
After a bit of tweeking from the original source, the script runs perfectly when I execute it from the command line, so I know that it isn't the issue.
I also created an .lircrc file in the xbmc home directory, and linked the shell script to the remote control. The file is as follows:
In my lircmap.xml file, I removed the line for "<power>Power</power>," but the computer still shuts down as soon as the power button is pressed. I've also tried remapping the power button to other functions like "<start>Power</start>" but to no avail.
Is there something here that I am failing to do properly? I'm still kinda new to all of this.
Thanks in advance for any help.
Like many others before me, I want the power button to turn off the screen but not the machine itself, as it also functions as a seedbox and I want it to stay on 24/7.
Using this source, I was able to put together the script monitor_control.sh, shown here:
Code:
#!/bin/bash
VOLUME=$(aumix -vq | awk '{ print $3 }' )
MONITOR=$( xset -q | grep Monitor | awk ' { print $3 $4 } ' )
case "$MONITOR" in
"On")
if [ "$VOLUME" != "0" ] ; then
mute
fi
xset dpms force standby
;;
*)
xset dpms force on
sleep 1
xset s reset
if [ "$VOLUME" == "0" ] ; then
mute # unmute actually
fi
;;
esac
I also created an .lircrc file in the xbmc home directory, and linked the shell script to the remote control. The file is as follows:
Code:
# Power Button
begin
prog = irexec
button = Power
repeat = 4
config = /home/monitor_control.sh
end
In my lircmap.xml file, I removed the line for "<power>Power</power>," but the computer still shuts down as soon as the power button is pressed. I've also tried remapping the power button to other functions like "<start>Power</start>" but to no avail.
Is there something here that I am failing to do properly? I'm still kinda new to all of this.
Thanks in advance for any help.