unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Tropin <andrew@trop.in>
To: Liliana Marie Prikler <liliana.prikler@ist.tugraz.at>,
	59474@debbugs.gnu.org
Subject: bug#59474: Guix Home generated .profile sets XDG_ vars that break GDM+Gnome login on foreign distros
Date: Tue, 13 Dec 2022 09:22:07 +0400	[thread overview]
Message-ID: <878rjbaneo.fsf@trop.in> (raw)
In-Reply-To: <b67b432bd83c5ca6fb2514d7f1df86c1d3880aa2.camel@ist.tugraz.at>

[-- Attachment #1: Type: text/plain, Size: 3228 bytes --]

On 2022-11-22 08:09, Liliana Marie Prikler wrote:

> Am Montag, dem 21.11.2022 um 22:02 -0800 schrieb Matt Armstrong:
>> The first thing I see is that $HOME/.guix-home/seutp-environment is
>> modifying various XDG_ variables incorrectly.  It prepends new values
>> without honor the variable's default value if it doesn't happen to be
>> set already.
> This is a known problem with Debian.  Unlike Ubuntu, which relies on
> Flatpak and Snaps for its basic operations, Debian doesn't and hence
> hasn't set up these variables explicitly.  Note that this isn't unique
> to Guix Home or even just Guix.
>
>> For example, if XDG_DATA_DIRS is not set its default value is
>> "/usr/local/share/:/usr/share/".
> None of these directories exist in Guix System.  Assuming them would be
> a fault.  Note that the install script you're meant to use already
> initializes these variables since July [1].
>

I understand the inconvinience, but not sure that it has to be fixed on
Guix Home side.  According to the specification it's a fallback value
not a default value.

--8<---------------cut here---------------start------------->8---
If $XDG_DATA_DIRS is either not set or empty, a value equal to
/usr/local/share/:/usr/share/ should be used.
--8<---------------cut here---------------end--------------->8---

XDG_DATA_DIRS is not empty in our case and hence /usr/local/share and
/usr/share doesn't have to be used.  If it's critical for operation it
should be set before ~/.guix-home/setup-environment called, I would say
it looks like a debian bug, not Guix Home.  They same thing is true for
XDG_CONFIG_DIRS.

>> XDG_STATE_HOME is set to a non-standard value.  In the current XDG
>> Base Directory Specification it defaults to "$HOME/.local/state", but
>> Guix Home sets it to "$HOME/.local/var/lib".
> This is a genuine bug with Guix Home.
>
>> XDG_LOG_HOME is a non-standard variable.  The spec suggests that logs
>> should go in XDG_STATE_HOME.  Why not a establish a GUIX_LOG_HOME
>> variable instead?  (if it ever does become a standard XDG variable,
>> its default may not be the same one picked by Guix Home, causing the
>> same issue as above).
> Another genuine bug with Guix Home, although the variable does predate
> our support for XDG_STATE_HOME.  I suggest finding all uses of this
> variable in Guix Home and replacing them accordingly.
>

XDG_STATE_HOME and XDG_LOG_HOME apppeared in Guix Home before they were
described in xdg base directory specification, so the values was picked
to mimic FHS.  Probably they should be adjusted to the values defined in
specification.

>> Setting XDG_RUNTIME_DIR is not something I would expect Guix Home to
>> do -- it is the job of whatever logs the user in.
> I'm unsure about that one.
>

If it's set by elogind or whatever - cool, we will use value provided,
if not we explicitly set it, looks ok to me.

>> XDG_CACHE_HOME, XDG_CONFIG_HOME, XDG_DATA_HOME are set to their
>> defaults unnecessarily.
> Explicit is better than implicit.
>
> Cheers
>
>
> [1]
> http://git.savannah.gnu.org/cgit/guix.git/commit/?id=23aafc800c9e678662766440916449ec5bbce830
>
>
>
>

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2022-12-13  5:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22  6:02 bug#59474: Guix Home generated .profile sets XDG_ vars that break GDM+Gnome login on foreign distros Matt Armstrong
2022-11-22  7:09 ` Liliana Marie Prikler
2022-12-13  5:22   ` Andrew Tropin [this message]
2023-05-02  2:55 ` 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=878rjbaneo.fsf@trop.in \
    --to=andrew@trop.in \
    --cc=59474@debbugs.gnu.org \
    --cc=liliana.prikler@ist.tugraz.at \
    /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).