You are not logged in.
Hi there!
I've been searching around for a while. What I would like to do is have myself logged into a few ttys automatically after I log into tty1. I'd like to achieve something like in Ubuntu where one can change between ttys, but only 7 is running X.
I've tried this:
https://wiki.archlinux.org/index.php/Ge … al_console
But this logs me into tty1 automatically without password. I would like Arch to ask for a password at login. This doesn't start any other tty.
This would be good if I could launch this with tty2...4 after I log into tty1.
I've noticed that X starts only once, if I log into tty2 after tty1 it doesn't start and that's what I want it to do (automatically).
Could anyone give me a hint on how to achieve this? Thanks in advance. ![]()
Last edited by Lemongrass (2017-05-06 10:41:27)
Offline
See: https://wiki.archlinux.org/index.php/Xi … X_at_login You can change the if statement to only startx on tty7.
By default only one tty is created, other aren't created until you switch to them. To change that see: https://wiki.archlinux.org/index.php/Sy … _gettys.3F
Then, for each tty you want to automatically login to you need to create a /etc/systemd/system/getty@tty1.service.d/override.conf with the desired number.
Last edited by Ziusudra (2017-05-05 23:36:52)
Offline
I'd like to achieve something like in Ubuntu where one can change between ttys, but only 7 is running X.
CTRL-ALT-Fx lets you switch among the ttys in Arch too. With the exception that tty1 runs X by default in Arch (as opposed to tty7 in Ubuntu) I'm not aware of any other noticeable differences. Ubuntu still requires that you login to each tty independently.
Thinking out loud, you could get part way there by adding additional, pre-activated ttys on startup as described here: https://wiki.archlinux.org/index.php/Sy … _gettys.3F ...and modifying the unit files to add tty1 as a dependency (https://wiki.archlinux.org/index.php/Sy … pendencies) . You would also modify these subsequent ttys to use --autologin as you've seen already.
I don't think this will quite get you what you want though as this will simply autologin the additional ttys when the tty1 service is started, regardless of whether a successful login has occurred. My systemd knowledge is pretty limited so I'm not sure how you could modify a unit file to make an existing successful login/user session a dependency for starting a service...
I'm curious why you'd want to do this though?
Offline
Thank you both for your replies! ![]()
I've checked my Lubuntu VM's behaviour. Indeed it is as you said, chr0mag, I have one tty running X, the others prompt me for username and password. I remembered that I didn't have to log in to another tty, but it seems, I was wrong.
I wonder does that introduce a security risk if I log into multiple ttys at once? It seems Ubuntu doesn't do this.
I'm curious why you'd want to do this though?
To have a tty in case my DE or OS is about to crash. Recently I have written a Python script to do heavy calculations, and one of the versions contained a code that was just too much for my OS to bear, it froze. Another time I used too many programs as once: Firefox, Chromium, Spotify, (megasync?), Libreoffice, a Windows 10 VM (doing its updates?) and Evince. It was just too much. I couldn't do anything. (Since then I enabled a 10 GB swap in addition to my 8 GB RAM).
For such cases it would be handy to have a tty where I can stop one of the processes without any GUI thing. In a DE it takes a click or a hotkey to start a terminal and that is not as likely to succeed as a simple no-GUI console.
Last edited by Lemongrass (2017-05-06 10:41:13)
Offline
I wonder does that introduce a security risk if I log into multiple ttys at once? It seems Ubuntu doesn't do this.
No, why would it?
For such cases it would be handy to have a tty where I can stop one of the processes without any GUI thing.
This has always been available - there is no special configuration needed. Just hit Ctrl-Alt-F2 (or Ctrl-Alt-F3, etc) to get to a different tty.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline