Help answer threads with 0 replies.
Go Back > Forums > > Member Intro
User Name
Password Member Intro New to Been a long time member but never made a post? Introduce yourself here.


Closed Thread
  Search this Thread
Old 01-13-2018, 03:49 AM   #1
LQ Newbie
Registered: Jan 2018
Posts: 1

Rep: Reputation: Disabled
How Are Environment Variables Defined In A Gnome Terminal Session?

Hello... and thanks in advance for any help anyone can offer me with my question! I'm hoping someone will have a little patience with me and walk me through this!

I'm trying to understand a user login process on Centos 7 and I've gotten a bit confused trying to figure out when/how a Gnome terminal session defines environment variables (Gnome 3.14.4).

As near as I can tell.... a Gnome terminal will only define environment variables from the /etc/profile, ~/.profile, or ~/.bash_profile if the variables were exported in those scripts.

If they aren't exported then they don't appear in the output of either the set or printenv commands. The /etc/environment file is the exception (but it's not a shell login script).

The only thing I've found that looks like it would do this is the /etc/X11/xinit/xinitrc-common file when it sources the ~/.profile login script... But that's just a single login script and doesn't explain why exported.
If this reads the variables in the ~/.profile script... How are the variables being read for /etc/profile & ~/.bash_profile? If it matters.... I haven't selected "run command as login script"
Old 01-13-2018, 04:13 AM   #2
Senior Member
Registered: Mar 2009
Location: Somewhere on earth? Maybe I'm a figment of your imagination?
Distribution: A number of them over the years...
Posts: 1,283

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
This post looks very, very similar to this:

Post reported.
Old 01-13-2018, 09:47 AM   #3
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,650

Rep: Reputation: 210Reputation: 210Reputation: 210
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How are environment variables defined in a Gnome terminal session? bodisha Linux - Newbie 6 12-22-2017 03:45 AM
xfce4-terminal resets environment variables a4z Linux - Desktop 2 11-09-2015 01:56 AM
Set environment variables that don't need terminal thebombzen Linux - Software 2 06-12-2011 01:55 PM
Set system-wide environment variables that hold when NOT using terminal thebombzen Fedora 6 06-02-2011 10:12 AM
Changing environment variable for gnome session from gnome-terminal pymehta Linux - Software 1 10-11-2005 05:19 PM > Forums > > Member Intro

All times are GMT -5. The time now is 09:13 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration