wait4remote is tiny utility that you can use from bourne shell scripts to wait for a button push on the remote controller.
# ./wait4remote - wait for keys or buttons to be pushed on remote control [-v] [-t sec] x,str [ y,str ... ] options: -v : verbose, print key codes -t sec : timeout waiting for button after 'sec' seconds x,str : 1,eject 2,info. Return 1 when Eject button pushed If this program does not know the remote control key code, you can use 1,239 for EJECT. Jorgen Lundman <firstname.lastname@example.org>
If you use "1,EJECT 2,INFO" as the argument, wait4remote will return code "1" when EJECT button is pushed, or "2" when INFO button is pushed.
If bourne shell you can use:
wait4remote 1,EJECT 2,INFO if [ $? = 2 ]; then echo "INFO button was pushed" fi
If the lirc startup warnings are annoying, just create an empty file.
# cd /tmp # touch .wait4remoterc # ./wait4remote 1,239