Just because DISPLAY isn’t set for the current process doesn’t mean X or Wayland aren’t running. For example:
pkexec env DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration
still triggers this bug (because pkexec does not propagate environment variables), and you can imagine any number of other ways this might happen, like packagekit or unattended-upgrades.
Just because DISPLAY isn’t set for the current process doesn’t mean X or Wayland aren’t running. For example:
pkexec env DEBIAN_ FRONTEND= noninteractive dpkg-reconfigure keyboard- configuration
still triggers this bug (because pkexec does not propagate environment variables), and you can imagine any number of other ways this might happen, like packagekit or unattended- upgrades.