[Linux] need to exec some bash commands after boot?
#1
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

#!/bin/bash
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
Reply
#2
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.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#3
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?)
Reply
#4
What happened when you had it in your .xinitrc?
Reply
#5
wouldn't do anything, it would echo errors saying no display.
Reply
#6
i believe xbmc executes autoexec.py when it loads ...
The normal XBMC log IS NOT a debug log, to enable debug logging you must toggle it on under XBMC Settings - System or in advancedsettings.xml. Use XBMC Debug Log Addon to retrieve it.
Reply

Logout Mark Read Team Forum Stats Members Help
[Linux] need to exec some bash commands after boot?0