Here's my script for launching sbpd at start-up. I originally put the
sbpd command into a script file because I had so may buttons configured
that the command was too long to be launched as a User Command. But
having it as a script now allows for the necessary extra steps, such as
launching the pigpio daemon and loading the uinput module.
Save this text in a file called sbpd-script.sh in the home folder of the
default 'tc' user.
Code:
--------------------
#!/bin/sh
# start pigpiod daemon
pigpiod
# give the daemon a moment to start up before issuing the sbpd command
sleep 1
# load uinput module, then set the permission to group writable, so you don't
need to run sbpd with root permissions
sudo modprobe uinput
sudo chmod g+w /dev/uinput
# issue the sbpd command
sbpd e,20,21,KEY:KEY_UP-KEY_DOWN,2 b,26,KEY:KEY_RIGHT,2,0,KEY:KEY_LEFT,500
--------------------
To get this script to run when pCP boots, add this line as a user
command at the end of the 'Tweaks' section.
[image:
http://www.cjh.me.uk/MyPhotobucket/cache/DIYHifi/Tweaks_1024.jpg]
------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=107001
_______________________________________________
diy mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/diy