From a88294b92a60aa8727c6878bfda41abafb88d2ae Mon Sep 17 00:00:00 2001 From: Adam Boardman Date: Mon, 29 Mar 2021 10:54:56 +0100 Subject: [PATCH] Re-enable screen lock to allow device sleep now that we've fixed the return from sleep --- lib/systemd/system-sleep/gemian-lock | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 lib/systemd/system-sleep/gemian-lock diff --git a/lib/systemd/system-sleep/gemian-lock b/lib/systemd/system-sleep/gemian-lock new file mode 100755 index 0000000..e033b68 --- /dev/null +++ b/lib/systemd/system-sleep/gemian-lock @@ -0,0 +1,5 @@ +#!/bin/bash +if [ "${1}" == "pre" ]; then + USER=`loginctl list-sessions | grep seat0 | awk '{print $3}'` + /bin/su - ${USER:-gemini} -c "DISPLAY=:0 gemian-lock" +fi