From debbugs-submit-bounces@debbugs.gnu.org Sun May 24 06:45:35 2020 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 To: 41502@debbugs.gnu.org Subject: [PATCH v2] Add subsection to cookbook about session locking with xss-lock 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-Debbugs-Envelope-To: 41502 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: -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