Re: gnome 49 doesn't source /etc/profile - what did I miss?

"Richard Henschel" ([email protected] via blfs-support Mailing List) <[email protected]> Tue, 16 Dec 2025 13:50:49 -0600
Newsgroups gmane.linux.lfs.beyond.support
Message-ID <[email protected]>
On 12/14/25 8:14 PM, Bruce Dubbs ([email protected] via 
blfs-support Mailing List) wrote:

> On 12/14/25 7:51 PM, "Richard" ([email protected] via 
> blfs-support Mailing List) wrote:
>> I updated gnome to the version 49 as in the development systemd 
>> book.  Seemed
>> like a good idea since glib and webkit needed replacement anyway.  It 
>> works
>> fine, except environment looks like /etc/profile isn't sourced.
>> For example, in a gnome terminal 
>> PATH=/usr/local/sbin:/usr/local/bin:/usr/
>> sbin:/usr/bin
>>
>> Any idea of what I missed?  i.e. any changes to the /etc/ files?
>>
>> Thanks very much in advance.
>
> You are probably starting via a display manager.  In my experience, 
> display managers do not source ~/.bash_profile or ~/.profile.  If 
> starting a virtual terminal such as gnome-terminal, it starts bash, 
> but not as a login shell.  Thus it sources ~/.bashrc only.
>
> Personally, I do not use a display manager.  I watch the output of the 
> boot process and then login.  That runs ~/.bash_profile.  I then start 
> a graphical session via 'startx'  and the environment then "does the 
> right thing".
>
> The only thing I might suggest is to do something like:
>
> ~/.bash_profile
>   export DOT_PROFILE=1
>
> !/.bashrc
>   if [ x$DOT_PROFILE != x1]; then source ~/.bash_profile; fi
>
> (not tested)
>
> Note that some display managers might run ~/.profile but not 
> ~/.bash_profile.
> In that case, create a symlink between them.
>
>   -- Bruce
>
I found a better way, once you let me know it was a gnome thing and not 
a screw-up on my part.  You can put all environment variables in 
/etc/environment and pam_env will load it all on login via gdm.  It will 
not do all the 'interesting stuff' to include newly added packages  like 
the BLFS scripts will, but it works.  It does not cause problems so far 
as I can see when you use ssh.   It will also work on system V if it is 
set up to use PAM.

Yours truly,

Richard the Mediocre    (Well, I am certainly not Alexander the Great)

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-support
Unsubscribe: See the above information page