swaywm / swaylock

Screen locker for Wayland
MIT License
853 stars 201 forks source link

Add a warning to the readme that tty switching will still work #365

Closed Volker-Weissmann closed 4 months ago

Volker-Weissmann commented 4 months ago

Hello,

I had my machine configured to have

I thought for long that locking the screen with swaylock would be safe in this configuration, since you can't unlock the screen without the password/fingerprint and you cannot reboot without the FDE password.

Then I realized you can still press "Ctrl + Alt + F3" to get a console where you are logged in (due to services.getty.autologinUser) and i.e. download and run a script.

I nearly got a heart attack and I hope you can imagine how I felt.

Can you please add a note that roughly says "Be aware that swaylock does not prevent Ctrl + Alt + F3" to the readme and the manpage?

kennylevinsen commented 4 months ago

It’s not related to swaylock. It’s your compositor (hyprland) that listens to the keybinding and requests the VT switch, and it is what decides any locking policy. Having a warning for swaylock won’t help much if you had run any other of numerous lock screens.

I would strongly recommend against the idea of autologin of more than the single session you boot to, even if your compositor promised to block VT switching as other things can also issue a chvt outside compositor control. I would recommend adding such warning to the nixos documentation for the autologin getty feature to avoid accidental use without the risk being clear.