Michael Kjörling <c9bc136c6...@ewoof.net> wrote:
> On 26 Oct 2024 10:13 +0100, from c...@isbd.net (Chris Green):
> > I have installed Debian 12 on my Lenovo Thinkpad T470.  It all went
> > pretty smoothly but for some reason when I do a GUI login my .profile
> > doesn't get run.
> 
> Is starting a GUI session (whether X11/Xorg or Wayland) even
> _supposed_ to execute ~/.profile (or ~/.bash_profile)? My
> understanding is that it is not.
> 
Well on my previous XFCE installation on xubuntu it certainly did run
~/.profile.


> As I understand it, those are meant to be run by a _login shell_. This
> sets them apart from e.g. ~/.bashrc which is read each time _bash_ is
> started.
> 
Yes, and entering one's name and password at GUI start-up **is**
logging in.


> And similarly for the corresponding system-wide files in /etc, of
> course.
> 
> **What problem are you _actually_ trying to solve?** Presumably
> executing ~/.profile on GUI session startup isn't your end goal in
> itself, but merely an attempt at a way to accomplish something else.
> If you tell us what your end goal is, we might be able to suggest a
> better way to accomplish that.
> 
Setting things like PATH, it needs to be in .profile rather than
.bashrc because otherwise things get added to PATH repeatedly.

-- 
Chris Green
·

Reply via email to