Forum
launch startx from xbmc menu - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: launch startx from xbmc menu (/thread-755.html)



launch startx from xbmc menu - alexw8 - 8th Apr, 2013 11:57 AM

Well I have to say i have searched allot but allot to do this, but still going crazy, I am hopping someone kind will be able to guide me or help me sort this out.

I have put a button on the main screen that should shutoff xbmc and run startx. now if I do it manually on ssh works great. I have managed to make a py file with the code, but either xbmc shuts off, or desktop starts but does not show since xbmc is up, and that is depending wich I put on top...

here is how far I have gone, and still no success. I guess the big problem is that my second line of os.system does not start not sure why, and second is that they would need to run at the same time. I hope you all understood my problem. Tongue THANKKKSSSSSSS for all your help..

OH AND BEFORE YOU READ FURTHER.... I AM A NOOB... BlushBlushBlush

Code:
import os

mypass = 'raspberry'
sudo_command1 = 'startx'
sudo_command2 = 'sudo /etc/init.d/xbmc stop'
P = os.system('echo %s|sudo -S %s' % (mypass, sudo_command1))
P = os.system('echo %s|sudo -S %s' % (mypass, sudo_command2))



RE: launch startx from xbmc menu - mk01 - 30th Apr, 2013 12:22 AM

create a script (executable, in xbians home dir for example)

chmod +x script

put inside :

#!/bin/sh

sudo pkill xbmc.bin
sudo pkill splash
sleep 10

sudo startx

from inside xvmc execute just this one script