summaryrefslogtreecommitdiff
diff options
authorPierre Equoy <pierre.equoy@canonical.com>2022-07-05 15:24:47 +0200
committerPierre Equoy <pierre.equoy@canonical.com>2022-07-05 15:24:47 +0200
commit7aee6e5c28ee96bd931e6b87241f8f841da3f6d5 (patch)
tree8f05de6401b1eca2bcfff2414526f48315e43a85
parent2c7d8f37df86c4ed84a82301372e51ddd19d47ee (diff)
Fix: lock session in fingerprint test even when using Wayland
Previous method emulated keystrokes to trigger the GNOME lock screen (Super+L). This does not work with Wayland security model. Instead, use loginctl which allows to lock all the open sessions at once. This works locally as well as through SSH and also with Checkbox remote. LP: #1980475
-rw-r--r--units/fingerprint/jobs.pxu11
1 files changed, 1 insertions, 10 deletions
diff --git a/units/fingerprint/jobs.pxu b/units/fingerprint/jobs.pxu
index 3dc4ecb..76ed7e9 100644
--- a/units/fingerprint/jobs.pxu
+++ b/units/fingerprint/jobs.pxu
@@ -89,16 +89,7 @@ id: fingerprint/unlock
depends: fingerprint/verify-match
user: root
command:
- python3 <<EOF
- from evdev import UInput, ecodes as e
- ui = UInput()
- ui.write(e.EV_KEY, e.KEY_LEFTMETA, 1)
- ui.write(e.EV_KEY, e.KEY_L, 1)
- ui.write(e.EV_KEY, e.KEY_LEFTMETA, 0)
- ui.write(e.EV_KEY, e.KEY_L, 0)
- ui.syn()
- ui.close()
- EOF
+ loginctl lock-sessions
_summary: Fingerprint unlock screen
_purpose:
This test will verify that a fingerprint reader can be used to unlock a locked system.