1

When logging in to the Pi (it's connected to a monitor, NOT through SSH), it displays a graphical login screen.

How do I change this to a non-graphical login screen, which is managed by a .py script, which handles authentication, and, if the user logs in, runs the GUI?

4
  • 3
    whats your reason behind this? You can change the option in raspiconfig to boot to a command line, and from there start the gui – Chad G May 7 '19 at 19:00
  • Do you want to make your own login procedure with a python3 script and replace the one from the operating system? – Ingo May 7 '19 at 21:38
  • This is a generic Linux programming question, not specific to the Raspberry Pi. It would be better off in Stack Overflow. – Mark Smith May 8 '19 at 6:54
  • Ingo, yes, that's exactly what I'd like to do. @Chad-G, how would I change that option to boot from a command line? Is it possible to run a .sh script which would launch a .py script to handle login? And how do I start the gui from a command line? – user96931 May 8 '19 at 15:31
1

For booting to the command line, look here https://www.kiwi-electronics.nl/blog?journal_blog_post_id=5&lang=en

There is a setting under system to change boot to CLI (command line interface)

Once you are at the command line,

startx

should get you to the GUI, see here https://www.raspberrypi.org/forums/viewtopic.php?t=9488

You can also set it to login without password, then add the startup of your program to .bashrc

I added

read INPUT
echo $INPUT

as a test, that gives me this

hello     <- I typed this
hello     <- it echoed
chadg:~$     

However, this is not going to be secure, because a user could just exit out of your program and they would be at the command line, then they can still start the GUI or do whatever they want. What is the motivation behind having your own login?

1

In terminal run

sudo raspi-config

One of the boot options is not to display a graphical splash screen. Another option is to boot to the command line

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.