Robbie Hogg
Posts: 22
Joined: Sun Aug 13, 2017 12:57 am
Location: Australia

Shortcut to exit raspbian desktop

Sun Aug 27, 2017 5:10 am

G'day all.
I have my Pi setup 99% of the way that i want it as an entertainment center. :)
I have installed retropie from an image with kodi, installed the raspberian desktop and set it up to boot in to the desktop where i will be 90% of the time.
So far the only way i have found to shut down the desktop and get back to the terminal so i can run emulationstation is by doing ctrl, alt ,f1.
Logging out just sends me back to login and from what i have read this is what happens when it's setup to boot to the desktop.
Is there a shortcut script that will exit the desktop and take me to the terminal or exit and run emulationstation straight away?
I don't want to set it up to boot to the command line or retropie, reason being that my wife will be using it mostly for music and media and just makes it easier to use this way.
Any help would be greatly appreciated.

bask185
Posts: 120
Joined: Thu Mar 09, 2017 11:39 am
Location: Netherlands

Re: Shortcut to exit raspbian desktop

Mon Aug 28, 2017 2:06 pm

You can make your own desktop shortcut. In the the home folder there is a folder 'Desktop'. There you can create a new text file following a certain layout which creates a shortcut which can be linked to many terminal commands or the execution of a shellscript.
http://www.raspberry-projects.com/pi/pi ... -shortcuts
I only don't know how you properly logout of pixel with a terminal command. I believe it was simply 'logout'

klricks
Posts: 6615
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Shortcut to exit raspbian desktop

Mon Aug 28, 2017 5:13 pm

Not sure if this will help you but [Ctrl] [Alt] [F6] will completely exit desktop to CLI.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

Robbie Hogg
Posts: 22
Joined: Sun Aug 13, 2017 12:57 am
Location: Australia

Re: Shortcut to exit raspbian desktop

Wed Aug 30, 2017 6:57 am

Thanks guys i will check it out.
I had tried making my own shortcuts but everything i do just returns me back to the Pi login.
For now i have just set it up to boot into Retropie then have set it up so that it is relatively easy for my wife to get into the desktop. Will see how it goes. If i have problems i will re look at setting up a shortcut.

hippy
Posts: 6233
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Shortcut to exit raspbian desktop

Wed Aug 30, 2017 12:10 pm

Robbie Hogg wrote:
Sun Aug 27, 2017 5:10 am
Is there a shortcut script that will exit the desktop and take me to the terminal or exit and run emulationstation straight away?
Form previous discussion and how I understand it; that's not possible. If one boots to auto-starting the desktop there is no command line to exit to -

viewtopic.php?f=66&t=162647

One could presumably have a setting stored somewhere which will persist across reboots and shutdowns, always boot to CLI then have that setting decide whether to stay in CLI or auto-launch the desktop. Add a CLI and a desktop program to allow easy adjustment of that setting, even invoke the reboot.

User avatar
RaTTuS
Posts: 10498
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Shortcut to exit raspbian desktop

Wed Aug 30, 2017 12:25 pm

auto boot to the command line
set up a
startx
in the .bashrc file like

Code: Select all

if [ $(tty) == /dev/tty1 ]; then
 startx
fi
then when you exit the desktop you drop to a commandline prompt
if you exit that they you'll drop back to a desktop

if you shutdown from the desktop then it will all shutdown nicety
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Robbie Hogg
Posts: 22
Joined: Sun Aug 13, 2017 12:57 am
Location: Australia

Re: Shortcut to exit raspbian desktop

Thu Aug 31, 2017 7:00 am

Sweet as RaTTuS.
Cheers for that, will give it a go. :)

Return to “General discussion”