[Linux] need to exec some bash commands after boot? - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Off-Topic (/forumdisplay.php?fid=34)
+--- Forum: Off-Topic Discussion (/forumdisplay.php?fid=113)
+--- Thread: [Linux] need to exec some bash commands after boot? (/showthread.php?tid=58043)
[Linux] need to exec some bash commands after boot? - khuong - 2009-09-16 18:41
Hi, I'm trying to figure out how to run a set of bash commands, or exec a bash script after XBMC has booted, and I can't seem to figure it out, in ubuntu forums or here, so I decided to ask.
the script/commands are as follows
echo xbmc | sudo -S aticonfig --set-dispattrib=tmds2i,positionX:0
echo xbmc | sudo -S aticonfig --set-dispattrib=tmds2i,positionY:0
echo xbmc | sudo -S aticonfig --set-dispattrib=tmds2i,sizeX:1920
echo xbmc | sudo -S aticonfig --set-dispattrib=tmds2i,sizeY:1080
obviously, i'm echoing the sudo password in case it needs it, i tried to put it in .xinitrc, i tried to put it in xsession (but figured that runXBMC overwrites it) so that failed.
my setup is..
ubuntu bare system + xbmc + xbmc live helper (to autostart it) no gnome/kde or anything, just boots straight to xbmc!
any help would be nice! thanks (if you're curious, my tv underscans the res for some reason, and those set of commands, fixes it, i hate having a black border)
i'm hoping there's a easy solution, if not, my last resort i guess would be to make a python script to run at xbmc boot to do it! but that requires me to learn some python
- topfs2 - 2009-09-16 19:15
If you don't care for when it's executed /etc/rc.local is rather good (read, may be well after XBMC has launched). it's also executed as root so you won't need to do the echo stuff.
- khuong - 2009-09-16 19:21
heh, i tried that too, but it needs to be exec'ed after xbmc has launched..
i managed to get it to run as a python script, i hate to hijack my own thread but, is there away to make xbmc run a python script after it loads? (i.e after splash screen and goes to home window?)
- crego - 2009-09-16 19:39
What happened when you had it in your .xinitrc?
- usererror - 2009-09-16 19:49
wouldn't do anything, it would echo errors saying no display.
- CrashX - 2009-09-16 20:31
i believe xbmc executes autoexec.py when it loads ...