From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ILD5NRxSwmKWbwAAbAwnHQ (envelope-from ) for ; Mon, 04 Jul 2022 04:36:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qIEKNRxSwmLBVQAAG6o9tA (envelope-from ) for ; Mon, 04 Jul 2022 04:36:12 +0200 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 449DF29E47 for ; Mon, 4 Jul 2022 04:36:12 +0200 (CEST) Received: from localhost ([::1]:39658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8BwZ-0007tl-2V for larch@yhetil.org; Sun, 03 Jul 2022 22:36:11 -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 Content-Type: text/plain; charset=UTF-8 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656902172; 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=tVP1vIaJpH0xQ8gOlJZ42blfbRn3c6snP5eKg1OLMNI=; b=ruUCVdzZYbVCGNBHO4kYl9q6NT+ueNYfrU3aGpa9F0KmZl/yKsMZ5lXy0iMbFIkGHiea5H xBt0Pa+PWm1FRwmEtlyIv+KY0o+fLZkY60wZ9RDxQ4aQn84JkhJtLFvLVPURITSJ52mmKo 41mFYS4R6/9ZLT1rjZSm6XRVm3Vx49feIrGjQDZ6YTheFH2Ji1RRicphLi3koYywqO6a31 GsqoDhhSv78lBKggI4rdIwCmx56CXIXWTeJdz9Mw8RbZDZvatBtsZFAOjU3zkTBrTXIuyJ lT8cpfkxAdOoU6HrrghGoRbxLepZFXt8Qq0v21I5upRUGklW2jzJM+EO7UCOoA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656902172; a=rsa-sha256; cv=none; b=d7PvXssKjirkXF6s0jDOsubJR34cOyt+uZGakUT/T8st20YAGdDD/ohrj6D0OM3ZESrt5A EGezBIGjqcyXIj/4Kug9wVGjcCKs1cETFox+EQn7X04YLie3WwNDgoWo/y0MChk8WPlUyR YA1No7efHTL41Ls1Wo9c+/r7t9zq22Y3M5RQp87/An9AIIxNinCqOpsf8EACA5vdjQDOYT hyFzM1x/Cbl4B/E6nnA8zwTg8RKl54fPDPVvNb3PxyokICVTpvuW2K8ex00bBo3rt4sXgd 4N4PI/fy8nc3jphxJIT+JS8x0XMQCvbcpnl5bAi3T6pid2yUH7v+hvqEmvkSeQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=N6hxPtvn; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.75 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=N6hxPtvn; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 449DF29E47 X-Spam-Score: 0.75 X-Migadu-Scanner: scn0.migadu.com X-TUID: o7TEQcicVk8z 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 -- 2.32.0