help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting environment variables in Gnome session


From: Timothy Sample
Subject: Re: Setting environment variables in Gnome session
Date: Wed, 28 Aug 2019 21:15:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Hi Jonathan,

Jonathan Frederickson <address@hidden> writes:

> On Wed, Aug 28, 2019 at 8:40 PM, Timothy Sample <address@hidden>
> wrote:
>> If you use GDM and GNOME, and have Bash as your shell, you need to set
>> the variables in “~/.bash_profile” or “~/.bashrc”.  Guix System sets
>> up
>> GDM to run your X session from the your login shell (which I’m
>> assuming
>> is Bash).  Since Guix System provides a “~/.bash_profile” file by
>> default, Bash will read this and skip “~/.profile”.
>>
>> 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’s 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 “~/.bash_profile”, I wrote

    export PROFILE_MESSAGE=HI

Then, I logged out of GNOME and logged back in to GNOME.  After that, I
opened a program – not a terminal :) – from GNOME Shell and confirmed
that it sees that “PROFILE_MESSAGE” is set to “HI”.

Did you log out and in again?


-- Tim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]