Message ID | cad4115ef18b9c48219a8e8c3e62b2c1d284afd6.1746682207.git.maxim.cournoyer@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BB47827BC4B; Thu, 8 May 2025 07:38:06 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4F46627BC49 for <patchwork@mira.cbaines.net>; Thu, 8 May 2025 07:38:06 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1uCust-0006e8-6f; Thu, 08 May 2025 02:37:31 -0400 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 <Debian-debbugs@debbugs.gnu.org>) id 1uCusd-0006an-8A for guix-patches@gnu.org; Thu, 08 May 2025 02:37:15 -0400 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 <Debian-debbugs@debbugs.gnu.org>) id 1uCusV-0001iq-7q for guix-patches@gnu.org; Thu, 08 May 2025 02:37:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=9aCtet6tmN6TIlxwercHuM6/PCXa4VXP0TX71clwZv4=; b=gPRpDf8HUNz/66qVbSI7roqHvJZqPiPfCmJaBWNSIvdSqggR+E90CSO5X+HQhcaZ3QUqUJ2fLg9/lys4afWKykGyr8SCpK0EKKK/HIjy0TBi4Pjgikxhb/lIRNcoQk2EL/RMeIOxW7oveyCw58mTSVLoXdOdQUh3gTaz4TUYOa5H1EYv7OP0RdnEJJtvrfR26ptiH5+x8swDDN856ihxdqAvTrR2JS2G5mBFFooI/nbAp8rSYzzOPIRD1/PQvwStd4d6tZDMxQGVgOEt04RDuYytIjmHCxAq2zdXsqBJrjjsdHjKVF15kzf5QAzx75O07O6g05TYBt6jyJhxkNeH0g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1uCusT-0000mc-Od; Thu, 08 May 2025 02:37:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78308] [PATCH 9/9] services: Add vte-integration-service-type to %desktop-services. Resent-From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, noelopez@free.fr, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Thu, 08 May 2025 06:37:05 +0000 Resent-Message-ID: <handler.78308.B78308.17466861822842@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78308 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78308@debbugs.gnu.org Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>, Liliana Marie Prikler <liliana.prikler@gmail.com>, Maxim Cournoyer <maxim.cournoyer@gmail.com>, =?utf-8?q?No=C3=A9?= Lopez <noelopez@free.fr>, Vivien Kraus <vivien@planete-kraus.eu> X-Debbugs-Original-Xcc: Liliana Marie Prikler <liliana.prikler@gmail.com>, Maxim Cournoyer <maxim.cournoyer@gmail.com>, =?utf-8?q?No=C3=A9?= Lopez <noelopez@free.fr>, Vivien Kraus <vivien@planete-kraus.eu> Received: via spool by 78308-submit@debbugs.gnu.org id=B78308.17466861822842 (code B ref 78308); Thu, 08 May 2025 06:37:05 +0000 Received: (at 78308) by debbugs.gnu.org; 8 May 2025 06:36:22 +0000 Received: from localhost ([127.0.0.1]:52887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1uCurl-0000jh-SJ for submit@debbugs.gnu.org; Thu, 08 May 2025 02:36:22 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:42488) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <maxim.cournoyer@gmail.com>) id 1uCurg-0000iE-HC for 78308@debbugs.gnu.org; Thu, 08 May 2025 02:36:17 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-7398d65476eso595404b3a.1 for <78308@debbugs.gnu.org>; Wed, 07 May 2025 23:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746686170; x=1747290970; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9aCtet6tmN6TIlxwercHuM6/PCXa4VXP0TX71clwZv4=; b=ILRSTxdRJrlHzKiwAJSg07Ii1zX4mE/mHG4SnoprJpQlIFk+yjoAKIuDIDHAVKwJqI z5n+FVAduwKd7VuTB9VtGgP1rKUSu2yOWn4Xn+JjIrLsOw/k+OF9VOxIhrbDeJSU8y4m NtxBYcjnmw9CjNHpgbHqLQ6rJWvr9q5j1DoVwiBoX6IRFWxv+9MrrnTlQ+NrClPJFi+L l1V/29C7jMmLIG8u9+T4yNtK6gEMn5OONSnJdWacyiTYgG/nvHBspn0krTbPDEn3P54h GECm8UqQwTHu2uJROgcuqVM4nETJ8TeXjkORgRNCwlrYXKE5BOOm2PKv+PlEPF9WxGn7 7ESQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746686170; x=1747290970; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9aCtet6tmN6TIlxwercHuM6/PCXa4VXP0TX71clwZv4=; b=Ue3da6n+TKWKgVxP9QHE1GvKhHl1eKTmbUvUsGfpe7GwWK04XcJoVGFW217kR0SYZv 17/Js2QOWVaEd0Ec5Pls0ULAuolMbvPJ3PvI1/HQG5JUDyVclHfOu9zz9Nq1Jh3mB+7f o0LIeApD7lh7y60X72TLx62JasqUFQ/5UZ5P13u+3FwjXaNb3hpngeld6mGsiMGT0GyT hV8UgEqZRBazEyaelpSx6l3TlyjWyTthM4qhjbIJEQJG4d+Gs7ZmJN0IREZerY0dLDNj 1rpwqRRh6UIBgrxtZVUa9zrAt/BzwBUa6NRK2zSzxp8ZfKEUSHuUKeuAD9XexKkFz1Vj jrNQ== X-Gm-Message-State: AOJu0Yx46j1sAAiJMjL2NGdL9iPhnbyXqQPtbTwt8TEIzypmEjPq/J6K EjgL+l70XKl2RdjAh6CsFjkvSXWU9ew239CKLDT4Yxz/lPC2U4otzC8PfQ== X-Gm-Gg: ASbGncvKxvBE0ixGaMwLHjBZyJD0GFSkc8bwbgQe5ZDK6Rh+TC1jl8KN9YJVfvD9cjc bVcCcZ47IQ3y3smJpha9B6pTGVphX0bNMrB9hJpgsvXcK1sx2QnQZZhX1YvBaV5vM2mrxISw8ck jOsn2438K6dCs/6iMt1Q5LXHwDCuedcPN+s/DCius/7UOwZkvgeioMep4eiSQ0V8yzowBl+K2+O 6ldLp3xyaXXtvJ+MIH421iyl1mS9lvPhMEnCvWyELKHyGGbHlg+khiNjfGW7avAkAjcfApjA3yS KsQj2qSvN8yTXB8qLagKR9aihCTA5KJp/deCqWefjvFDlhlb3YDrF/KHL8s3 X-Google-Smtp-Source: AGHT+IHh/0xoHFpE/7ciSeVDhdrNXJFcHfpbMLOCkbs5kxe9Vhp/bqcWqtp5tg5vlIUYOBedi0ZyDw== X-Received: by 2002:a05:6a00:ace:b0:736:b400:b58f with SMTP id d2e1a72fcca58-740a91d0efdmr4287778b3a.0.1746686170159; Wed, 07 May 2025 23:36:10 -0700 (PDT) Received: from localhost.localdomain ([2405:6586:be0:0:83c8:d31d:2cec:f542]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74058dc45c7sm12452121b3a.71.2025.05.07.23.36.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 May 2025 23:36:09 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@gmail.com> Date: Thu, 8 May 2025 15:02:25 +0900 Message-ID: <cad4115ef18b9c48219a8e8c3e62b2c1d284afd6.1746682207.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <cover.1746682206.git.maxim.cournoyer@gmail.com> References: <cover.1746682206.git.maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
VTE integration support / Shell startup files refactor
|
|
Commit Message
Maxim Cournoyer
May 8, 2025, 6:02 a.m. UTC
* gnu/services/desktop.scm (desktop-services-for-system): Fixes: <https://issues.guix.gnu.org/72172> Change-Id: Ib29468468e327801a4e95361610159de61f7e8d6 --- gnu/services/desktop.scm | 4 ++++ 1 file changed, 4 insertions(+)
Comments
Hi Maxim, thank you for this. I think it's important for users to be able to extend their system profile and bashrc files, currently it was hard to do. Basically the only way was to modify etc-service-type in essential-services, removing the profile and bashrc completely, and adding your own contents. I have a few comments that I am posting before I actually tested it just based on the changes: I think that the docs for etc-profile-d-service-type could be more specific about the files accepted - that only .sh files are going to have some effect. Additionally the example plain-file is wrong, plain-file accepts two arguments, name and content. Here the name is quite important as it has to have the .sh extension for the file to be sourced. As for the bash modification, is is a good idea to go through grafts? Aren't grafts mainly meant for security fixes as to no changes are introduced? How can we make sure this change is not going to break any of the packages using bash? I understand we cannot rebuild the whole world via this patch series if it is to be applied to master, but this doesn't feel right, maybe those changes to bash should go on a team branch? It's not super important, but do you happen to know why bash-completion package provides profile.d directory for bash_completion.sh that should actually be bashrc? Maybe it should be in etc/bashrc.d output dir instead - that the package should be adapted? I don't think removing the PS1 from guix home bashrc is appropriate. I think the PS1 is mostly for foreign distros, not for Guix System, it's even mentioned in the comment that it's for distros that don't provide a good PS1. Similar question goes to removing sourcing of /etc/bashrc. Was this because of Guix System or because of foreign distros? I don't know here. Note that users not using %base-services are going to get no bash completions after this update. Maybe there should be news entry about the bashrc-d and profile-d services? Regards Rutherther
Hi, Rutherther <rutherther@ditigal.xyz> writes: > Hi Maxim, > > thank you for this. I think it's important for users to be able to > extend their system profile and bashrc files, currently it was hard to > do. Basically the only way was to modify etc-service-type in > essential-services, removing the profile and bashrc completely, and > adding your own contents. Glad to know that'll be useful! > I have a few comments that I am posting before I actually tested it just > based on the changes: > > I think that the docs for etc-profile-d-service-type could be more > specific about the files accepted - that only .sh files are going to > have some effect. Additionally the example plain-file is wrong, > plain-file accepts two arguments, name and content. Here the name is > quite important as it has to have the .sh extension for the file to be sourced. Thanks for spotting this. I'll fix it, and emphasize more that only files of the @file{.sh} extension are considered. > As for the bash modification, is is a good idea to go through grafts? > Aren't grafts mainly meant for security fixes as to no changes are > introduced? How can we make sure this change is not going to break any > of the packages using bash? I understand we cannot rebuild the whole > world via this patch series if it is to be applied to master, but this > doesn't feel right, maybe those changes to bash should go on a team branch? A full world rebuild seems very expensive for this change alone. The only thing this switch does is cause Bash to source /etc/bashrc when it also sources also ~/.bashrc. Since there is no /etc/bashrc in the build container, we shoud be good in terms of not breaking anything build wise. > It's not super important, but do you happen to know why bash-completion > package provides profile.d directory for bash_completion.sh that should > actually be bashrc? Maybe it should be in etc/bashrc.d output dir > instead - that the package should be adapted? That seems to come from Fedora, and maybe other distributions, that have this in their /etc/bashrc file: --8<---------------cut here---------------start------------->8--- # Only display echos from profile.d scripts if we are no login shell # and interactive - otherwise just process them to set envvars for i in /etc/profile.d/*.sh; do if [ -r "$i" ]; then if [ "$PS1" ]; then . "$i" else . "$i" >/dev/null fi fi done unset i --8<---------------cut here---------------end--------------->8--- So on these systems, /etc/profile.d/ is used to extend Bash too. That means these scripts are limited to be POSIX-compliant, as /etc/profile also source these, which seems an odd requirement to me for configuring Bash :-). In practice, what vte.sh does for example is check if the Shell is Bash or Zsh, and return early if it isn't. Not as clean as having a /etc/bashrc.d, I'd say. Let's start some new trend ;-). > I don't think removing the PS1 from guix home bashrc is appropriate. I think > the PS1 is mostly for foreign distros, not for Guix System, it's even > mentioned in the comment that it's for distros that don't provide a good PS1. It's not removed, but moved, as the change log says for the "system: Factorize bashrc default configuration." commit: --8<---------------cut here---------------start------------->8--- * gnu/home/services/shells.scm (add-bash-configuration): Do not set PS1, now part of %default-bashrc. --8<---------------cut here---------------end--------------->8--- Guix home uses the %default-bashrc, so it's covered. It's something I've tried paying attention to, it's good you saw that too. > Similar question goes to removing sourcing of /etc/bashrc. Was this > because of Guix System or because of foreign distros? I don't know here. Both, I think! The home-shell-service-type uses the bash package from Guix, so it's safe to assume /etc/bashrc will now be sourced anytime ~/.bashrc is. > Note that users not using %base-services are going to get no bash > completions after this update. Maybe there should be news entry about > the bashrc-d and profile-d services? Good idea too! I'll write one and send in a v2.
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 2127c2d389c..ffa02063514 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -2458,6 +2458,10 @@ (define* (desktop-services-for-system #:optional ;; to avoid GDM stale cache and permission issues. gdm-file-system-service + ;; Provides a nicer terminal emulator experience for VTE-using + ;; terminal emulators such as GNOME Console, Xfce Terminal, etc. + (service vte-integration-service-type) + ;; The global fontconfig cache directory can sometimes contain ;; stale entries, possibly referencing fonts that have been GC'd, ;; so mount it read-only.