Skip to content

session-worker: ensure initial vt is never picked for !is_initial displays

Ray Strode requested to merge wip/fix-autologin-when-not-vt1 into master

Normally, a !is_initial display would never "get" tty1, since the system boots to tty1. But if, for some reason, the user booted to runlevel 3, then switched to runlevel 5, the login screen could get started when tty1 is free.

That means, e.g., an autologin user can end up getting allocated tty1, which is bad, since we assume tty1 is used for the login screen.

This commit opens up /dev/tty1 when querying for available VTs, so that it never gets returned by the kernel as available.

Merge request reports