[systemd-devel] Rethinking getty and fast user switching

Lennart Poettering lennart at poettering.net
Mon Feb 20 10:49:06 PST 2012

On Mon, 20.02.12 18:28, Colin Guthrie (gmane at colin.guthr.ie) wrote:

> > 3. On boot, on both kinds of systems: All ttys != tty1 are unallocated
> OK, not quite what I get here - getty's are not fully hotplugged I
> guess, but all the same, but I accept this is the most sensible setup
> and I'll look at why I'm not getting this right now!

Oh, you probably updated from an older version of systemd, before we
implemented logind. At that time gettys were still spawned
unconditionally via symlinks in
/etc/systemd/system/getty.target.wants/. You should remove the symlinks
in there now, but leave tty1 in.

> > 4. If via graphical fast user switching a new X sesison is oppened, the
> >    first unallocated tty is taken
> Yes, but this has to happen from a logged in (or logged in but locked)
> user session in software...

Yes? Not sure what you try to day.

> > 5. If the user switches to tty2-tty6 and it is unallocated a getty will
> >    be spawned on it. The maximum number of ttys this happens for is
> >    configured in systemd-logind.conf.
> Yeah it's basically this bit I want to change... rather than always
> starting getty, it should start an "appropriate" login agent: i.e. getty
> for when the current target is multi-user.target, and gdm when it's
> graphical.target.

You want that Alt-Fn5 on a previously unallocated tty spawns a new gdm
login there if I have graphical logins?

Interesting idea, need to think about this, but maybe something to leave
for the wayland future, since it would otherwise need some complex gdm
chnages, and possibly even interaction between logind and gdm.

> > Also, we provide some compatibility with classic systems,
> > since tty2-6 are text gettys, 
> I don't think "some compatibility" really flies here.. either it's
> compatible or it's not. Any change in the scheme is a change and will
> annoy some people and please others. I think "some" compatibility is not
> really worth it.

Well, I think the noise level of users will be louder if we make all of
F1-F6 go graphical, than just one. I mean, people are used to look for
terminals on F1-F6, and we'd take that all away, not just one.

> > if the user wants that, but if people use
> > no text gettys at all and only graphical user switching they are all
> > graphical logins instead.
> Yeah but this scheme breaks down when "Mum" (in my previous example),
> who *always* logs in on tty2 sits down at the (unknown to her, freshly
> rebooted) machine and hits, ctrl+alt+f2. Rather than the locked session
> screen she was expecting, a text login appears which she really didn't
> expect and doesn't even know what to do with. Sure she may swtich back
> to Dad's login on tty1, but if he's not logged in yet, then she'll get
> tty1 and he'll have to use tty2 and that's just not how they normally do
> things in that house... he's tty1 and she's tty2 and they both know that
> and you can't open up another login screen from a greeter as that
> doesn't really make sense in terms of software options. This way if all
> the users of the house have a kind of pre-arranged agreement as to where
> "their" session lives, they can do that very easily. No more "search for
> the X" game as mentioned by Dax.

I think the idea is that people switch sessions via FUS from within the
session and C-A-Fx is left to the freaks who know what a text login is.

> The same thing that happens if there are more than 9 (or 12 maybe as F12
> is available even if it's some what reserved perhaps?) - you're SoL...
> but to be honest these "reservations" were really just discussion points
> rather than any solid number I've carefully come up with. I only really
> suggested some fixed text logins for "emergency" use when the graphics
> card is being dumb or the graphical login agent has a messed up greeter
> pam config or similar - rebooting to rescue.target would be a bit of a
> pain for us developers. I'd be more than happy to just say only 1 login
> is reserved for text only logins by default and ttys 1-11 are reserved
> for "appropriate" login prompts.

I do see some benefit in always having a text login bound to some
key. Right now if people open 6 graphical sessions on F1-F6 there's no
chance to get a getty anymore. That is certainly suboptimal. Maybe
logind should reserve tty9 or so for text logins, so that gdm never can
take it.


Lennart Poettering - Red Hat, Inc.

More information about the systemd-devel mailing list