From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: Re: Setting environment variables in Gnome session Date: Wed, 28 Aug 2019 21:15:58 -0400 Message-ID: <871rx44vqp.fsf@ngyro.com> References: <20190828155348.5dbe862c@terracrypt.net> <1567039835.10983.0@terracrypt.net> 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]:45612) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i392h-0001iP-W9 for help-guix@gnu.org; Wed, 28 Aug 2019 21:16:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i392g-0001FZ-UE for help-guix@gnu.org; Wed, 28 Aug 2019 21:16:03 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:36339) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i392f-0001EY-NG for help-guix@gnu.org; Wed, 28 Aug 2019 21:16:02 -0400 In-Reply-To: <1567039835.10983.0@terracrypt.net> (Jonathan Frederickson's message of "Wed, 28 Aug 2019 20:50:35 -0400") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Jonathan Frederickson Cc: help-guix@gnu.org Hi Jonathan, Jonathan Frederickson writes: > On Wed, Aug 28, 2019 at 8:40 PM, Timothy Sample > wrote: >> If you use GDM and GNOME, and have Bash as your shell, you need to set >> the variables in =E2=80=9C~/.bash_profile=E2=80=9D or =E2=80=9C~/.bashrc= =E2=80=9D. Guix System sets >> up >> GDM to run your X session from the your login shell (which I=E2=80=99m >> assuming >> is Bash). Since Guix System provides a =E2=80=9C~/.bash_profile=E2=80= =9D file by >> default, Bash will read this and skip =E2=80=9C~/.profile=E2=80=9D. >> >> So if you set the variables in a Bash-specific file it should work. >> >> >> -- Tim > > Thanks, but the environment variable I'm looking to set needs to apply > to Gnome itself rather than my terminal shell. It's the search path > that Gnome uses to find XDG application files. I believe > ~/.bash_profile is only read by bash specifically? Yes. Because Bash is your login shell, it gets invoked as part of spawning your X session. Because of this, Bash-specific configuration files affect your X session=E2=80=99s environment. > (I've just tried adding the relevant env var to ~/.bash_profile in any > case, but it doesn't seem to have affected gnome-shell's environment.) In my =E2=80=9C~/.bash_profile=E2=80=9D, I wrote export PROFILE_MESSAGE=3DHI Then, I logged out of GNOME and logged back in to GNOME. After that, I opened a program =E2=80=93 not a terminal :) =E2=80=93 from GNOME Shell and= confirmed that it sees that =E2=80=9CPROFILE_MESSAGE=E2=80=9D is set to =E2=80=9CHI= =E2=80=9D. Did you log out and in again? -- Tim