From unknown Sun Aug 10 16:45:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50945: Guix home: No such file or directory: "/run/user/1003/on-first-login-executed" Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 01 Oct 2021 15:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50945 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 50945@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16331032286568 (code B ref -1); Fri, 01 Oct 2021 15:48:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Oct 2021 15:47:08 +0000 Received: from localhost ([127.0.0.1]:57171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWKkd-0001hm-AJ for submit@debbugs.gnu.org; Fri, 01 Oct 2021 11:47:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:41242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWKkV-0001hG-OQ for submit@debbugs.gnu.org; Fri, 01 Oct 2021 11:47:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWKkV-0002Ye-Ci for bug-guix@gnu.org; Fri, 01 Oct 2021 11:46:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43250) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWKkV-0001L8-5c; Fri, 01 Oct 2021 11:46:59 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=44750 helo=dundal.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWKkU-0007L9-Q3; Fri, 01 Oct 2021 11:46:59 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl X-Url: http://AvatarAcademy.nl Date: Fri, 01 Oct 2021 17:46:56 +0200 Message-ID: <87y27czr0v.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) 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 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, When using su or sudo to enter an account managed by guix home, I get this error --8<---------------cut here---------------start------------->8--- Backtrace: 2 (primitive-load "/home/guix/.guix-home/on-first-login") In ice-9/ports.scm: 461:11 1 (call-with-output-file "/run/user/1003/on-first-login-=E2=80= =A6" =E2=80=A6) In unknown file: 0 (open-file "/run/user/1003/on-first-login-executed" "w" =E2=80= =A6) ERROR: In procedure open-file: In procedure open-file: No such file or directory: "/run/user/1003/on-first= -login-executed" --8<---------------cut here---------------end--------------->8--- Upon a console login or ssh login, /var/run/1003 is created and all is fine. See below for the scenario, home-minimal.scm is attached. Greetings, Janneke $ ssh guix@localhost -p 2222 guix@localhost's password:=20 Last login: Tue Jun 23 11:45:08 2020 from 2001:980:1b4f:1:216:d3ff:fe29:7cdb guix@dundal ~$ guix home reconfigure home-minimal.scm /gnu/store/fgxpmf1iwjp9f8dfyaf7wxqa8105lq3w-home Cleaning up symlinks from previous home-environment. Skipping /home/guix/.config/fontconfig (not an empty directory)... done Skipping /home/guix/.config (not an empty directory)... done Cleanup finished. New symlinks to home-environment will be created soon. All conflicting files will go to /home/guix/1633101995-guix-home-legacy-con= figs-backup. Skipping /home/guix/.config (directory already exists)... done Creating /home/guix/.config/fontconfig... done Symlinking /home/guix/.config/fontconfig/fonts.conf -> /gnu/store/phj2z2iiq= dhryfy7mqral0b9qz3hlva6-fonts.conf... done Symlinking /home/guix/.config/test.conf -> /gnu/store/bdixb09v30bvhpgi2f6nd= iq25wzb9l74-tmp-file.txt... done Symlinking /home/guix/.bash_profile -> /gnu/store/j3vhlswj46psxicapnq8c9p1j= rwd55rk-bash_profile... done Symlinking /home/guix/.profile -> /gnu/store/fxbppk3pqzdi3zzy0xl5vg1ir6c5jz= q5-shell-profile... done Symlinking /home/guix/.bashrc -> /gnu/store/513j2xkszmcmv7fiawh59mr0i1fmin5= 5-bashrc... done done Finished updating symlinks. Comparing /gnu/store/fgxpmf1iwjp9f8dfyaf7wxqa8105lq3w-home/profile/share/fo= nts and /gnu/store/fgxpmf1iwjp9f8dfyaf7wxqa8105lq3w-home/profile/share/fo= nts... done (same) Evaling on-change gexps. On-change gexps evaluation finished. guix@dundal ~$ guix home list-generations ]8;;file://dundal/var/guix/profiles/per-user/guix/guix-home-1-link\Generati= on 1 Oct 01 2021 12:19:16]8;;\ (current) file name: /var/guix/profiles/per-user/guix/guix-home-1-link canonical file name: /gnu/store/fgxpmf1iwjp9f8dfyaf7wxqa8105lq3w-home channels: guix: repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: ]8;;https://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D5= 6b10709efc4eb35df66f52a20ce3cb7fab4fee6\56b10709efc4eb35df66f52a20ce3cb7fab= 4fee6]8;;\ configuration file: ]8;;file://dundal/gnu/store/kjha5z8mck0pa9jrgx2266rq1= lvlb3ji-configuration.scm\/gnu/store/kjha5z8mck0pa9jrgx2266rq1lvlb3ji-confi= guration.scm]8;;\ guix@dundal ~$ logout Connection to localhost closed. 17:26:49 janneke@dundal:~ $ sudo -i -u guix Password:=20 Backtrace: 2 (primitive-load "/home/guix/.guix-home/on-first-login") In ice-9/ports.scm: 461:11 1 (call-with-output-file "/run/user/1003/on-first-login-=E2=80= =A6" =E2=80=A6) In unknown file: 0 (open-file "/run/user/1003/on-first-login-executed" "w" =E2=80= =A6) ERROR: In procedure open-file: In procedure open-file: No such file or directory: "/run/user/1003/on-first= -login-executed" guix@dundal ~$ ls -ltrF /run/user total 0 drwx------ 7 gdm gdm 160 Oct 1 12:16 971/ drwx------ 13 janneke janneke 260 Oct 1 13:07 1000/ guix@dundal ~$ logout 17:29:34 janneke@dundal:~ $ su - guix Password:=20 Backtrace: 2 (primitive-load "/home/guix/.guix-home/on-first-login") In ice-9/ports.scm: 461:11 1 (call-with-output-file "/run/user/1003/on-first-login-=E2=80= =A6" =E2=80=A6) In unknown file: 0 (open-file "/run/user/1003/on-first-login-executed" "w" =E2=80= =A6) ERROR: In procedure open-file: In procedure open-file: No such file or directory: "/run/user/1003/on-first= -login-executed" 17:37:33 janneke@dundal:~ $ ssh guix@localhost -p 2222 guix@localhost's password:=20 Last login: Fri Oct 1 17:23:35 2021 from 127.0.0.1 guix@dundal ~$=20 --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=home-minimal.scm Content-Transfer-Encoding: base64 KHVzZS1tb2R1bGVzIChnbnUgaG9tZSkKICAgICAgICAgICAgIChnbnUgaG9tZS1zZXJ2aWNlcykK ICAgICAgICAgICAgIChnbnUgaG9tZS1zZXJ2aWNlcyBzaGVsbHMpCiAgICAgICAgICAgICAoZ251 IGhvbWUtc2VydmljZXMgc2hlcGhlcmQpCiAgICAgICAgICAgICAoZ251IHNlcnZpY2VzKQogICAg ICAgICAgICAgKGdudSBwYWNrYWdlcyBhZG1pbikKICAgICAgICAgICAgIChndWl4IGdleHApKQoK KGhvbWUtZW52aXJvbm1lbnQKIChwYWNrYWdlcyAobGlzdCBodG9wKSkKIChzZXJ2aWNlcwogIChs aXN0CiAgIChzZXJ2aWNlIGhvbWUtYmFzaC1zZXJ2aWNlLXR5cGUKICAgICAgICAgICAgKGhvbWUt YmFzaC1jb25maWd1cmF0aW9uCiAgICAgICAgICAgICAoZ3VpeC1kZWZhdWx0cz8gI3QpCiAgICAg ICAgICAgICAoYmFzaC1wcm9maWxlICcoIlwKZXhwb3J0IEhJU1RGSUxFPSRYREdfQ0FDSEVfSE9N RS8uYmFzaF9oaXN0b3J5IikpKSkKICAgCiAgIChzaW1wbGUtc2VydmljZSAndGVzdC1jb25maWcK ICAgICAgICAgICAgICAgICAgIGhvbWUtZmlsZXMtc2VydmljZS10eXBlCiAgICAgICAgICAgICAg ICAgICAobGlzdCBgKCJjb25maWcvdGVzdC5jb25mIgogICAgICAgICAgICAgICAgICAgICAgICAg ICAsKHBsYWluLWZpbGUgInRtcC1maWxlLnR4dCIKICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICJ0aGUgY29udGVudCBvZiB+Ly5jb25maWcvdGVzdC5jb25mIikpKSkpKSkK --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- From unknown Sun Aug 10 16:45:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50945: Guix home: No such file or directory: "/run/user/1003/on-first-login-executed" Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 01 Oct 2021 17:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50945 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Jan Nieuwenhuizen , 50945@debbugs.gnu.org Cc: Andrew Tropin Received: via spool by 50945-submit@debbugs.gnu.org id=B50945.163310795114654 (code B ref 50945); Fri, 01 Oct 2021 17:06:01 +0000 Received: (at 50945) by debbugs.gnu.org; 1 Oct 2021 17:05:51 +0000 Received: from localhost ([127.0.0.1]:57259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWLyp-0003oI-Ij for submit@debbugs.gnu.org; Fri, 01 Oct 2021 13:05:51 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:51248 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWLyn-0003o6-OL for 50945@debbugs.gnu.org; Fri, 01 Oct 2021 13:05:50 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1633107944; bh=0gBjl7legZOGhQIeisJXgigJhGD/NzO3kQ4a9QYam/U=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=urX4ZUvKZAsdGeVMjsRhYYWlqlT/dmenH4wJmtpHu0PqHX7NpMFgXPr8VGWUryX5t wkfU54Q4UzrBp3POPAcJvrAf+6e3bh1KPtjPT9xj4CEkuTRsPtHot594AhDWplu2Oe VVHPkF8vZiCaLNliqAUSUP2w8PpHVf7Km6xU+epo= In-Reply-To: <87y27czr0v.fsf@gnu.org> References: <87y27czr0v.fsf@gnu.org> Date: Fri, 01 Oct 2021 19:05:40 +0200 Message-ID: <87ilygllp7.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Fri, Oct 01 2021, Jan Nieuwenhuizen wrote: > Hi, > > When using su or sudo to enter an account managed by guix home, I get > this error > > --88--- > Backtrace: > 2 (primitive-load "/ho [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps 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: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Fri, Oct 01 2021, Jan Nieuwenhuizen wrote: > Hi, > > When using su or sudo to enter an account managed by guix home, I get > this error > > --88--- > Backtrace: > 2 (primitive-load "/ho [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Oct 01 2021, Jan Nieuwenhuizen wrote: > Hi, > > When using su or sudo to enter an account managed by guix home, I get > this error > > --8<---------------cut here---------------start------------->8--- > Backtrace: > 2 (primitive-load "/home/guix/.guix-home/on-first-login") > In ice-9/ports.scm: > 461:11 1 (call-with-output-file "/run/user/1003/on-first-login-=E2=80= =A6" =E2=80=A6) > In unknown file: > 0 (open-file "/run/user/1003/on-first-login-executed" "w" =E2= =80=A6) > > ERROR: In procedure open-file: > In procedure open-file: No such file or directory: "/run/user/1003/on-fir= st-login-executed" > --8<---------------cut here---------------end--------------->8--- > > Upon a console login or ssh login, /var/run/1003 is created and all is fi= ne. > > See below for the scenario, home-minimal.scm is attached. > > Greetings, > Janneke [ Cc Andrew who did most of the work on Guix Home ] I think this is because Guix Home relies on $XDG_RUNTIME_DIR to be defined, otherwise it falls-back to /run/user/UID. But it looks like /run/user/UID isn=E2=80=99t created when using =E2=80=98su=E2=80=99 to logi= n. I don=E2=80=99t really know how these things work under the hood; maybe using $XDG_RUNTIME_DIR isn=E2=80=99t best idea. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFXP+QVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5becQAL7ZlFkF0dSuO3SIN6Npvb6cSrNj yjELwonVnqSuFYfiQcSt7C/7iEtH+clWjVac7HxGwxIspl6c+dkPKAcgcTJyyfCn P4rrUtVmwxchQh/MjRCLZp6y+v9CMQLA/91fzi1VlOrsxYYttz05Yn2h7k36TAsX sLgWGUvK16ohanoja+1oOh7PPCrYy8ufarK3TnBOrGu3lUIBIm6v+bnr3gLicjIk ODJJ/VZyN2g64SQgbVMtyzZHLX3xCwQGD88ZZCmyqT3938408cpybUJelXx5RjuV WVyG1hsMEwT2IMaJBosP/ZLjxlRIeQGF/eYFXoadkgfF9DJJcHGj7N671IkBCkY6 I4RkXybPDx2JqWGbA4NmPjovrX2yALF0EaF0YGNOpvqPanVvdtJpHL1WxZHV+9jW /gGBt/H1rnEYxi2h42oke6rsGpiexouro5TAbzrjincD62U2lc3MADuoyGHErsnN 6gQDVK4kdOwiH5VTw8jgVaH26wgnekF2ySKR90nraiImUhvu9a4iuV/jrDObZjzv ZllX2T5Dz1+mRVi2o2rUY9pqmZsnsG6vc9R1YzxTimv7KDfqeCi3SB7GxzF6bexE iQJe08X9UwBrFWSnTsSUsJ2lzYQgFyRBmOXo7Q7zO6TElq4Q7bOEwYlBuNJgUGnq oOt/vw45UPc0x+R5 =hnkm -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Aug 10 16:45:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50945: Guix home: No such file or directory: "/run/user/1003/on-first-login-executed" Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 07 Oct 2021 05:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50945 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Jan Nieuwenhuizen , 50945@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50945-submit@debbugs.gnu.org id=B50945.163358409921922 (code B ref 50945); Thu, 07 Oct 2021 05:22:01 +0000 Received: (at 50945) by debbugs.gnu.org; 7 Oct 2021 05:21:39 +0000 Received: from localhost ([127.0.0.1]:45777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYLqd-0005hW-BU for submit@debbugs.gnu.org; Thu, 07 Oct 2021 01:21:39 -0400 Received: from mail-lf1-f43.google.com ([209.85.167.43]:40809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYLqY-0005hF-Fd for 50945@debbugs.gnu.org; Thu, 07 Oct 2021 01:21:38 -0400 Received: by mail-lf1-f43.google.com with SMTP id y15so19810874lfk.7 for <50945@debbugs.gnu.org>; Wed, 06 Oct 2021 22:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=X94+ojYSCayYNRzoT6T2Qgw8Q6PncW0GbF6fB01aYqo=; b=eLjhxIhJ+rNpQ2kWl2YJ2ohOOwMAm1YTW1UXibTSwZ9l74rgCepovbxDbEujLfgl5L qrnGGesSoOa++ePg3YQQqA+c+0jLxG2c26ZpEDLHFuoJoP70KVQC0faSHsafc1kXfr3c JTHdR1NEqmuH3KthjCgHsC3oJ7rjsjN4yvkF4pfq7e7rTHx5uVq6vRjdyFWjCctAy1Vm FRRKHuC5xywZz0VDgVVe1YF4ntIiOC3evAGKHj1G7yHnNX8q7AIGMikQsCLvPgwn0C43 EkAiHJWqEaNJzWB/HgjaTUfzVLd8P4EqUkpjjFJCaClqfS2yLufxm+CFnALHEPlrjJ2Z BhNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=X94+ojYSCayYNRzoT6T2Qgw8Q6PncW0GbF6fB01aYqo=; b=g3vqXug3hQsvzmpbRxYGo8RRFS4mgT42QizquVhKJnDQoip7Fj1z/kDl7pqTDSjVCy bv1mRYB624dmltr1QZwI01/7uz1bM24J3NPx4/Ka/UuKaiBMLHSUJFEjL0TSq1vVWF9d t6NZ7O3XBI1U/LpVvmEtubzBD0rumkrJnV5AUic8hUQUL3PlVW5ugqDfbWf0e3jl2b9t R+CHs3LLN4wHD56zaJxrsRNIqbRcup4JLzShYL6oMzEmII+R6VQ/owUOc0NOdBBvI4+8 TZJCxr7yQdj+I8nMWNNGdmPk6uScLvSuGJ9aRdJzVrGnTzYuRaBObJssYvIUivKZlR6a 456Q== X-Gm-Message-State: AOAM532oVCr1/un5RhCZ1+/coD0mUiALUrpx3pzLe7FGF7C5/D5bMRYk twXQbHDAP+oSSyevKyZMm70Qqg== X-Google-Smtp-Source: ABdhPJxyhZES+/PqSwXhgp5520WsUFr8teLPFsEAlI37OZn8BrtUXSbjSsCJ5CADBd7buOgapV+SAQ== X-Received: by 2002:ac2:518e:: with SMTP id u14mr2149825lfi.338.1633584088400; Wed, 06 Oct 2021 22:21:28 -0700 (PDT) Received: from localhost (109-252-140-132.dynamic.spd-mgts.ru. [109.252.140.132]) by smtp.gmail.com with ESMTPSA id a8sm1156021lfu.202.2021.10.06.22.21.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Oct 2021 22:21:27 -0700 (PDT) From: Andrew Tropin In-Reply-To: <87y27czr0v.fsf@gnu.org> References: <87y27czr0v.fsf@gnu.org> Date: Thu, 07 Oct 2021 08:21:24 +0300 Message-ID: <871r4xwgtn.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) 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.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-10-01 17:46, Jan Nieuwenhuizen wrote: > Hi, > > When using su or sudo to enter an account managed by guix home, I get > this error > > --8<---------------cut here---------------start------------->8--- > Backtrace: > 2 (primitive-load "/home/guix/.guix-home/on-first-login") > In ice-9/ports.scm: > 461:11 1 (call-with-output-file "/run/user/1003/on-first-login-=E2=80= =A6" =E2=80=A6) > In unknown file: > 0 (open-file "/run/user/1003/on-first-login-executed" "w" =E2= =80=A6) > > ERROR: In procedure open-file: > In procedure open-file: No such file or directory: "/run/user/1003/on-fir= st-login-executed" > --8<---------------cut here---------------end--------------->8--- > > Upon a console login or ssh login, /var/run/1003 is created and all is fi= ne. > > See below for the scenario, home-minimal.scm is attached. > > Greetings, > Janneke > > > $ ssh guix@localhost -p 2222 > guix@localhost's password:=20 > Last login: Tue Jun 23 11:45:08 2020 from 2001:980:1b4f:1:216:d3ff:fe29:7= cdb > guix@dundal ~$ guix home reconfigure home-minimal.scm > /gnu/store/fgxpmf1iwjp9f8dfyaf7wxqa8105lq3w-home > Cleaning up symlinks from previous home-environment. > > Skipping /home/guix/.config/fontconfig (not an empty directory)... done > Skipping /home/guix/.config (not an empty directory)... done > Cleanup finished. > > New symlinks to home-environment will be created soon. > All conflicting files will go to /home/guix/1633101995-guix-home-legacy-c= onfigs-backup. > > Skipping /home/guix/.config (directory already exists)... done > Creating /home/guix/.config/fontconfig... done > Symlinking /home/guix/.config/fontconfig/fonts.conf -> /gnu/store/phj2z2i= iqdhryfy7mqral0b9qz3hlva6-fonts.conf... done > Symlinking /home/guix/.config/test.conf -> /gnu/store/bdixb09v30bvhpgi2f6= ndiq25wzb9l74-tmp-file.txt... done > Symlinking /home/guix/.bash_profile -> /gnu/store/j3vhlswj46psxicapnq8c9p= 1jrwd55rk-bash_profile... done > Symlinking /home/guix/.profile -> /gnu/store/fxbppk3pqzdi3zzy0xl5vg1ir6c5= jzq5-shell-profile... done > Symlinking /home/guix/.bashrc -> /gnu/store/513j2xkszmcmv7fiawh59mr0i1fmi= n55-bashrc... done > done > Finished updating symlinks. > > Comparing /gnu/store/fgxpmf1iwjp9f8dfyaf7wxqa8105lq3w-home/profile/share/= fonts and > /gnu/store/fgxpmf1iwjp9f8dfyaf7wxqa8105lq3w-home/profile/share/= fonts... done (same) > Evaling on-change gexps. > > On-change gexps evaluation finished. > > guix@dundal ~$ guix home list-generations > ]8;;file://dundal/var/guix/profiles/per-user/guix/guix-home-1-link\Genera= tion 1 Oct 01 2021 12:19:16]8;;\ (current) > file name: /var/guix/profiles/per-user/guix/guix-home-1-link > canonical file name: /gnu/store/fgxpmf1iwjp9f8dfyaf7wxqa8105lq3w-home > channels: > guix: > repository URL: https://git.savannah.gnu.org/git/guix.git > branch: master > commit: ]8;;https://git.savannah.gnu.org/cgit/guix.git/commit/?id= =3D56b10709efc4eb35df66f52a20ce3cb7fab4fee6\56b10709efc4eb35df66f52a20ce3cb= 7fab4fee6]8;;\ > configuration file: ]8;;file://dundal/gnu/store/kjha5z8mck0pa9jrgx2266r= q1lvlb3ji-configuration.scm\/gnu/store/kjha5z8mck0pa9jrgx2266rq1lvlb3ji-con= figuration.scm]8;;\ > guix@dundal ~$ logout > Connection to localhost closed. > 17:26:49 janneke@dundal:~ > $ sudo -i -u guix > Password:=20 > Backtrace: > 2 (primitive-load "/home/guix/.guix-home/on-first-login") > In ice-9/ports.scm: > 461:11 1 (call-with-output-file "/run/user/1003/on-first-login-=E2=80= =A6" =E2=80=A6) > In unknown file: > 0 (open-file "/run/user/1003/on-first-login-executed" "w" =E2= =80=A6) > > ERROR: In procedure open-file: > In procedure open-file: No such file or directory: "/run/user/1003/on-fir= st-login-executed" > guix@dundal ~$ ls -ltrF /run/user > total 0 > drwx------ 7 gdm gdm 160 Oct 1 12:16 971/ > drwx------ 13 janneke janneke 260 Oct 1 13:07 1000/ > guix@dundal ~$ logout > 17:29:34 janneke@dundal:~ > $ su - guix > Password:=20 > Backtrace: > 2 (primitive-load "/home/guix/.guix-home/on-first-login") > In ice-9/ports.scm: > 461:11 1 (call-with-output-file "/run/user/1003/on-first-login-=E2=80= =A6" =E2=80=A6) > In unknown file: > 0 (open-file "/run/user/1003/on-first-login-executed" "w" =E2= =80=A6) > > ERROR: In procedure open-file: > In procedure open-file: No such file or directory: "/run/user/1003/on-fir= st-login-executed" > 17:37:33 janneke@dundal:~ > $ ssh guix@localhost -p 2222 > guix@localhost's password:=20 > Last login: Fri Oct 1 17:23:35 2021 from 127.0.0.1 > guix@dundal ~$=20 Thank you for a very detailed report. pam_elogind doesn't create a session, when the login shell spawned by sudo or su =3D> XDG_RUNTIME_DIR not get created =3D> this message appears. I think we can omit execution of any processes by on-first-login script in case session wasn't created. Added the check: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-home-services-on-first-login-Check-if-XDG_RUNTIME_DI.patch Content-Transfer-Encoding: quoted-printable From=20aab6df0298963fe91a6ebfd1dadbc1530eceeff7 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Thu, 7 Oct 2021 08:12:04 +0300 Subject: [PATCH] home-services: on-first-login: Check if XDG_RUNTIME_DIR exists. * gnu/home-services.scm (on-first-login): on-first-login won't execute anything if XDG_RUNTIME_DIR doesn't exists. =2D-- gnu/home-services.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnu/home-services.scm b/gnu/home-services.scm index 9f1e986616..0b77a1321d 100644 =2D-- a/gnu/home-services.scm +++ b/gnu/home-services.scm @@ -286,8 +286,11 @@ will be put in @file{~/.guix-home/files}."))) ;; XDG_RUNTIME_DIR dissapears on logout, that means such trick ;; allows to launch on-first-login script on first login only ;; after complete logout/reboot. =2D (when (not (file-exists? flag-file-path)) =2D (begin #$@gexps (touch flag-file-path)))))) + (if (file-exists? xdg-runtime-dir) + (when (not (file-exists? flag-file-path)) + (begin #$@gexps (touch flag-file-path))) + (display "XDG_RUNTIME_DIR doesn't exists, the session wasn't +created, on-first-login script won't execute anything."))))) =20 (define (on-first-login-script-entry m-on-first-login) "Return, as a monadic value, an entry for the on-first-login script =2D-=20 2.33.0 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Best regards, Andrew Tropin --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmFeg9QACgkQIgjSCVjB 3rA7AxAAj/q+C7jdnSnrWrEhjcrs8MXy/hXg5lmztAppf7K0WWYBCwJLvxtXPRGL 6JzwpVseM4FSa3pboDheKKqGfe0SjH22w26qQzABzuNhdTZ76Xr+sQwXcaIAN2f5 8+zBTAOGwVJJBUJSShp8/Ab0dJyeaZQqVpj07GwvFbtKvf70usthKrRB0W2Q0Y4S HQMdd+T8NYKQMDrJY+FcBM3V75RXr0o0AD/ypUDLr8+fcS1KnlvcV/o5PNJLwFO5 U2WphVsNBuy5jFAk7ZrabcXmZPDCyABYDSFHkB47xFq2uYgl7ymVoztCleCCbtPa VWB//OWL1JBjbxXsR09U2ay//S3+gvh+GaTSic2RI81jl07IJmAX5LlQRLA5HUiy bEwhxGiu4HXc5rvFO0cysSbnUTauxQVtpOL7jHjI123aaVAsnu8Pvn/tFzbNGn4i obYpHF6D5KNkBayxt2Ku022fOYVdZwul4/ZXxnDD6wWZxFmIHOtptACcGDcsqKPF lY9dAPsAHI10KSpaALI5AwuHZPtcQ4/KyHv/fAtQh2PhAfYyckRepNw4iUwoA3oq hmNdU3dJ9oFa4tCVZcSjvQhHlTdTRijgY51ZNslv1iLlPoi5bg7UZW9254BZHSCn yjUNuXG0YjeFww4QStv3XBVz/M5BDRw9/JMksaDMq6QsPKDAI94= =PzFK -----END PGP SIGNATURE----- --==-=-=-- From unknown Sun Aug 10 16:45:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50945: Guix home: No such file or directory: "/run/user/1003/on-first-login-executed" Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 Nov 2021 16:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50945 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Andrew Tropin , Jan Nieuwenhuizen , 50945@debbugs.gnu.org Received: via spool by 50945-submit@debbugs.gnu.org id=B50945.163613152121776 (code B ref 50945); Fri, 05 Nov 2021 16:59:02 +0000 Received: (at 50945) by debbugs.gnu.org; 5 Nov 2021 16:58:41 +0000 Received: from localhost ([127.0.0.1]:47013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mj2Y5-0005fA-Jq for submit@debbugs.gnu.org; Fri, 05 Nov 2021 12:58:41 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33804 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mj2Y3-0005ew-MJ for 50945@debbugs.gnu.org; Fri, 05 Nov 2021 12:58:40 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1636131513; bh=JU6lJRvInq6qfO2o3+ngCcdtU6YAsHsA4BdVUHkXDrY=; h=From:To:Subject:In-Reply-To:References:Date; b=FcPWxrpTQ+KKofkXJghElCTH1TG15I1IK10RPmllgN88nmPhnkFZgEgaPpKkziKx7 52ghE6EBqyNW4NKmgk+2GlAoibY7Za8E571aQ/83lHVKQZ0YTugGeqRsj51DQ1cSa8 cpdfFlsS7KcwC+u70swxBY5yzhwFTa6lOO9HEo30= In-Reply-To: <871r4xwgtn.fsf@trop.in> References: <87y27czr0v.fsf@gnu.org> <871r4xwgtn.fsf@trop.in> Date: Fri, 05 Nov 2021 17:58:29 +0100 Message-ID: <87ee7u4k0a.fsf@disroot.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Thu, Oct 07 2021, Andrew Tropin wrote: > On 2021-10-01 17:46, Jan Nieuwenhuizen wrote: > >> Hi, >> >> When using su or sudo to enter an account managed by guix home, I get >> this error >> >> --8 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Thu, Oct 07 2021, Andrew Tropin wrote: > On 2021-10-01 17:46, Jan Nieuwenhuizen wrote: > >> Hi, >> >> When using su or sudo to enter an account managed by guix home, I get >> this error >> >> --8 On 2021-10-01 17:46, Jan Nieuwenhuizen wrote: > >> Hi, >> >> When using su or sudo to enter an account managed by guix home, I get >> this error >> >> --8<---------------cut here---------------start------------->8--- >> Backtrace: >> 2 (primitive-load "/home/guix/.guix-home/on-first-login") >> In ice-9/ports.scm: >> 461:11 1 (call-with-output-file "/run/user/1003/on-first-login-=E2= =80=A6" =E2=80=A6) >> In unknown file: >> 0 (open-file "/run/user/1003/on-first-login-executed" "w" =E2= =80=A6) >> >> ERROR: In procedure open-file: >> In procedure open-file: No such file or directory: "/run/user/1003/on-fi= rst-login-executed" >> --8<---------------cut here---------------end--------------->8--- >> >> [...] > > Thank you for a very detailed report. > > pam_elogind doesn't create a session, when the login shell spawned by > sudo or su =3D> XDG_RUNTIME_DIR not get created =3D> this message appears. > > I think we can omit execution of any processes by on-first-login script > in case session wasn't created. Added the check: > > From aab6df0298963fe91a6ebfd1dadbc1530eceeff7 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Thu, 7 Oct 2021 08:12:04 +0300 > Subject: [PATCH] home-services: on-first-login: Check if XDG_RUNTIME_DIR > exists. > > * gnu/home-services.scm (on-first-login): on-first-login won't execute > anything if XDG_RUNTIME_DIR doesn't exists. > --- > gnu/home-services.scm | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/gnu/home-services.scm b/gnu/home-services.scm > index 9f1e986616..0b77a1321d 100644 > --- a/gnu/home-services.scm > +++ b/gnu/home-services.scm > @@ -286,8 +286,11 @@ will be put in @file{~/.guix-home/files}."))) > ;; XDG_RUNTIME_DIR dissapears on logout, that means such trick > ;; allows to launch on-first-login script on first login only > ;; after complete logout/reboot. > - (when (not (file-exists? flag-file-path)) > - (begin #$@gexps (touch flag-file-path)))))) > + (if (file-exists? xdg-runtime-dir) > + (when (not (file-exists? flag-file-path)) Use (unless =E2=80=A6) instead of (when (not =E2=80=A6)=E2=80=A6). > + (begin #$@gexps (touch flag-file-path))) > + (display "XDG_RUNTIME_DIR doesn't exists, the session wasn't > +created, on-first-login script won't execute anything."))))) It would be good to tell the user how they could manually run the script, that way they could manually set/create $XDG_RUNTIME_DIR and run the script. "XDG_RUNTIME_DIR doesn't exist; the 'on-first-login' script won't execute anything. You can manually execute the script by running '$HOME/.guix-home/on-first-login' WDYT? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmGFYrUVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5UuAP/RI/AZBKmH088uB629hRt5X+y69x JENCOTUBYP9VPzPx0uKA7COYRCc7Ac4d1OozDnXyp56kd3fTi+YnDbhjjrIo5MQo RmzaoGvGwAGy142mFt6lJ2H/7S/2GirK7v1O6eOLZfV96AEruVeJpkMjmQ9X3X8g paTcJz5Vid88ket5k7hbL4S/ZZh3hqkEJCYWX3Dt5myHc3gJvEalfbApvEA9qBLC hLt7627shDD3krafMEI+/Ytj/00fSExBnwPEwOsCcUpzGZQOea5reW3FHdBdEcqs NML+MG8sxcil8K0lZMBvWnUbow+HOaglu4HpmgwJ1SuO5DY1rJg888V6znq64+83 BWDsgh7JzT3TbKVji77Nx6CyMRgOrBG0AYI1mNB2TNMcUTifocRJK8geGT3jnYM2 DSCHVjGIlNhdwwYo0Toe8D9tz/EnAHYgjhIqmHgNKpv3XKpbPi0zcu3T1t0l9r6Y Sl2xWV5i7rxYzh2ycmWsTMBnVoyoCzLjuzw/4eNSNx7ZzUAendpIzx7vK2ii9GVr w7XxinI841/bsD1/r+jZ/PHrZd3JoLVErWiY9bQiHXW9M1dubvIyZ5nXziOCw6Cr KsIDUSdQdsU0rNDhECkPDJUAaSUao+lfxSCQJI5g2nBxHnLvXu/h0zJg1Rne4Tgx IHYXA1PEdY2gYgns =UnP9 -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Aug 10 16:45:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50945: Guix home: No such file or directory: "/run/user/1003/on-first-login-executed" Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 08 Nov 2021 09:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50945 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Oleg Pykhalov , Xinglu Chen Cc: 50945@debbugs.gnu.org, Jan Nieuwenhuizen Received: via spool by 50945-submit@debbugs.gnu.org id=B50945.163636349017253 (code B ref 50945); Mon, 08 Nov 2021 09:25:02 +0000 Received: (at 50945) by debbugs.gnu.org; 8 Nov 2021 09:24:50 +0000 Received: from localhost ([127.0.0.1]:56323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk0tW-0004UC-1X for submit@debbugs.gnu.org; Mon, 08 Nov 2021 04:24:50 -0500 Received: from mail-lj1-f176.google.com ([209.85.208.176]:44625) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk0tR-0004Tu-Uv for 50945@debbugs.gnu.org; Mon, 08 Nov 2021 04:24:48 -0500 Received: by mail-lj1-f176.google.com with SMTP id 13so10301572ljj.11 for <50945@debbugs.gnu.org>; Mon, 08 Nov 2021 01:24:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=4dcvY6EjAPgL4ZhyR2FDSa+6/f4Xt/H9c34M7w3mDzw=; b=7WV4UnXCJRGZl49rObI3jr+5f/zDyvoK2ccoqxjplvGVz09hJsVuPZx6xBQJEbrCnI y8mrMhVsE+PoT/OyP3X+qckvDAfXFyhec4+4509I9Drq+n/90l71cuHDseGPBU0GaYND YMLwNh4Q9o0T0ssSfXa4egYPlEigEKZVT0c4YGrQYYSPoE7vAxmmwtluEey6IazQWlBo +nQLISoMFov7k1bNB93ZxFnsJhdep1tp1OWlY4dBgD3k8+g1HXeK/Ezk+QZYQiQUfabg HfPU3sec65spXZYHIn1+Xc9B2UVoeckn0ZIBW0wRvaoLhYyRnyWgZBAyX56hP0W1jeCK MGVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=4dcvY6EjAPgL4ZhyR2FDSa+6/f4Xt/H9c34M7w3mDzw=; b=MJ8fSmKY9XARxLyBVjun7r5bIWneh9Oh3qSR8GDbBGv07wGZ1jXmR9ZYmYKDBXLtYA iYI5zyuY9VoFLNVQ9Yhd8/+PXHSgBG0WLu2azzsFCvQJOPptWGdYPFDpURRm8hvG4J/Y GmMl7uwW8JKbQqw4E+9zmjZwqRyAliNXJ9L/oOGMrBohi0+5VA0Ep1/zlJo8Nm3U6LBI KXpvanX6RQRo7FH2yTW4AcYKekoyr3scKX+vh9VBLDfqIza2sZshPJuPjdqk6eSEIXfP H3Daq8ItZmQFrab208yaXcCUqZZS+Z72zJyGRXroHZbkmkQhFHzI7CuWT8aB/b4H78FI uvng== X-Gm-Message-State: AOAM530216qbumTB9TGaOBxXpsrsRuEWX4U/gKWWlFHxYaXCWe5eig4h ujb93p+N4dV+FuELMBWm2g4dcQ== X-Google-Smtp-Source: ABdhPJzRj5Pq/1ZyM7b3j73q0nP91WEwFmhdAxFYzn6lnhw+8Jd4MkoU7JT/dc2NFeY5py9dIg2L9w== X-Received: by 2002:a2e:3c18:: with SMTP id j24mr59506064lja.252.1636363479903; Mon, 08 Nov 2021 01:24:39 -0800 (PST) Received: from localhost (109-252-141-7.dynamic.spd-mgts.ru. [109.252.141.7]) by smtp.gmail.com with ESMTPSA id g26sm89384ljn.107.2021.11.08.01.24.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 01:24:39 -0800 (PST) From: Andrew Tropin In-Reply-To: <87ee7u4k0a.fsf@disroot.org> References: <87y27czr0v.fsf@gnu.org> <871r4xwgtn.fsf@trop.in> <87ee7u4k0a.fsf@disroot.org> Date: Mon, 08 Nov 2021 12:24:35 +0300 Message-ID: <87o86vgfu4.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) 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.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-11-05 17:58, Xinglu Chen wrote: > Hi, > > On Thu, Oct 07 2021, Andrew Tropin wrote: > >> On 2021-10-01 17:46, Jan Nieuwenhuizen wrote: >> >>> Hi, >>> >>> When using su or sudo to enter an account managed by guix home, I get >>> this error >>> >>> --8<---------------cut here---------------start------------->8--- >>> Backtrace: >>> 2 (primitive-load "/home/guix/.guix-home/on-first-login") >>> In ice-9/ports.scm: >>> 461:11 1 (call-with-output-file "/run/user/1003/on-first-login-=E2= =80=A6" =E2=80=A6) >>> In unknown file: >>> 0 (open-file "/run/user/1003/on-first-login-executed" "w" = =E2=80=A6) >>> >>> ERROR: In procedure open-file: >>> In procedure open-file: No such file or directory: "/run/user/1003/on-f= irst-login-executed" >>> --8<---------------cut here---------------end--------------->8--- >>> >>> [...] >> >> Thank you for a very detailed report. >> >> pam_elogind doesn't create a session, when the login shell spawned by >> sudo or su =3D> XDG_RUNTIME_DIR not get created =3D> this message appear= s. >> >> I think we can omit execution of any processes by on-first-login script >> in case session wasn't created. Added the check: >> >> From aab6df0298963fe91a6ebfd1dadbc1530eceeff7 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Thu, 7 Oct 2021 08:12:04 +0300 >> Subject: [PATCH] home-services: on-first-login: Check if XDG_RUNTIME_DIR >> exists. >> >> * gnu/home-services.scm (on-first-login): on-first-login won't execute >> anything if XDG_RUNTIME_DIR doesn't exists. >> --- >> gnu/home-services.scm | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/gnu/home-services.scm b/gnu/home-services.scm >> index 9f1e986616..0b77a1321d 100644 >> --- a/gnu/home-services.scm >> +++ b/gnu/home-services.scm >> @@ -286,8 +286,11 @@ will be put in @file{~/.guix-home/files}."))) >> ;; XDG_RUNTIME_DIR dissapears on logout, that means such trick >> ;; allows to launch on-first-login script on first login only >> ;; after complete logout/reboot. >> - (when (not (file-exists? flag-file-path)) >> - (begin #$@gexps (touch flag-file-path)))))) >> + (if (file-exists? xdg-runtime-dir) >> + (when (not (file-exists? flag-file-path)) > > Use (unless =E2=80=A6) instead of (when (not =E2=80=A6)=E2=80=A6). > >> + (begin #$@gexps (touch flag-file-path))) >> + (display "XDG_RUNTIME_DIR doesn't exists, the session wasn't >> +created, on-first-login script won't execute anything."))))) > > It would be good to tell the user how they could manually run the > script, that way they could manually set/create $XDG_RUNTIME_DIR and run > the script. > > "XDG_RUNTIME_DIR doesn't exist; the 'on-first-login' script won't > execute anything. You can manually execute the script by running > '$HOME/.guix-home/on-first-login' > > WDYT? Addressed suggestions, attaching updated patch. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-home-services-on-first-login-Check-if-XDG_RUNTIME_DI.patch Content-Transfer-Encoding: quoted-printable From=208b924b02ab917632047d6653f19d9b16175989bf Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Thu, 7 Oct 2021 08:12:04 +0300 Subject: [PATCH] home-services: on-first-login: Check if XDG_RUNTIME_DIR exists. * gnu/home-services.scm (on-first-login): on-first-login won't execute anything if XDG_RUNTIME_DIR doesn't exists. =2D-- gnu/home/services.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 5c9b743f7b..1e295b6afe 100644 =2D-- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -286,8 +286,13 @@ (define (compute-on-first-login-script _ gexps) ;; XDG_RUNTIME_DIR dissapears on logout, that means such trick ;; allows to launch on-first-login script on first login only ;; after complete logout/reboot. =2D (when (not (file-exists? flag-file-path)) =2D (begin #$@gexps (touch flag-file-path)))))) + (if (file-exists? xdg-runtime-dir) + (unless (file-exists? flag-file-path) + (begin #$@gexps (touch flag-file-path))) + (display "XDG_RUNTIME_DIR doesn't exists, on-first-login script +won't execute anything. You can check if xdg runtime directory exists, +XDG_RUNTIME_DIR variable is set to apropriate value and manually execute t= he +script by running '$HOME/.guix-home/on-first-login'"))))) =20 (define (on-first-login-script-entry m-on-first-login) "Return, as a monadic value, an entry for the on-first-login script =2D-=20 2.33.0 --=-=-= Content-Type: text/plain Also, added a note about elogind/XDG_RUNTIME_DIR to manual. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-doc-Add-a-note-about-elogind-and-XDG_RUNTIME_DIR-for.patch Content-Transfer-Encoding: quoted-printable From=20f5d35fd4f542a11226c0159ee32498e374ff40a2 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Mon, 8 Nov 2021 12:22:04 +0300 Subject: [PATCH] doc: Add a note about elogind and XDG_RUNTIME_DIR for Guix Home. * doc/guix.texi (Declaring the Home Environment): Add a note about elogind = and XDG_RUNTIME_DIR. =2D-- doc/guix.texi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 3355a535ad..36437cf161 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -35916,6 +35916,13 @@ guix home reconfigure config.scm This ``builds'' your home environment and creates @file{~/.guix-home} pointing to it. Voil=C3=A0! =20 +@quotation=20 +Ensure that operating system has elogind or any other mechanism, which +creates xdg runtime directory and sets @env{XDG_RUNTIME_DIR} variable. +Otherwise, @file{on-first-login} script won't execute anything, and +process like userland Shepherd and its descendants won't start. +@end quotation + @node Configuring the Shell @section Configuring the Shell This section is safe to skip if your shell or shells are managed by =2D-=20 2.33.0 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Oleg, please apply it if it looks good. =2D-=20 Best regards, Andrew Tropin --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmGI7NMACgkQIgjSCVjB 3rAbfw/+LytNQu+aIiMgrUK3tiCecllYPTaTiuT5wJJGaSBdoePgy3q3EYFCINt0 ViyKK+/+3rhMSmr19cbPhCax9i+aWGUpO9eIlHPLqwgawDljB3wWEKvMHb6EOIMB YCVfQLXFCAyEmj8F8wjyPCaJUtabctMrNdI/fo3OKyIyPPJmsaAgs/HbCx9pJ2Bp VzbkXyOzC5QyPdZOb/zZN1PxQ3LtHp7VoNciyPqIFIYq3EVIT7gJMyBxyK/JLaMq BH9VaATHpz+60fn28EqSz/5DeiQjv0U3M3ocvWKZAV2W3zj+xnc/Aer8RZs3U5yB Zy2VIlacIdN2ozgrwWRpe5WVtWRDnxH+wiP2jgFF5G8JyDVjLvJEvKhZLLGCkn1r cBzfI4ns46+0fvyWr0c7HstRZc1NIV4m/yOr2/REuF7bilPqGHh6NiEPtruqQhdc 7vgvJ8Yu/40OHlpYU9oheTw91SJqBn5XQ2XglL87u0UzFJK0SZD0jpn8XcphvWcA bICKDeDtAfCAQLfqWlIagaFg/WkLe6GGau+cAOEWTgHXPwEYpexe1RNFRcTuzLRd tXm/7KFVmAPdlSfhl8f8EqoyNInHEp/1WlAUYdbQKt2zmNo9YCgWV+7a4PUOtqQ9 ENWR1Ya1egVgKyknOLsC2JqLvvrtkTSivqXH0+db7emL67TGp0Y= =0e5H -----END PGP SIGNATURE----- --==-=-=-- From unknown Sun Aug 10 16:45:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#50945: Guix home: No such file or directory: "/run/user/1003/on-first-login-executed" Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 14 Nov 2021 22:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50945 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Andrew Tropin Cc: Oleg Pykhalov , 50945@debbugs.gnu.org, Xinglu Chen , Jan Nieuwenhuizen Received: via spool by 50945-submit@debbugs.gnu.org id=B50945.16369278815378 (code B ref 50945); Sun, 14 Nov 2021 22:12:02 +0000 Received: (at 50945) by debbugs.gnu.org; 14 Nov 2021 22:11:21 +0000 Received: from localhost ([127.0.0.1]:51912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmNia-0001Og-Tt for submit@debbugs.gnu.org; Sun, 14 Nov 2021 17:11:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmNiZ-0001OS-Mi for 50945@debbugs.gnu.org; Sun, 14 Nov 2021 17:11:20 -0500 Received: from [2001:470:142:3::e] (port=39042 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmNiT-0003E1-Pz; Sun, 14 Nov 2021 17:11:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=UWSzML3N9K9sae8Afwi51TWS0at9DIqbDydyYrQ0uig=; b=irMd5BE1FShzq3fXvTpM 8OocdCLKR89iFq7MtJJc1TxKdeFCFI9mUWjhPh+QUL3ZcLzTPhnEc3Ja7VEAVb6rw3PPQzJs2RR0M JI3jev4eE045ejlTldrHyDiAZKGnwSr/XtfyZOacH5o1M9Rwma8S7K0RslCfIoxxFdm3ZOwHjQ4El fS7bRdjjYyzeDx7BwPtGgAxztxW7Ys09IizS+pQBvE3nPnLZrjy1x9Y1WGHGufbjHRDCsM4jayNPX PBeaks51KmEYugdw1XVx6O0oc/vvQUg9IB96IhZe2IUIAd0QFn8DudZuR01WDiUJaRteVfOMZ2ks0 VRx4XfIa0Dra1w==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51930 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmNiT-0007lE-Eb; Sun, 14 Nov 2021 17:11:13 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87y27czr0v.fsf@gnu.org> <871r4xwgtn.fsf@trop.in> <87ee7u4k0a.fsf@disroot.org> <87o86vgfu4.fsf@trop.in> Date: Sun, 14 Nov 2021 23:11:09 +0100 In-Reply-To: <87o86vgfu4.fsf@trop.in> (Andrew Tropin's message of "Mon, 08 Nov 2021 12:24:35 +0300") Message-ID: <87sfvy8k1u.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) 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 Andrew and all, Andrew Tropin skribis: > On 2021-11-05 17:58, Xinglu Chen wrote: > From 8b924b02ab917632047d6653f19d9b16175989bf Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Thu, 7 Oct 2021 08:12:04 +0300 > Subject: [PATCH] home-services: on-first-login: Check if XDG_RUNTIME_DIR > exists. > > * gnu/home-services.scm (on-first-login): on-first-login won't execute > anything if XDG_RUNTIME_DIR doesn't exists. Applied, with a =E2=80=9CFixes=E2=80=9D line in the commit log. However=E2= =80=A6 > +++ b/gnu/home/services.scm > @@ -286,8 +286,13 @@ (define (compute-on-first-login-script _ gexps) > ;; XDG_RUNTIME_DIR dissapears on logout, that means such trick > ;; allows to launch on-first-login script on first login only > ;; after complete logout/reboot. > - (when (not (file-exists? flag-file-path)) > - (begin #$@gexps (touch flag-file-path)))))) > + (if (file-exists? xdg-runtime-dir) > + (unless (file-exists? flag-file-path) > + (begin #$@gexps (touch flag-file-path))) > + (display "XDG_RUNTIME_DIR doesn't exists, on-first-login scri= pt > +won't execute anything. You can check if xdg runtime directory exists, > +XDG_RUNTIME_DIR variable is set to apropriate value and manually execute= the > +script by running '$HOME/.guix-home/on-first-login'"))))) This pattern is problematic because this text is not internationalized (not subject to translation). Part of caring about users in Guix implies ensuring that all messages are internationalized. The fact that the text is embedded in a generated script makes it a little trickier. In the installer, we address that by using the message catalog of the =E2=80=98guix=E2=80=99 package like so: #~(begin (bindtextdomain "guix" (string-append #$guix "/share/locale")) (textdomain "guix") (setlocale LC_ALL "")) The downside is that the script ends up depending on the =E2=80=98guix=E2= =80=99 package; we could optimize that later on. At any rate, for these cases where you cannot avoid having messages printed by generated scripts such as this one, the solution would be to: 1. Add calls to =E2=80=98bindtextdomain=E2=80=99 and =E2=80=98textdomain= =E2=80=99 as above (=E2=80=98setlocale=E2=80=99 no longer needs to be called explicitly). 2. Import (guix i18n) and wrap messages in =E2=80=98G_=E2=80=99 (or =E2= =80=98N_=E2=80=99) calls. 3. Ensure that each file that uses =E2=80=98G_=E2=80=99 or =E2=80=98N_=E2= =80=99 is listed in po/guix/POTFILES.in. Could one of you take a look? :-) > Also, added a note about elogind/XDG_RUNTIME_DIR to manual. > > From f5d35fd4f542a11226c0159ee32498e374ff40a2 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Mon, 8 Nov 2021 12:22:04 +0300 > Subject: [PATCH] doc: Add a note about elogind and XDG_RUNTIME_DIR for Gu= ix > Home. > > * doc/guix.texi (Declaring the Home Environment): Add a note about elogin= d and > XDG_RUNTIME_DIR. I tweaked the wording and applied. Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 14 17:12:29 2021 Received: (at control) by debbugs.gnu.org; 14 Nov 2021 22:12:29 +0000 Received: from localhost ([127.0.0.1]:51917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmNjh-0001Qn-BE for submit@debbugs.gnu.org; Sun, 14 Nov 2021 17:12:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmNjf-0001QW-Ee for control@debbugs.gnu.org; Sun, 14 Nov 2021 17:12:27 -0500 Received: from [2001:470:142:3::e] (port=39096 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmNjY-0003S0-Ns for control@debbugs.gnu.org; Sun, 14 Nov 2021 17:12:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=/D5ADUGTdomHLTUFlsGEaO8me6Mr5PjcOaTevbOyrj0=; b=AqyQ1jCctJwjFc h1fKv63OQ6GbMhqBg8HpJpoQV5Pf7SjOwnFCyOpoDk3KVggxdEQL1QlWOce2VeJsqmTIQo/aQxGKo x59UraeVOjfEw4UJ5TDklTIh0AmJYFpPOYeYcFCGIWdSvsZ7nvl9m1ZymkRBEFuqcu6+TDeNLvZKs oOECKhgdzZ+rJtnGE4AFajzgRvHoEEA2hMwHOHreYjA1gCqPse1bn6bqUtZWF7MGdCY9WbdUm1bLK oi9/t72huAB4Q4EHdkEIpRbueYtwfOnVoieUgpFxElYhLgchFZ2FDCJdWkrWSWH1xY8gTBvXhOn+2 CUozhFjXknPM5Nt74e+Q==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:58562 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmNjW-0007pZ-Qx for control@debbugs.gnu.org; Sun, 14 Nov 2021 17:12:20 -0500 Date: Sun, 14 Nov 2021 23:12:17 +0100 Message-Id: <87r1bi8jzy.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #50945 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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 (---) close 50945 quit