LinHES Forums http://forums.linhes.org/ |
|
R6 And Lirc http://forums.linhes.org/viewtopic.php?f=6&t=19597 |
Page 1 of 1 |
Author: | simonf [ Wed Feb 25, 2009 10:14 pm ] |
Post subject: | R6 And Lirc |
I did a fresh install on a new hard drive on my myth box I coppied over my savedfiles.tar.gz and extracted lircrc and lirc.conf I have noticed the origonals are now both in /etc/ not /etc/lirc /home/mythtv/.mythtv so do i need to copy mine to /etc now the reason i ask is i have no volume control at the moment the volume % goes up and down but dosnt actually do anything i fixed this in my old R5.27 version by creating a volup /down .sh command and mapping the volume keys to that and i would like to restore this functionality. like this Volup.sh Code: amixer -c0 set PCM 1.5dB+ also i had a button for restarting the frontend if it locked up mypower.sh Code: #!/bin/bash
# Script for powerbutton press on Mythtv. Double click (within # timeout) will reboot, single press will restart frontend # /home/mythtv/scripts/mypower.sh # # Adopted from someone a long time ago. Sorry for not # remembering who. DOUBLE_PRESS_TIMEOUT=2 SCRIPTNAME=`basename $0` OLDEST_SCRIPT_PID=`pgrep -o $SCRIPTNAME` OUR_PID=$$ # check if we are the oldest instance of this script if [[ "$OLDEST_SCRIPT_PID" == "$OUR_PID" ]] then killall mythfrontend sleep $DOUBLE_PRESS_TIMEOUT mythfrontend & else # this is a doublepress kill $OLDEST_SCRIPT_PID sudo reboot fi I would like to get this back as it gave the mrs a button to push if it all went wrong, know she just shouts me. |
Author: | weblst [ Thu Feb 26, 2009 2:17 am ] |
Post subject: | |
Yep I have just been through the V6 thing and had a few drama's. Anyway this is what I did to get it to work: Place the following script in /usr/LH/bin and do the usual chmod +x Code: #!/bin/bash FirstClickFile="/home/mythtv/.FirstClick" maxClickTime=3 FirstClick() { date > $FirstClickFile # echo DEBUG: FirstClick! exit } SecondClick() { # If the time between the first and the second click was less than $maxClickTime, restart mythfrontend timeSinceLastClick=$(expr $(date +"%G%m%d%H%M%S") - $(date -f /home/mythtv/.FirstClick +"%G%m%d%H%M%S")) if [ "$timeSinceLastClick" -lt "$maxClickTime" ]; then # echo DEBUG: SecondClick! # sudo killall -s 9 mythfrontend sudo /sbin/reboot else FirstClick fi rm -f $FirstClickFile exit } [ -f "$FirstClickFile" ] || FirstClick SecondClick The add a lirc item to fire it up on the second FAST click as follows: Code: begin
prog = irexec button = pcoff config = /usr/LH/bin/mythrestart.sh end Obvious my script is called mythrestart.sh and this is for a DVICO remote so yours will be a different button. Give me a yell if you need more details. Kudos for the script goes elsewhere I just made it fit my system. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |