p1rat3 wrote:Hello!
I was wondering if there is a specific reason for Ctrl+Alt+F1 dropping you into a logged-in tty1 console session even if the user has logged out in the GUI.
If you have it set for autologin it applies to both the console and desktop. If you log out of the desktop and go to console it will log you in automatically, since it's set for autologin.
For autologin it uses "autologin@.service". For a login prompt it uses "getty@.service". One of those will be linked to "
getty@tty1.service" which is used by both the console and desktop.
That's what raspi-config does, it links either "autologin@.service" or "getty@.service" to "
getty@tty1.service" depending on whether you choose to autologin or not.
So if you use this command
Code: Select all
ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
that will set "
getty@tty1.service" to autologin.
If you use this command
Code: Select all
ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
that will set "
getty@tty1.service" to provide a login prompt.
It doesn't matter if you're using "multi-user.target" (console), or "graphical.target" (desktop) they both use the same "
getty@tty1.service". So if you link "autologin@.service" to it both the desktop and console will be set to use autologin. That's why it logs you in automatically if you switch to console.