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. THANKKKSSSSSSS for all your help..
OH AND BEFORE YOU READ FURTHER.... I AM A NOOB...
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. THANKKKSSSSSSS for all your help..
OH AND BEFORE YOU READ FURTHER.... I AM A NOOB...
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))