From unknown Sat Aug 16 16:18:34 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41502] [PATCH] Add subsection to cookbook about session locking with xss-lock Resent-From: Chris Boeg Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 May 2020 09:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41502 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41502@debbugs.gnu.org Cc: Chris =?UTF-8?Q?B=C3=B8g?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159031376726909 (code B ref -1); Sun, 24 May 2020 09:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2020 09:49:27 +0000 Received: from localhost ([127.0.0.1]:36506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcnG2-0006zq-Ej for submit@debbugs.gnu.org; Sun, 24 May 2020 05:49:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:44160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcmPK-0005fa-CV for submit@debbugs.gnu.org; Sun, 24 May 2020 04:55:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcmPK-0003hC-4B for guix-patches@gnu.org; Sun, 24 May 2020 04:54:58 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:34193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcmPI-0005FC-JD for guix-patches@gnu.org; Sun, 24 May 2020 04:54:57 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8EEAF5C0084; Sun, 24 May 2020 04:54:54 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 24 May 2020 04:54:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=fpxWhi mw0EF1T0r7UAl9W+amt5mwuMd9R5zpUXNuwWY=; b=we22vn5H3pvbiqxMl+EgLU vmkkj7j4kPntXs2SxwpYmw7YeUD6dZHxtVwkMHN7dQ2EDyg3aDV5CV/HgmK+IJ4C xrxzaMxOvahw2BEm1cRu6tQxL0d0CO97uUlMaYwGJzT+s2FXcncYCIS6xvHLXoQJ GApwvVvlzaBmKzQcOUz3Qripe6928wVeUzv04SxeRAzLFZd5yqM28yLFJTlZOUAu RmSW8jJ3aG3fePvcCVpgirf01w8pdFZY5dnD65i+lBoT4ualqur88e53PIL1ro2f 8fGDJWgixJKvbMvTvpLOsIP5HZ8e5lqvxVoGYGoLL/UBujKWIkdDW5Zo52Vfbqxw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddukedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffogggtgfesthekredtredtjeenucfhrhhomhepvehhrhhishcu uehovghguceotghhrhhishessghovghgrdhmvgeqnecuggftrfgrthhtvghrnheptdelte evgfejveefieeifeejiedttefgheehffdtvdekleehgefhleeliefghfetnecuffhomhgr ihhnpehmrghnkhhivghrrdgtohhmnecukfhppeeghedruddvledrheeirddvtdejnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheptghhrhhishes sghovghgrdhmvg X-ME-Proxy: Received: from localhost.localdomain (unknown [45.129.56.207]) by mail.messagingengine.com (Postfix) with ESMTPA id CCA193066516; Sun, 24 May 2020 04:54:53 -0400 (EDT) From: Chris Boeg Date: Sun, 24 May 2020 10:54:07 +0200 Message-Id: <20200524085407.13352-1-chris@boeg.me> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=66.111.4.26; envelope-from=chris@boeg.me; helo=out2-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/24 04:54:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Mailman-Approved-At: Sun, 24 May 2020 05:49:24 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: Chris Bøg --- doc/guix-cookbook.texi | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 2a605276e6..4e031859c0 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -1617,6 +1617,47 @@ Then you need to add the following code to a StumpWM configuration file (set-font (make-instance 'xft:font :family "DejaVu Sans Mono" :subfamily "Book" :size 11)) @end lisp +@node Session lock +@subsection Session lock +@cindex sessionlock + +Depending on your environment, locking the screen of your session might come built in +or it might be something you have to set up yourself. If you use a desktop environment +like GNOME or KDE, it's usually built in. If you use a plain window manager like +StumpWM or EXWM, you might have to set it up yourself. + +@node Xorg +@subsubsection Xorg + +If you use Xorg, you can use the utility +@uref{https://www.mankier.com/1/xss-lock, xss-lock} to lock the screen of your session. +xss-lock is triggered by DPMS which since Xorg 1.8 is auto-detected and enabled if +ACPI is also enabled at kernel runtime. + +To use xss-lock, you can simple execute it and put it into the background before +you start your window manager from e.g. your @file{~/.xsession}: + +@example +xss-lock -- slock & +exec stumpwm +@end example + +In this example, xss-lock uses @code{slock} to do the actual locking of the screen when +it determines it's appropriate, like when you suspend your device. + +For slock to be allowed to be a screen locker for the graphical session, it needs to +be made setuid-root so it can authenticate users, and it needs a PAM service. This +can be done by adding the following service to your @file{config.scm}: + +@lisp +(screen-locker-service slock) +@end lisp + +If you manually lock your screen, e.g. by directly calling slock when you want to lock +your screen but not suspend it, it's a good idea to notify xss-lock about this so no +confusion happens. This can be done by executing @code{xset s activate} immediately +before you execute slock. + @node Setting up a bind mount @section Setting up a bind mount -- 2.26.2 From unknown Sat Aug 16 16:18:34 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41502] [PATCH v2] Add subsection to cookbook about session locking with xss-lock References: <20200524085407.13352-1-chris@boeg.me> In-Reply-To: <20200524085407.13352-1-chris@boeg.me> Resent-From: Chris Boeg Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 May 2020 10:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41502 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41502@debbugs.gnu.org Cc: Chris =?UTF-8?Q?B=C3=B8g?= Received: via spool by 41502-submit@debbugs.gnu.org id=B41502.159031713532376 (code B ref 41502); Sun, 24 May 2020 10:46:02 +0000 Received: (at 41502) by debbugs.gnu.org; 24 May 2020 10:45:35 +0000 Received: from localhost ([127.0.0.1]:36539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jco8N-0008Q7-Fw for submit@debbugs.gnu.org; Sun, 24 May 2020 06:45:35 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:43965) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jco8K-0008Pq-DW for 41502@debbugs.gnu.org; Sun, 24 May 2020 06:45:33 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 084C85C004A; Sun, 24 May 2020 06:45:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 24 May 2020 06:45:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Mp8r6N uSFe30iRrcNHouzpS31zommQNx74Mb0SWGZGc=; b=1mMhakNDg960jT5KwqNmtq 5O7alYoWNdZ/HqjCLjOalEqZDXVAmSwp5rJij/uXW/2IPlYWC2g5SjaSWTBCpzdr IVoY07Rrp4a2T4OCgQztTK4/MOYBxYgyr5z1oyElMqw9F2u2M7W65SfUxztxGqKx /tKsBzmPC4A8Mj1FqMSIi8y0z3NBv4ZAl+FcNOIzNaVPQfQ3E1p7lKuaBpC/x1U5 ZihyXacDHROD/JmDWG3V2pVX3+s4AtsBFsfCG7ZbBkgOTTlR+we4XITIWMDprYGX vrani3nURyC/NfjvDXBptWM8v9FJ8hag1qMyqbGviB7TXMSKt1VO1e3yqBReoDPA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddukedgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffogggtgfesthekredtredtjeenucfhrhhomhepvehhrhhishcu uehovghguceotghhrhhishessghovghgrdhmvgeqnecuggftrfgrthhtvghrnheptdelte evgfejveefieeifeejiedttefgheehffdtvdekleehgefhleeliefghfetnecuffhomhgr ihhnpehmrghnkhhivghrrdgtohhmnecukfhppeeghedruddvledrheeirddvtdejnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheptghhrhhishes sghovghgrdhmvg X-ME-Proxy: Received: from localhost.localdomain (unknown [45.129.56.207]) by mail.messagingengine.com (Postfix) with ESMTPA id 20B563280059; Sun, 24 May 2020 06:45:26 -0400 (EDT) From: Chris Boeg Date: Sun, 24 May 2020 12:44:44 +0200 Message-Id: <20200524104444.16375-1-chris@boeg.me> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) From: Chris Bøg --- Improve wording doc/guix-cookbook.texi | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 2a605276e6..8651bc4429 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -1617,6 +1617,47 @@ Then you need to add the following code to a StumpWM configuration file (set-font (make-instance 'xft:font :family "DejaVu Sans Mono" :subfamily "Book" :size 11)) @end lisp +@node Session lock +@subsection Session lock +@cindex sessionlock + +Depending on your environment, locking the screen of your session might come built in +or it might be something you have to set up yourself. If you use a desktop environment +like GNOME or KDE, it's usually built in. If you use a plain window manager like +StumpWM or EXWM, you might have to set it up yourself. + +@node Xorg +@subsubsection Xorg + +If you use Xorg, you can use the utility +@uref{https://www.mankier.com/1/xss-lock, xss-lock} to lock the screen of your session. +xss-lock is triggered by DPMS which since Xorg 1.8 is auto-detected and enabled if +ACPI is also enabled at kernel runtime. + +To use xss-lock, you can simple execute it and put it into the background before +you start your window manager from e.g. your @file{~/.xsession}: + +@example +xss-lock -- slock & +exec stumpwm +@end example + +In this example, xss-lock uses @code{slock} to do the actual locking of the screen when +it determines it's appropriate, like when you suspend your device. + +For slock to be allowed to be a screen locker for the graphical session, it needs to +be made setuid-root so it can authenticate users, and it needs a PAM service. This +can be achieved by adding the following service to your @file{config.scm}: + +@lisp +(screen-locker-service slock) +@end lisp + +If you manually lock your screen, e.g. by directly calling slock when you want to lock +your screen but not suspend it, it's a good idea to notify xss-lock about this so no +confusion occurs. This can be done by executing @code{xset s activate} immediately +before you execute slock. + @node Setting up a bind mount @section Setting up a bind mount -- 2.26.2 From unknown Sat Aug 16 16:18:34 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Chris Boeg Subject: bug#41502: closed (Re: [bug#41502] [PATCH v2] Add subsection to cookbook about session locking with xss-lock) Message-ID: References: <87eer93yaw.fsf@gnu.org> <20200524085407.13352-1-chris@boeg.me> X-Gnu-PR-Message: they-closed 41502 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 41502@debbugs.gnu.org Date: Sun, 24 May 2020 19:54:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1590350042-3948-1" This is a multi-part message in MIME format... ------------=_1590350042-3948-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #41502: [PATCH] Add subsection to cookbook about session locking with xss-l= ock which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 41502@debbugs.gnu.org. --=20 41502: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41502 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1590350042-3948-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 41502-done) by debbugs.gnu.org; 24 May 2020 19:53:06 +0000 Received: from localhost ([127.0.0.1]:38850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcwgE-00010a-35 for submit@debbugs.gnu.org; Sun, 24 May 2020 15:53:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcwgC-000107-9Y for 41502-done@debbugs.gnu.org; Sun, 24 May 2020 15:53:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36789) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcwg6-0003i4-V4; Sun, 24 May 2020 15:52:58 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54600 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jcwg6-0000NX-EB; Sun, 24 May 2020 15:52:58 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Chris Boeg Subject: Re: [bug#41502] [PATCH v2] Add subsection to cookbook about session locking with xss-lock References: <20200524085407.13352-1-chris@boeg.me> <20200524104444.16375-1-chris@boeg.me> Date: Sun, 24 May 2020 21:52:55 +0200 In-Reply-To: <20200524104444.16375-1-chris@boeg.me> (Chris Boeg's message of "Sun, 24 May 2020 12:44:44 +0200") Message-ID: <87eer93yaw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41502-done Cc: 41502-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Chris, Chris Boeg skribis: > doc/guix-cookbook.texi | 41 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 41 insertions(+) Nice! I added a commit log following our conventions and committed it. Thanks, Ludo=E2=80=99. ------------=_1590350042-3948-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 24 May 2020 09:49:27 +0000 Received: from localhost ([127.0.0.1]:36506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcnG2-0006zq-Ej for submit@debbugs.gnu.org; Sun, 24 May 2020 05:49:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:44160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcmPK-0005fa-CV for submit@debbugs.gnu.org; Sun, 24 May 2020 04:55:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcmPK-0003hC-4B for guix-patches@gnu.org; Sun, 24 May 2020 04:54:58 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:34193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcmPI-0005FC-JD for guix-patches@gnu.org; Sun, 24 May 2020 04:54:57 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8EEAF5C0084; Sun, 24 May 2020 04:54:54 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 24 May 2020 04:54:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=fpxWhi mw0EF1T0r7UAl9W+amt5mwuMd9R5zpUXNuwWY=; b=we22vn5H3pvbiqxMl+EgLU vmkkj7j4kPntXs2SxwpYmw7YeUD6dZHxtVwkMHN7dQ2EDyg3aDV5CV/HgmK+IJ4C xrxzaMxOvahw2BEm1cRu6tQxL0d0CO97uUlMaYwGJzT+s2FXcncYCIS6xvHLXoQJ GApwvVvlzaBmKzQcOUz3Qripe6928wVeUzv04SxeRAzLFZd5yqM28yLFJTlZOUAu RmSW8jJ3aG3fePvcCVpgirf01w8pdFZY5dnD65i+lBoT4ualqur88e53PIL1ro2f 8fGDJWgixJKvbMvTvpLOsIP5HZ8e5lqvxVoGYGoLL/UBujKWIkdDW5Zo52Vfbqxw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddukedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffogggtgfesthekredtredtjeenucfhrhhomhepvehhrhhishcu uehovghguceotghhrhhishessghovghgrdhmvgeqnecuggftrfgrthhtvghrnheptdelte evgfejveefieeifeejiedttefgheehffdtvdekleehgefhleeliefghfetnecuffhomhgr ihhnpehmrghnkhhivghrrdgtohhmnecukfhppeeghedruddvledrheeirddvtdejnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheptghhrhhishes sghovghgrdhmvg X-ME-Proxy: Received: from localhost.localdomain (unknown [45.129.56.207]) by mail.messagingengine.com (Postfix) with ESMTPA id CCA193066516; Sun, 24 May 2020 04:54:53 -0400 (EDT) From: Chris Boeg To: guix-patches@gnu.org Subject: [PATCH] Add subsection to cookbook about session locking with xss-lock Date: Sun, 24 May 2020 10:54:07 +0200 Message-Id: <20200524085407.13352-1-chris@boeg.me> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=66.111.4.26; envelope-from=chris@boeg.me; helo=out2-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/24 04:54:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 24 May 2020 05:49:24 -0400 Cc: =?UTF-8?q?Chris=20B=C3=B8g?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) From: Chris Bøg --- doc/guix-cookbook.texi | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 2a605276e6..4e031859c0 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -1617,6 +1617,47 @@ Then you need to add the following code to a StumpWM configuration file (set-font (make-instance 'xft:font :family "DejaVu Sans Mono" :subfamily "Book" :size 11)) @end lisp +@node Session lock +@subsection Session lock +@cindex sessionlock + +Depending on your environment, locking the screen of your session might come built in +or it might be something you have to set up yourself. If you use a desktop environment +like GNOME or KDE, it's usually built in. If you use a plain window manager like +StumpWM or EXWM, you might have to set it up yourself. + +@node Xorg +@subsubsection Xorg + +If you use Xorg, you can use the utility +@uref{https://www.mankier.com/1/xss-lock, xss-lock} to lock the screen of your session. +xss-lock is triggered by DPMS which since Xorg 1.8 is auto-detected and enabled if +ACPI is also enabled at kernel runtime. + +To use xss-lock, you can simple execute it and put it into the background before +you start your window manager from e.g. your @file{~/.xsession}: + +@example +xss-lock -- slock & +exec stumpwm +@end example + +In this example, xss-lock uses @code{slock} to do the actual locking of the screen when +it determines it's appropriate, like when you suspend your device. + +For slock to be allowed to be a screen locker for the graphical session, it needs to +be made setuid-root so it can authenticate users, and it needs a PAM service. This +can be done by adding the following service to your @file{config.scm}: + +@lisp +(screen-locker-service slock) +@end lisp + +If you manually lock your screen, e.g. by directly calling slock when you want to lock +your screen but not suspend it, it's a good idea to notify xss-lock about this so no +confusion happens. This can be done by executing @code{xset s activate} immediately +before you execute slock. + @node Setting up a bind mount @section Setting up a bind mount -- 2.26.2 ------------=_1590350042-3948-1--