Ref: http://www.kubuntuforums.net/showthr...332#post307332
Here are the configuration changes and scripts I have created to enable multi-user LIRC. They could possibly use some improvement.
/etc/lirc/start_ir.sh
/etc/lirc/stop_ir.sh
/etc/lirc/all_user_lircrc
Everything below this is for each user that can login. If these are not created for a user, they will not get LIRC to run for them.
~/.lircrc
~/lock_script.sh
~/unlock_script.sh
~/.kde/Autostart/start_ir.sh is a soft link to /etc/lirc/start_ir.sh
~/.kde/shutdown/stop_ir.sh is a soft link to /etc/lirc/stop_ir.sh
~/.kde/share/config/kscreenlocker.notifyrc
Here are the configuration changes and scripts I have created to enable multi-user LIRC. They could possibly use some improvement.
/etc/lirc/start_ir.sh
Code:
#!/bin/bash date >> ~/irlog.txt echo "Starting IR" >> ~/irlog.txt irexec & lircrcd ~/.lircrc &
Code:
#!/bin/bash date >> ~/irlog.txt echo "Stopping IR" >> ~/irlog.txt killall irexec killall lircrcd
Code:
#! lircrcd *** stuff that should work for all users ***
~/.lircrc
Code:
#! lircrcd include /etc/lirc/all_user_lircrc *** lirc stuff specific to this user ***
Code:
#!/bin/bash ~/.kde/shutdown/stop_ir.sh #other things to do when the users screen gets locked
Code:
#!/bin/bash ~/.kde/Autostart/start_ir.sh #other things to do when the users screen gets unlocked
~/.kde/shutdown/stop_ir.sh is a soft link to /etc/lirc/stop_ir.sh
~/.kde/share/config/kscreenlocker.notifyrc
Code:
[Event/locked] Action=Execute Execute=~/lock_script.sh KTTS= Logfile= Sound= [Event/unlocked] Action=Execute Execute=~/unlock_script.sh KTTS= Logfile= Sound=