GNU bug report logs - #78308
[PATCH 0/9] VTE integration support / Shell startup files refactor

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Thu, 8 May 2025 05:49:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Full log


Message #137 received at 78308 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sergey Trofimov <sarg <at> sarg.org.ru>
Cc: Luis Guilherme Coelho <lgcoelho <at> disroot.org>,
 Rutherther <rutherther <at> ditigal.xyz>, 78308 <at> debbugs.gnu.org,
 Julien Lepiller <julien <at> lepiller.eu>,
 Florian Pelz <pelzflorian <at> pelzflorian.de>
Subject: Re: [bug#78308] [PATCH v3 10/10] news: Add news entry for
 etc-bashrc-d-service-type.
Date: Wed, 21 May 2025 09:11:56 +0900
Hi Sergey,

Thanks for the brainstorm / ideas, even patch!

[...]

> I also don't like this idea. Why would non-login shells run
> `/etc/profile.d`? Aren't they launched in environment where login
> happened and therefore `/etc/profile` got applied already?

That's what I initially thought, and I originally didn't see an
immediate need for etc-bashrc-d-service-type, but upon testing with the
/etc/profile.d/vte.sh file installed for example, at least in GNOME
Console it wouldn't take effect.  Perhaps the environment is cleaned up
by GNOME Console and it expects the shell, e.g. Bash, to source
/etc/profile.d/vte.sh from bashrc (GNOME Console starts the shell as an
interactive, non-login shell).  I had tested in an actual VM.

Are you sure that it would help for the flatpak cases (have you actually
tested it?).

Reading flatpak.sh, I assume it would work, as long as flatpak is
installed to the given profile, as it needs to be available on PATH when
/etc/profile is sourced, which should be the case if the snippet is
added below the existing variable exports in ~/.guix-profile/etc/profile
(which contain PATH=).

I'll try taking a look at your snippet.  The guard avoiding double
sourcing /etc/profile looks interesting, perhaps already useful to guard
against bug#23118 for example?

-- 
Thanks,
Maxim




This bug report was last modified 18 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.