From patchwork Mon Jul 4 02:35:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 834 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 98DCE27BBEA; Mon, 4 Jul 2022 03:36:10 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 ED0C727BBE9 for ; Mon, 4 Jul 2022 03:36:09 +0100 (BST) Received: from localhost ([::1]:39658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8BwX-0007tl-2m for patchwork@mira.cbaines.net; Sun, 03 Jul 2022 22:36:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8BwQ-0007sE-0F for guix-patches@gnu.org; Sun, 03 Jul 2022 22:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8BwP-0004q9-NZ for guix-patches@gnu.org; Sun, 03 Jul 2022 22:36:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8BwP-0000iS-Lf for guix-patches@gnu.org; Sun, 03 Jul 2022 22:36:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56050] [PATCH v2 0/2] etc/guix-install.sh: Initialize XDG base directories. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 Jul 2022 02:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56050 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56050@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Philip McGrath Received: via spool by 56050-submit@debbugs.gnu.org id=B56050.16569021412697 (code B ref 56050); Mon, 04 Jul 2022 02:36:01 +0000 Received: (at 56050) by debbugs.gnu.org; 4 Jul 2022 02:35:41 +0000 Received: from localhost ([127.0.0.1]:45742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8Bw4-0000hR-SA for submit@debbugs.gnu.org; Sun, 03 Jul 2022 22:35:41 -0400 Received: from mail-qt1-f174.google.com ([209.85.160.174]:42685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8Bw2-0000hD-RE for 56050@debbugs.gnu.org; Sun, 03 Jul 2022 22:35:40 -0400 Received: by mail-qt1-f174.google.com with SMTP id g14so8207784qto.9 for <56050@debbugs.gnu.org>; Sun, 03 Jul 2022 19:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tVP1vIaJpH0xQ8gOlJZ42blfbRn3c6snP5eKg1OLMNI=; b=N6hxPtvnmRcvjyqO8Q+YKhCeo8cm3A9lxXRsXITniQNbYv82S7EZ8ed1hvrtGl8lyp G3byeUi5Ex3MS6EebVBb7OKG+Cnk8c2uotYdItPNb8U4KccxdrdMY1IxqR85P7L7ijqC r3QJrEPLt9AkBdTJ6boWz+z86qUDRGWpH45dwD8aJgTA8pj2wfwbTSYLpSZ6fCmMICVE YAaWnQIj3R0JgsHvhltEVv3d+8CXEYz/dhMCkmhcpfhntOa/HmmF9ARyJX7WQrAyUiSg klP1u5lVr6+WUFoppfltiSFH+iZSpmVp8RDImF63wzbSJCHlGZ/fslW52qRqQv679UkW dHxA== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tVP1vIaJpH0xQ8gOlJZ42blfbRn3c6snP5eKg1OLMNI=; b=0rVLoETTbzKk6y9QrciT52+PJlHjXWLx5PaeNvHIsL0rl7O5CrbyP5gVrVhEOsEWC5 +JVQvWziFwvQUUQDVC6B1qbpFbRbsDIXsDBUTQF2X4m6RtQAXsgaHH1IBxPV2XcWegUA +I2MMswRe09LOue9utDGurSil2oGsSq8oHGgzjzcP2FpBA4/1DHaNraLZNCgNa6Uusjd zPzRVUZSuKyIb7O+iE7cipV7EP/MT92fnuPvt/uE8ozKTAqKWSP1kaknqhUw+065BtsX xwxblbSofC2YrBfEWhc32U8roCqbTk+qcagQ+do24Qt07GaLknr2ngPu6qWJLifFGbcp IQzQ== X-Gm-Message-State: AJIora99n6ubgO+iSf8ceBNd3akCQh795vJRL6IAWoA77o+EpdPeNCFe cc8ns9njUsN12jQch1dH79VU6W4boFum/dB061c= X-Google-Smtp-Source: AGRyM1u4JNV7Qo71U9bLvCfubKybOwVcZblLAH1IUSYo3usmv9PhjjOBWzQmDw7U8gEX0q1oyk29Ww== X-Received: by 2002:a05:622a:3d1:b0:31d:2a61:56a2 with SMTP id k17-20020a05622a03d100b0031d2a6156a2mr18666837qtx.222.1656902132669; Sun, 03 Jul 2022 19:35:32 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id g6-20020a05620a40c600b006a6bb044740sm16239375qko.66.2022.07.03.19.35.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Jul 2022 19:35:32 -0700 (PDT) From: Philip McGrath Date: Sun, 3 Jul 2022 22:35:01 -0400 Message-Id: X-Mailer: git-send-email 2.32.0 In-Reply-To: <878rpktobq.fsf_-_@gnu.org> References: <871qvg303w.fsf@gnu.org> <10145966.nUPlyArG6x@avalon> <878rpktobq.fsf_-_@gnu.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi, Here is a v2! I've changed the ‘/etc/profile.d/guix.sh’ generated by ‘etc/guix-install.sh’ to initialize all of the XDG base directory variables---some seem less likely to cause problems, but it should be harmless to make them all explicit---and to check for ‘~/.guix-home/profile’ before ‘~/.guix-profile’ when looking for the default profile. I still haven't done anything here about `XCURSOR_PATH`, but I've looked into the situation more, and there is a Chromium bug [1] that confirms what I previously thought: the default search path [2] can be overridden by configuring libXcursor with `--with-cursorpath=`, and Gentoo, at least, does so [3]. (So far, Gentoo is the only distro I've found that does so.) It seems like the only way to find out the system's default path is, with `XCURSOR_PATH` unset, to `dlopen` libXcursor and call `XcursorLibraryPath`. A further complication is that the default path: ~/.local/share/icons:~/.icons:/usr/share/icons:/usr/share/pixmaps contains both user-specific and system-wide locations, seemingly with no reliable way to interject between them. I think it would not be so bad to ignore this issue, and that's what I propose doing for now: unlike the problems with the XDG variables, which for me produced a black screen instead of a desktop environment, the only symptom of the missing `XCURSOR_PATH` for me was that my cursor disapeared when hovering over the edges of windows, rather than transforming into a bidirectional resize cursor. It might also be reasonable to initialize `XCURSOR_PATH` to "/usr/share/icons:/usr/share/pixmaps". Even Gentoo's default value for `XCURSOR_PATH` seems to include those directories. But I wonder if it really makes sense for `environment-variables->setup-environment-script` from `(gnu home services)` to always set `XCURSOR_PATH`. I, for one, don't have any cursors in `$HOME_ENVIRONMENT/profile/share/icons` (though I do have other kinds of icons in that path). If we just left `XCURSOR_PATH` alone, we could at least limit the problem to people who actually want to manage cursors with `guix home`. In any case, `XCURSOR_PATH` need not block these patches. -Philip [1]: https://bugs.chromium.org/p/chromium/issues/detail?id=1127712 [2]: https://gitlab.freedesktop.org/xorg/lib/libxcursor/-/blob/master/configure.ac#L70 [3]: https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-libs/libXcursor/libXcursor-1.2.1.ebuild?id=b8516dc07a786a1aff6cd493376a7b2810a9a82c Philip McGrath (2): etc/guix-install.sh: Initialize XDG base directories. etc/guix-install.sh: Check for profile from 'guix home'. etc/guix-install.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) base-commit: 4a2f487740fc4a000480226fd25ff2452efa9012