Posts: 5
Joined: Fri Mar 13, 2015 3:25 pm

Exit GUI and launch executable

Sun Mar 15, 2015 4:00 pm

I need a way for a script on my Desktop to exit the gui and run an executable. This is what I did so far...

I put "service lightdm stop" into script on my desktop... that will cause it to exit the GUI.

I modified etc/inittab and added this "1:2345:respawn:/bin/login -f root tty1 </dev/tty1 >/dev/tty1 2>&1" so that it will automatically log in with the root account..

There is a program that I want to automatically run at this point but i do not know how. Even though I don't have to log in I still do not see the command prompt until I press alt+f2... not that I need to... I just need my executable to run.

Thanks for any help,

Posts: 3
Joined: Thu Feb 18, 2016 6:16 pm

Re: Exit GUI and launch executable

Thu Feb 18, 2016 6:26 pm

I have the same problem, i need start a script from the desktop of Raspbian Jessie, i make a script with this lines_

sudo service lightdm stop
sudo service lightdm start

The script worked but the emustation can not boot anything, i write this lines in terminal and it works but in a script no, seems like a emustation not have rights to launch any games with script but when i write line to line in terminal works good

Any ideas please ???

Return to “Raspberry Pi OS”