From mboxrd@z Thu Jan 1 00:00:00 1970 From: iyzsong@member.fsf.org (=?utf-8?B?5a6L5paH5q2m?=) Subject: Re: Environment variables on GNOME on foreign distro (Debian) Date: Mon, 24 Feb 2020 12:49:32 +0800 Message-ID: <87o8toio83.fsf@member.fsf.org> References: <87tv3hkndr.fsf@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35871) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j65gk-0006G3-5N for help-guix@gnu.org; Sun, 23 Feb 2020 23:49:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j65gi-0000CO-8p for help-guix@gnu.org; Sun, 23 Feb 2020 23:49:50 -0500 Received: from rezeros.cc ([2001:19f0:7001:2f3e:5400:ff:fe84:e55d]:45168) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j65gi-0000AI-1M for help-guix@gnu.org; Sun, 23 Feb 2020 23:49:48 -0500 In-Reply-To: <87tv3hkndr.fsf@disroot.org> (Jorge's message of "Sun, 23 Feb 2020 18:24:48 -0300") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: Jorge Cc: help-guix@gnu.org Jorge writes: > Hi. On a previous thread [1] I asked about best practices for Guix > environment variables on foreign distro. My problem was not > fundamentally solved, and it resurfaced again recently. Hello, I'd say it's not a solved problem in general. > In summary: > > I use Guix on an updated Debian buster (with 59 packages from > buster-backports) to get some up-to-date packages atop Debian stable. > Currently I set Guix environment variables on ~/.profile, but recently I > started getting error messages from Evince (my Evince is from Debian's > APT). In fact, in /var/log/user.log I get: > > Feb 23 17:04:19 jorge--inspiron-5570 org.gnome.Evince.desktop[1788]: /hom= e/jorge/.guix-profile/lib/gio/modules/libdconfsettings.so: cannot open shar= ed object file: Permission denied > Feb 23 17:04:19 jorge--inspiron-5570 org.gnome.Evince.desktop[1788]: Fail= ed to load module: /home/jorge/.guix-profile/lib/gio/modules/libdconfsettin= gs.so > Feb 23 17:04:19 jorge--inspiron-5570 evince[5252]: Using the 'memory' GSe= ttings backend. Your settings will not be saved or shared with other appli= cations. > > The problem seems to be that Debian's Evince is seeing the > `GIO_EXTRA_MODULES' environment variable from Guix. In fact: > > $ sudo tr \0 \n < "/proc/$(pgrep evince)/environ" | grep GIO_EXTRA_MO= DULES > GIO_EXTRA_MODULES=3D/home/jorge/.guix-profile/lib/gio/modules Yes, the host evince (and any GNOME apps, in fact) is not compatible with gio modules from guix, as they may have different glib versions and ABI. > > Side note: `sudo` was unnecessary in that command. > > Ludovic Court=C3=A8s on 12 Mar 2018 had suggested me to to source > ~/.guix-profile/etc/profile from ~/.bash_profile (or similar). > However, that does not work, at least for me. If I source Guix's > etc/profile from ~/.bash_profile, the icons of my graphical Guix > applications fail to appear in my GNOME docker, because XDG_DATA_DIRS > was not set by Guix. Well, ~/.profile and ~/.bash_profile should both works for bash, but your login manager may not source ~/.bash_profile. > In fact, if I open gnome-terminal and issue > `env | grep -i guix`, I see no Guix environment variables. In fact, > that happens even inside Guix-installed emacs-next. For ~/.profile (or ~/.bash_profile) to be loaded, gnome-terminal need to launch a login shell (by default it's not). > > So what should I do? I guess you can: figure out what environment variables from guix are needed, what are not. (eg: filter out GIO_EXTRA_MOUDLES) figure out how the login manager got environment variables, and set them. make sure XDG_DATA_DIRS from guix is added here, so that applications can be found by the gnome launcher. (eg: only from ~/.profile, or other?) for guix only environment variables, find a way to launch them. (eg: when launch a guix gnome application that requires GIO_EXTRA_MODUL= ES) Hope it helps!