Posts: 6
Joined: Mar 2012
Reputation:
0
2012-03-05, 23:53
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?
Any ideas welcome!
Posts: 854
Joined: May 2008
Reputation:
6
Hi,
try adding it to /etc/rc.local
cheers
HTPC 1 : Acer revo R3700 ion2
HTPC 2 :Apple TV2
HTPC 3 : Apple TV2
HTPC4 Acer revo R3700 ion2
Remote : x2 Riimote2
SERVER : 10TB Ubuntu Server 10.04, dual wintv nova hd s2 cards, tvheadend, Newcs, Omnikey reader, White *Sky uk* Card, Mysql Db, Sabnzbdplus, SickBeard, Couchpotato, FlexRaid. :cool:
--------------------------------------------
Posts: 67
Joined: Jan 2010
Reputation:
0
what he said--^ Be sure to put in the complete path to the script as well.
Posts: 6
Joined: Mar 2012
Reputation:
0
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.
Ideas?
Posts: 703
Joined: May 2009
Reputation:
2
erhnam
Team-XBMC Live Developer
Posts: 703
XBMCbuntu uses the /etc/xbmc/ dir for script execution at boot.
/etc/xbmc/setup.d/ -> these script are executed once (at installation boot time)
/etc/xbmc/live.d/ -> these scripts are executed every time xbmc starts
You might try to add your script to the /etc/xbmc/live.d/ directory.
Posts: 6
Joined: Mar 2012
Reputation:
0
Perfect, thanks.
It didnt work in setup.d but worked in /etc/xbmc/live.d/
I now have working xbox controllers on boot!
Posts: 520
Joined: Jun 2011
Reputation:
2
Is there some other way to run a script automatically?
I have created ati.sh in live.d with
DISPLAY=:0 aticonfig --pplib-cmd "set fanspeed 0 10"
but for some reason it does not seem to run. It runs fine form the command line when logged on. (xbmcbuntu)
Posts: 520
Joined: Jun 2011
Reputation:
2
solution dlast ubuntu forums
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