Login after "quit emulation station"
-
Just build my 1st arcade and therefor I am new to RetroPie.
Great work here! I'm impressed with how easy it works and how user friendly the interface is...
I only have one question to which i could not find the anser in the documentation or on this forum. I made my arcade cabinet so that i boots to emulationstation, which is quite nice.
When the user selects the "quit emulation station" i get a command prompt and am logged in at the user pi (who has sudo rights). I would like this to be changed to the login prompt to be shown for security reasons. Does someone know how i can configure this?
-
RetroPie is a gaming oriented setup, so what kind of security are you looking for ? EmulationStation can launch the
raspi-setup
script, or the RetroPie-Setup script, which allows you to edit the auto-start configuration file, so just logging a user out after ES exits it's not really security. You can enable Kiosk/Kid mode in EmulationStation, so that only the front-end and emulators can be launched, plus there's no shutdown/exit menus. -
@mitu you're right indeed
Just found there are more ways to get root Access
- launch the file manager. Then you can give sudo commands
- attach a keyboard and press alt f4. Then you can also give sudo commands...
Basically what i would want to actieve is
- hide the retropie menu for normal use (e.g. in kiosk mode)
- and if for whatever reason the emulationstation process stops, you don't end up on the command prompt, but a login prompt....
-
The thing is, you can't do that with the way RetroPie is set-up. You'll need to disable the
autostart
feature if you want a login screen to be present on the terminal, otherwise a logout from that session will re-login again thepi
(or installation) user automatically. But using the Kiosk/Kid mode in EmulationStation would hide the exit or the RetroPie menu.What's the use case for this 'security' enhancement ?
-
creating the arcade cabinet was a hobby, but i am thinking of bringing it to work or to put in my garage so the local kids can play with it. In a public place i want it to boot up automatically if powered on, but also to prevent someone from being able to login with admin rights too easily.
-
Then the Kiosk mode would be preferable for this kind of setup.
Raspbian has also a 'read-only' mode that can be enabled fromraspi-config
, which makes the SDcard basically read-only. Any modifications done will be lost on the next reboot, so once you set-up the system you can enable the root overlay and it will 'freeze' your installation until it's disabled. I'm not sure if it's available in the current (Raspbian Stretch based) RetroPie image, but it should be in the next release. -
@mitu aha clear tx!!
I noticed the read only overlay is available in raspi-config at my system, probably due to the fact that i did not use the preinstalled image, but used the manual install on buster. It gives a bit of scary warnings when i try to enable, so i'll get another sd card first and then will run some tests. tx for the tip and keep up the good work!
-
i solved this in a simpler way.
I made a python script which generates a "AltF4" keyboard event:
#!/usr/bin/python import keyboard keyboard.send('Alt+f4')
(it requires the pyhon keyboard library. If you don't have it on your system, then give the command "pip install keyboard" to install it.
and added a line to call this script in /opt/retropie/configs/all/autostart.sh:
emulationstation #auto sudo python /opt/altf4/altf4.py
for me it's solved. I still think functionality like this should be included in the normal retropie build. This prevents a security issue (someone can press alt-f4 in emulation station and will have access to the system with sudo rights with entering any password)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.