From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id IBhKCpc5eWdFPwEA62LTzQ:P1 (envelope-from ) for ; Sat, 04 Jan 2025 13:37:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id IBhKCpc5eWdFPwEA62LTzQ (envelope-from ) for ; Sat, 04 Jan 2025 14:37:27 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=so5EM7NX; dkim=fail ("headers rsa verify failed") header.d=muradm.net header.s=mail header.b=Pq+tIGgU; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=muradm.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735997846; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=qiWLOgo6LlyUX/lSDjIAg4RFkb3KgX1JCFuUN3dye54=; b=p0MmkOy//nlKpDuhQiqjf6lbcvWJVhOEUC9dDu/c6HNeAJB+pTNE1uiZR6nw18HfK3pSHX ZkdtTIO7x5UJn2XEeALNMqEdOUFixi2ABSOsqnyZPXRQcs9SZ2vdxppFKx81cUpIsJiiik ocIm38gJF5z153a1Bg80ADre0wkTQxvA1IL1e+cu7HcN36MtSARi0InIA8bj/2f30v4EKW gVzXJ4kCIt5IwASivy5on6c4xqrSqRShaWmXk9FtKB75aqsCryRpn0gmRntM9DbTy4UOfH jkGMPxV/RWhmk/ELc5hhg2Bg2CPVVy/prITaUTVnlzXddBvfPil7x54a9uh/5Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=so5EM7NX; dkim=fail ("headers rsa verify failed") header.d=muradm.net header.s=mail header.b=Pq+tIGgU; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=muradm.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735997846; a=rsa-sha256; cv=none; b=nqRiaBaaMDE6lrvYXyuijnJuX4+O0qp2T6XGIwgugDCHisEZDO8aE6UKO6xbEpZ3Znxas0 uHaST92R32DkFsiS4ZXAFELQ0BwcIUMRmZTnPyJ13B5MoD8Yt07skMx6Q34TpfBXsZc0p7 WjIDk3R18eCX6jJ2tKw8fIUMdh6duLAPm84QXgu2czfbJ1UEFGT8soKwz2TtwTPpruAyEb OTANcdAYlAlBPMpUvgpuTgrqMzthx2qoLeHdlpuviCYTbIvcM4qGz+TdTPDLXSf1prH3Kb WuxjjyHcLgfuYCrPCgYA1aXJSBo3w9OIroEq3pGXoia5HMDevQl7lXpgsM3gUg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BFB1B4F86 for ; Sat, 04 Jan 2025 14:37:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tU4Kv-0003Cj-LT; Sat, 04 Jan 2025 08:37:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tU4Kt-0003CX-BN for guix-patches@gnu.org; Sat, 04 Jan 2025 08:37:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tU4Ks-00035l-2a for guix-patches@gnu.org; Sat, 04 Jan 2025 08:37:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=qiWLOgo6LlyUX/lSDjIAg4RFkb3KgX1JCFuUN3dye54=; b=so5EM7NXdZuVRhYSIw+KhwxVeVDgy92HLPyhIpVTx2yzITvfVbtmecmpCiyHJbAj7UEVZAeS+0RNF7vHfVu1F65fLSeo/nIEI7Nw7RkE9xLFl7vRl4Vl3/YCoVCyAjERZF+l+vTJ16skQkCcS4I921tU/25v2otR38UKssYvdHlZQ8rb3wpiUkrDND/PC4qZr8l5m9Jjzp3wcZbyz3bg02C1jszLkoYXeiXYHl9RBaarGWL+qM7u3Ghh1moOphHcr7jloCO6eFBXLiK0a6+GxL1gBQWeTCINam9BOKglTYnSQ5ICxXMPqZmZG8Iwsw0C3xglnMn5owOX6HcvBeEcCQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tU4Kr-00004x-SY for guix-patches@gnu.org; Sat, 04 Jan 2025 08:37:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75270] [PATCH 1/3] services: greetd: Improve greeter configurations. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Jan 2025 13:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75270 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Graves Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 75270@debbugs.gnu.org, Maxim Cournoyer Received: via spool by 75270-submit@debbugs.gnu.org id=B75270.173599781032751 (code B ref 75270); Sat, 04 Jan 2025 13:37:01 +0000 Received: (at 75270) by debbugs.gnu.org; 4 Jan 2025 13:36:50 +0000 Received: from localhost ([127.0.0.1]:53932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tU4Kf-0008WA-M9 for submit@debbugs.gnu.org; Sat, 04 Jan 2025 08:36:50 -0500 Received: from nomad-cl1.muradm.net ([139.162.159.157]:49762) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tU4Kc-0008Vv-V4 for 75270@debbugs.gnu.org; Sat, 04 Jan 2025 08:36:48 -0500 Received: from localhost ([127.0.0.1]:41692) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1) (envelope-from ) id 1tU4Gi-0001pF-0C; Sat, 04 Jan 2025 13:32:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=qiWLOgo6LlyUX/lSDjIAg4RFkb3KgX1JCFuUN3dye54=; b=Pq+tIGgU/a41E3ZKFEKt2IkUz3 OHziJTQWc2BnTsSDCvbnQWEPCedgE4z8LPq2LVNpIbm9iL4JjpFOURsC/lfE7toMZY7viFVSiF1lo 9+1QL4+NC1jsYfsEF2yVRRB3r3OZdzrM9oMjb+crMJyxUuQ/BPph24inKNWw73h7jkExVqH7Rp3Hw 2GMUCDOmFI7Egy5jEOmv63B+chirxFYUf8MOxgXnvBGm7xYSJmV8zn/NDi8GOY++bUAg9TRN9DyoC 4b3Yr2H7B2zzNOc9bL9lvf6k3aOVOzAk5jvTxGE/ibqd/pOitLyUsGTtw8kcCOVdkb5raE4OiZvKk 2PyGHjpdofvxTcrkX4yschNzDVdnGLEAsocN0aNiL+1vX+RG2z8lxHsgfYQQyFvWhcHrbzDfsIKIm eRjsp7FsBGA7qwxQhpbWRyI7ev6XFkmMvYCTbbTN1QgTUVhDjGPaco4dfze7xXqzliR9lTNgq/KSa efkuJNuhjMdPEXzcRzGsWFep; Received: from muradm by localhost with local (Exim 4.98) (envelope-from ) id 1tU4KM-000000007gp-241d; Sat, 04 Jan 2025 16:36:30 +0300 From: muradm In-Reply-To: <87zfk6zw0t.fsf@ngraves.fr> (Nicolas Graves's message of "Sat, 04 Jan 2025 11:57:38 +0100") References: <8ea5f949f8b473c3ec68e7d2f5f40c1152c6c631.1735771462.git.mail@muradm.net> <87pll4owui.fsf@ngraves.fr> <87ed1j6d0l.fsf@muradm.net> <87zfk6zw0t.fsf@ngraves.fr> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Sat, 04 Jan 2025 16:36:30 +0300 Message-ID: <87pll2r99d.fsf@muradm.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: BFB1B4F86 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -5.38 X-Spam-Score: -5.38 X-TUID: NK9j+tzzHTsb --=-=-= Content-Type: text/plain; format=flowed Nicolas Graves writes: > On 2025-01-03 20:08, muradm wrote: > >> Nicolas Graves writes: >> >>> On 2025-01-02 01:53, muradm wrote: >>> >>>> This improvement focuses on providing common user session >>>> scripts >>>> for use by multiple greeters. It also fixes incorrect use of >>>> `XDG_RUNTIME_DIR` for `wlgreet`. `wlgreet` requires >>>> compositor >>>> to >>>> run. We provide common sway based greeter script, which can >>>> be >>>> shared by other graphical greeters. >>> >>> [...] >>> >>>> +(define (make-greetd-sway-greeter-command sway sway-config) >>>> + (let ((sway-bin (file-append sway "/bin/sway"))) >>>> + (program-file >>>> + "greeter-sway-command" >>>> + #~(begin >>>> + (let* ((username (getenv "USER")) >>>> + (useruid (passwd:uid (getpwuid username))) >>>> + (useruid (number->string useruid)) >>>> + ;; /run/user/ won't exist >>>> yet >>>> + ;; this will contain WAYLAND_DISPLAY socket >>>> file >>>> + ;; and log-file below >>>> + (user-xdg-runtime-dir "/tmp/greeter-xdg-rt") >>>> + (log-file (string-append (number->string >>>> (getpid)) ".log")) >>>> + (log-file (string-append >>>> user-xdg-runtime-dir >>>> "/" >>>> log-file))) >>> >>> Could you explain why this is necessary? If I'm not mistaken, >>> we didn't >>> used a special runtime dir in RDE, and it worked OK. >>> >> >> When you start sway, it has to put WAYLAND_DISPLAY somewhere. >> By >> default it is put to `/run/user/`. However greeter is >> special >> limited user which is used to run without logging in. Because >> of >> that, `/run/user/` is not created by PAM mount. For >> special >> purpose we can use any XDG_RUNTIME_DIR. Sway does not support >> specifying location of WAYLAND_DISPLAY as far as I remember (I >> was >> opening an issue about it long ago, still was not resolved). > > IIUC, it's because of PAM mount execution order that this > happens? So > there's also no need for that for people that don't use PAM > mount. > Maybe completing the comment as "/run/user/ > won't > exist yet due to PAM mount execution order" comment would make > that > clearer? No, that is not about order, but the fact that when greeter is running it is not a "login action" to carry out PAM stuff. PAM mount normally runs after user successfully passing authentication with username and password. Greeter runs agreet/wlgreet/gtkgreet/whatever before that. > Is the logfile here the one logging everything Sway? Could you > make the > logfile configurable or is that not possible due to unguaranteed > dir > existence due to PAM mount? We are making an extra effort to > locate > logfiles in the same dir in RDE. (I could also try and make a > symlink a > posteriori to the right dir). That log file write stdout and stderr of greeter process, not the user. At the time user passes successfull authentication, greeter process exists, this log file completes its job. The user session is started by greetd in different environment unrelated to greeter's environment. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEESPY5lma9A9l5HGLP6M7O0mLOBeIFAmd5OV4ACgkQ6M7O0mLO BeIuBw/8CO4GhsnYSq+YI+e+yMN5J2sEP0PFchixWAj/sq+EfR8mMZEbrlpNoTej Onw6mP0CAIFqySvFLpE79U6tMqDjxm8Lt+tAYi5rXV+AQCMhPdOoatEN+ET0QXb1 EUvUbghtC2crFjC/y+zxwtuLIqV8B2o9nuecHwhm+/0EIcQD0viiSAeEgv+hZ2p8 v1YNcY5mRSv0amh9u8lgsZTKF2us/UQXECwrC8bS1A4nymSCv/1isGcsK1g9Scha 6byTuNY4up9NiVzR8XqCbbJcPIVVyFeurq27Zc2NDugddgPE6VxpPsWOPdZt/8EQ toDsKYj7Iim9Ve80Am2ZEzjLxlbQakwwuKnc+bajQ98CSXReYj6IuG/o5ChcO+op QiXSs+mbP2O8+J2jl5SLU+I8bTaE3LOGwv1U/R038yWQln8Ok3BLIrzWqyq5YYYp dza/ojaRYprxVWe8+9+fJlPHDs8gbw1TdyKSW4ZgnOYTRAVFR2MGD+iv7U8D9dM0 xYoGLnb5UXy/3V/TSVvQ1heCDG3RpEFAYhJkCasopMQkOUr6wNS4lUAlwNqBNvW1 /4/301DyzEleKh6DdDfMoHsBe/xcg3Seosjsrzb6I2aWrSDT1UYHmY4Y2DVJWjF6 53IW/CuWQjQUNRWEYAp1FZImj0NMXShia6FFVFFsH6X93FHnEsw= =LgFu -----END PGP SIGNATURE----- --=-=-=--