Never tried that, but setting NAutoVTs=0 should spawn no gettys at all. You definitely want a ReserveVT set to have a emergency console though. For the keyboard, there is a DontVTSwitch setting in Xorg, but I'd vote not to disable it because what's wrong with having plenty of ttys? If the display manager on the machine hangs, you'd have to power cycle.
2 comments
Never tried that, but setting NAutoVTs=0 should spawn no gettys at all. You definitely want a ReserveVT set to have a emergency console though. For the keyboard, there is a DontVTSwitch setting in Xorg, but I'd vote not to disable it because what's wrong with having plenty of ttys? If the display manager on the machine hangs, you'd have to power cycle.
If you know a bit of C, you could write a tiny program to call
ioctlVT_LOCKSWITCH, e.g: https://github.com/benruijl/sflock/blob/master/sflock.c#L144-L151