From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6NlGH8aJkWHGbAEAgWs5BA (envelope-from ) for ; Sun, 14 Nov 2021 23:12:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sDXwGsaJkWFTBwAAbx9fmQ (envelope-from ) for ; Sun, 14 Nov 2021 22:12:22 +0000 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 8B7FE52CF for ; Sun, 14 Nov 2021 23:12:21 +0100 (CET) Received: from localhost ([::1]:47272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmNjX-0002JO-Pc for larch@yhetil.org; Sun, 14 Nov 2021 17:12:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmNjJ-0002J1-Rs for bug-guix@gnu.org; Sun, 14 Nov 2021 17:12:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmNjG-0003Qv-ON for bug-guix@gnu.org; Sun, 14 Nov 2021 17:12:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmNjG-0001Po-HZ for bug-guix@gnu.org; Sun, 14 Nov 2021 17:12:02 -0500 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 50945@debbugs.gnu.org, Xinglu Chen Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636927942; 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: content-transfer-encoding:content-transfer-encoding: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=UWSzML3N9K9sae8Afwi51TWS0at9DIqbDydyYrQ0uig=; b=qt7laStBUkiboIz3o3ynT2sI6aX4agVMvpSIFXpZlcppVU/b83IvruqtIqqBi9zrPJKiv0 JJiTdMuvBYdb3cdQb1552zJrZzqbtuZdCQHVPGgCfdhUuooxnpOGCyHtfDfGpKroJHPKrZ TzZpI/mA+SSW/kVDLbyRzRogMpweEkn914YLQoJZ63X7pdeNnsYVWFjBOWeeNb94fr0vng mQEOCOPBV4ZOn6VCslR7QbYqrpg12Sm110ZWW3TrWo1bpzMVAt22WIPie6O1/xopoVMF2P 5lEfdW0wgvC4MHjndOmLTJIJhQZUApo9e1EmFv/7Ne90v+AFqbaRuE3jZ2Ts2g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636927942; a=rsa-sha256; cv=none; b=FdzYByIzELOzSdD3hcsGRyNHlHjjWLhlGiqTfXOPW09zPFHdIOn+v3DbRmuNv/dKxqKYk0 VapSQZKYGr39X1FPyh0QtDopCdiqKzDtfcrfiAQy3tbR1sJ+AGTCbHbQCi+tBa4nACaAtU y6mh/7L7HQ6y+J10/UWW3eK9/LLG9DtJS+NZA2Qn7kUlr3iee/dUJ3dqyXEzDTdIzNbat5 ymVbdcyfftCl06+x8Y513ibBEHghS2rfZ39ofQmwWOR4RujG16ZuD4Bg9xVQsMRBKdc1l2 7rAVmG+/U+uyRLs5OzWTrmprI6RIhoG2XeMvaoiSJedy8iiUW8miAQDLCn8F7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=irMd5BE1; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.04 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=irMd5BE1; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8B7FE52CF X-Spam-Score: -2.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: aDXVSROrnnzo 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.