Skip to content

Instantly share code, notes, and snippets.

View tgfrerer's full-sized avatar

Tim Gfrerer tgfrerer

View GitHub Profile
@tgfrerer
tgfrerer / 1-Yubikey_session_lock.md
Last active June 14, 2023 11:05 — forked from jhass/1-Yubikey_session_lock.md
Lock (Gnome) session when removing Yubico U2F key

Setup

  1. Copy 99-u2f_lock_screen.rules to /etc/udev/rules.d.
  2. Copy gnome_lock_all_sessions to /usr/local/bin.
  3. Mark gnome_lock_all_sessions as executable: chmod +x /usr/local/bin/gnome_lock_all_sessions
  4. Reload udev: udevadm control -R

Note

You might have to update the ENV{ID_MODEL_FROM_DATABASE} value in 99-u2f_lock_screen.rules to match the type of Yubikey that you are using. You can query it by issuing: