unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip McGrath <philip@philipmcgrath.com>
To: 56050@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>,
	"Philip McGrath" <philip@philipmcgrath.com>
Subject: [bug#56050] [PATCH v2 0/2] etc/guix-install.sh: Initialize XDG base directories.
Date: Sun,  3 Jul 2022 22:35:01 -0400	[thread overview]
Message-ID: <cover.1656899134.git.philip@philipmcgrath.com> (raw)
In-Reply-To: <878rpktobq.fsf_-_@gnu.org>

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





  reply	other threads:[~2022-07-04  2:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-18  5:25 [bug#56050] [PATCH] home: services: environment-variables: Fix XDG base directories Philip McGrath
2022-06-22 20:38 ` Ludovic Courtès
2022-06-23 21:33   ` Philip McGrath
2022-06-25 21:39     ` Ludovic Courtès
2022-07-04  2:35       ` Philip McGrath [this message]
2022-07-04  2:35         ` [bug#56050] [PATCH v2 1/2] etc/guix-install.sh: Initialize " Philip McGrath
2022-07-04  9:11           ` Ludovic Courtès
2022-07-04 16:36             ` Philip McGrath
2022-07-04 21:01               ` Ludovic Courtès
2022-07-04 20:18           ` [bug#56050] [PATCH] home: services: environment-variables: Fix " Ludovic Courtès
2022-07-04  2:35         ` [bug#56050] [PATCH v2 2/2] etc/guix-install.sh: Check for profile from 'guix home' Philip McGrath
2022-07-04  9:13           ` Ludovic Courtès
2022-07-12  6:44           ` Andrew Tropin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1656899134.git.philip@philipmcgrath.com \
    --to=philip@philipmcgrath.com \
    --cc=56050@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).