|
boot siptosis with skype on boot without vncserver
Dear all
this is exciting for me and maybe for some of you too. For the last few days spending time searching why siptosis wouldn't start up nicely with skype in /etc/rc.local
I have to say I am doing this a little different than people who use PBX in a Flash(not that I don't use them). This is a test server that only runs CentOS and asterisk, no freepbx. So I don't have all the package that PiaF is using. I am still using Xvfb,but I didn't have to do a xinit. Ok, put things short, I put my script in /etc/rc.local exactly the same way I would do it if I log in. Everything was launched successfully, but siptosis log tells me it can't find the skype client..... Tried millions of other starting script combination and still no luck.
This morning, some ideas sparked over my head. Skype is a user specific application(I am giving the hint now). Remember that we have to accept API connection in the beginning? right ,if you start skype in rc.local ,it doesn't know what user to use and therefore not using the right configuration you did earlier.
Here is how you initiate skype with a user:
su root -c "skype &"
I am using root as my user , you can swap "root" to any other user name that you use.
And here is my full script , please adjust it according to your environment:
Xvfb :0 &
export DISPLAY=:0
su root -c "skype &"
cd /siptosis
./SipToSis_linux
enjoy
Last edited by wardmundy : 02-27-09 at 12:12 PM.
Reason: Cleaned up a few typos. Great code!!
|