I have written a script to enable xboxdrv with 4 controllers to use with mupen64 under XBMCbuntu. The script runs fine when i navigate to its location and type "$script start"
I've made it executable: $chmod +x script
Its located in /etc/init.d/
I've installed it with $sudo update-rc.d script defaults which works, trying to run it again confirms the start and stop links already exist.
However when I boot it doesn't run. I cant work out why, I assume XBMCbuntu should run startup scripts like normal ubuntu?
2012-03-06, 21:49 (This post was last modified: 2012-03-06, 22:33 by addictweb.)
opensauce Wrote:what he said--^ Be sure to put in the complete path to the script as well.
Thanks guys, gave that a try. My rc.local now looks like the below but it still does not run.
Quote:#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Start xboxdrv controllers using custom start-up script
/home/xbmc/xboxdrv/xboxdrv start
exit 0
That exact command "/home/xbmc/xboxdrv/xboxdrv start" works when put directly in the terminal. I dont need to sudo or anything so I assume its not a permission issue.
The script outputs logs to file but no logs are created on boot suggesting the script is not executed at all.
I thought it might be something to do with the /home/ directory so I moved the script to /etc/xboxdrv - still no luck on boot but fine from xTerm. Both the script and rc.local are executable as well.
I made it work by putting the command into a script (/usr/local/bin/setfanspeed ; don't forget to chmod +x setfanspeed) and setting this script in /etc/lightdm/lightdm.conf : adding a line
display-setup-script=/usr/local/bin/setfanspeed
for debugging the script startup you can also add some redirection of the output and log it into a file:
DISPLAY=:0.0 aticonfig --pplib-cmd "set fanspeed 0 20" 2> /tmp/setfanspeed.err.log > /tmp/setfanspeed.log
i have saved it in /etc/xbmc/setup.d/ and have made it executable, it runs fine in the terminal and the file browser but does not run on startup, i have tried saving it in live.d also and that does not help
It didnt work in setup.d but worked in /etc/xbmc/live.d/
I now have working xbox controllers on boot!
Hi addictweb.
Would you mind sharing the script you've put in the directory /etc/xbmc/live.d please? What is the filename of the script?
I managed to get it working as explained here: http://forum.xbmc.org/showthread.php?tid=98824
But when I call that script in rc.local, it doesn't work after reboot. When I read that you got it working, I'm happy for you but I want that too