all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Report on environment variable issues
@ 2019-09-03 19:25 Tirifto
  2019-09-04  2:30 ` Mikhail Kryshen
  2019-09-06  1:32 ` Maxim Cournoyer
  0 siblings, 2 replies; 3+ messages in thread
From: Tirifto @ 2019-09-03 19:25 UTC (permalink / raw)
  To: help-guix

Hello!

I am running Guix on Parabola GNU+Linux-libre (a libre derivative of
Arch Linux), and have had issues with environment variables in two
instances. I'm not asking for help, but I'm not sure if this is
appropriate for the bug list, either, so here we go.

Firstly, when running GNOME Shell (native on Parabola), I tried
integrating it with Guix, so that applications installed with Guix
would be visible to GNOME Shell. I tried doing this by extending the
environment variable ‘$XDG_DATA_DIRS’, which is empty by default,
but that made GNOME Shell crash on login.

After some investigation, it turned out that GNOME Shell falls back on
a certain default value when the variable is empty, which already
contains paths that GNOME Shell needs to function properly. So when the
user extends the existing value of ‘$XDG_DATA_DIRS’ with another path,
the variable is no longer empty, so GNOME Shell never gets to fall back
to the paths it actually needs, and crashes instead.

The solution was to manually add the paths to the extension/definition.
I used ‘/usr/local/share:/usr/share’; not sure if that's all there was
to it, but GNOME Shell could work with it. See also this Parabola bug:

https://labs.parabola.nu/issues/2388

Secondly, I find that the program ‘youtube-dl’ (native on Parabola)
doesn't work properly when I define environment variables for SSL
Certificates as advised by the Guix manual, like so:

  export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
  export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certif\
  icates.crt"

youtube-dl then complains about being unable to get local issuer
certificates. On the other hand, when the variables are undefined, Guix
complains about certificates, for a change (e.g. when running ‘guix
weather’).

My current solution is to comment the variables out in my ~/.profile,
and only export them in the terminal when I'm about to use Guix.

I don't know if these are reliably reproducible, and whether they
should be fixed somewhere, or just better documented, but I hope the
info can help!

Best wishes
// Tirifto

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Report on environment variable issues
  2019-09-03 19:25 Report on environment variable issues Tirifto
@ 2019-09-04  2:30 ` Mikhail Kryshen
  2019-09-06  1:32 ` Maxim Cournoyer
  1 sibling, 0 replies; 3+ messages in thread
From: Mikhail Kryshen @ 2019-09-04  2:30 UTC (permalink / raw)
  To: Tirifto, help-guix

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

Tirifto <tirifto@posteo.cz> writes:

> After some investigation, it turned out that GNOME Shell falls back on
> a certain default value when the variable is empty, which already
> contains paths that GNOME Shell needs to function properly. So when the
> user extends the existing value of ‘$XDG_DATA_DIRS’ with another path,
> the variable is no longer empty, so GNOME Shell never gets to fall back
> to the paths it actually needs, and crashes instead.

GNOME does this in accordance with XDG Base Directory Specification, see
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

  "If $XDG_DATA_DIRS is either not set or empty, a value equal to
  /usr/local/share/:/usr/share/ should be used."

-- 
Mikhail

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Report on environment variable issues
  2019-09-03 19:25 Report on environment variable issues Tirifto
  2019-09-04  2:30 ` Mikhail Kryshen
@ 2019-09-06  1:32 ` Maxim Cournoyer
  1 sibling, 0 replies; 3+ messages in thread
From: Maxim Cournoyer @ 2019-09-06  1:32 UTC (permalink / raw)
  To: Tirifto; +Cc: help-guix

Hello Tirifto,

Tirifto <tirifto@posteo.cz> writes:

> Hello!
>
> I am running Guix on Parabola GNU+Linux-libre (a libre derivative of
> Arch Linux), and have had issues with environment variables in two
> instances. I'm not asking for help, but I'm not sure if this is
> appropriate for the bug list, either, so here we go.
>
> Firstly, when running GNOME Shell (native on Parabola), I tried
> integrating it with Guix, so that applications installed with Guix
> would be visible to GNOME Shell. I tried doing this by extending the
> environment variable ‘$XDG_DATA_DIRS’, which is empty by default,
> but that made GNOME Shell crash on login.

In my experience, attempting to have both Guix programs and native
programs share components or even environment variables is fraught with
danger.  I would suggest trying to use as much as Guix as possible on
your Parabola system to avoid problems.  In other words, try to run the
Gnome Shell binary from Guix, and install youtube-dl from Guix.

Maxim

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-06  1:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-03 19:25 Report on environment variable issues Tirifto
2019-09-04  2:30 ` Mikhail Kryshen
2019-09-06  1:32 ` Maxim Cournoyer

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.