XBMCbuntu - Run script on startup? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: XBMCbuntu - Run script on startup? (/showthread.php?tid=124781) |
XBMCbuntu - Run script on startup? - addictweb - 2012-03-05 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! - harryzimm - 2012-03-06 Hi, try adding it to /etc/rc.local cheers - opensauce - 2012-03-06 what he said--^ Be sure to put in the complete path to the script as well. - addictweb - 2012-03-06 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 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. Am I missing something? - addictweb - 2012-03-07 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? - erhnam - 2012-03-07 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. RE: XBMCbuntu - Run script on startup? - addictweb - 2012-03-19 Perfect, thanks. It didnt work in setup.d but worked in /etc/xbmc/live.d/ I now have working xbox controllers on boot! RE: XBMCbuntu - Run script on startup? - bilbonvidia - 2012-03-20 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) RE: XBMCbuntu - Run script on startup? - bilbonvidia - 2012-03-21 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 RE: XBMCbuntu - Run script on startup? - paperwaste - 2012-06-12 hi i have a script to set the overscan/underscan for my monitor because ATI are a pack of fools and don't have a configuration for this in CCC Quote:#!/bin/bash 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 RE: XBMCbuntu - Run script on startup? - MArKiTo79 - 2012-10-11 (2012-03-19, 21:31)addictweb Wrote: Perfect, thanks. 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 Thanks already! |