[SOLVED] Debian Jessie - SystemD - Auto login on tty1 ONLY
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150
Rep:
Debian Jessie - SystemD - Auto login on tty1 ONLY
Basically what it says, this is for a rpi3 b, but should be systemd generic, I can auto login on all consols but I need to just do an auto login on console 1 ( tty1 ) switching to eg tty2 with ALT F3 should NOT do an auto login but just use the normal console login prompt, I looked at this: https://blog.sleeplessbeastie.eu/201...t-the-console/
But changing the tty3 to tty1 didn't help as I was still auto logging in at the other consoles.
Plenty of examples of how to turn auto login on/off on google but they all effect all the consoles, I just want console 1 ( tty1 )
The instructions in that link work on my Sid box with one exception: the directory /etc/systemd/system/getty.target.wants can only contain symlinks. So I put the "service" file in the parent directory and linked to it.
Code:
root@debian:/etc/systemd/system# ll getty*
-rw-r--r-- 1 root root 1768 Sep 22 15:50 getty@tty1.service
getty.target.wants:
total 0
lrwxrwxrwx 1 root root 21 Sep 22 15:41 getty@tty1.service -> ../getty@tty1.service
root@debian:/etc/systemd/system# pgrep -a getty
959 /sbin/agetty --noclear tty2 linux
960 /sbin/agetty --noclear tty3 linux
961 /sbin/agetty --noclear tty4 linux
962 /sbin/agetty --noclear tty5 linux
963 /sbin/agetty --noclear tty6 linux
2615 /sbin/agetty --login-pause --autologin root --noclear tty1 linux
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150
Original Poster
Rep:
Thanks ondoho, this is exactly what I wanted, the instructions where a bit confusing as it implies you only have to add the lines shown, this caused a hang on tty1, I had to copy all the contents of the service file and change just those lines in the link, but it now works.
Sorry I snapped a bit in my second post, I had just deleted the partition table from a 2T disk, and then snapped the sd card for my pi! So as you can imagine I was in a bit of a mood, sorry
Sorry I snapped a bit in my second post, I had just deleted the partition table from a 2T disk, and then snapped the sd card for my pi! So as you can imagine I was in a bit of a mood, sorry
no offence taken, no worries! ALL CAPS in itself does not irritate me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.