unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Timothy Sample <samplet@ngyro.com>
To: Jonathan Frederickson <jonathan@terracrypt.net>
Cc: help-guix@gnu.org
Subject: Re: Setting environment variables in Gnome session
Date: Wed, 28 Aug 2019 21:15:58 -0400	[thread overview]
Message-ID: <871rx44vqp.fsf@ngyro.com> (raw)
In-Reply-To: <1567039835.10983.0@terracrypt.net> (Jonathan Frederickson's message of "Wed, 28 Aug 2019 20:50:35 -0400")

Hi Jonathan,

Jonathan Frederickson <jonathan@terracrypt.net> writes:

> On Wed, Aug 28, 2019 at 8:40 PM, Timothy Sample <samplet@ngyro.com>
> 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	other threads:[~2019-08-29  1:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 19:53 Setting environment variables in Gnome session Jonathan Frederickson
2019-08-28 20:58 ` Jonathan Frederickson
2019-08-29  0:40 ` Timothy Sample
2019-08-29  0:50   ` Jonathan Frederickson
2019-08-29  1:15     ` Timothy Sample [this message]
2019-08-29  4:06       ` Jonathan Frederickson
2019-08-29  3:03     ` Jesse Gibbons

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=871rx44vqp.fsf@ngyro.com \
    --to=samplet@ngyro.com \
    --cc=help-guix@gnu.org \
    --cc=jonathan@terracrypt.net \
    /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.
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).