On Thu, May 14, 2026 at 10:51:53AM +0200, Nicolas George wrote:
> Brieuc Desoutter (HE12026-05-14):
> > TL/DR: On Trixie with Gnome, right after login with…
> > - default .profile -> ~/bin and ~/.local/bin in PATH
> > - .profile as a symlink to the default .profile located in different
> > directory -> no ~/bin or ~/.local/bin in PATH
> > 
> > Why?
> 
> If you are logging with Gnome, then no login shell gets invoked, and
> therefore .profile is not supposed to be sourced. If it is, that means
> something in the chain sources it explicitly, and it is entirely
> possible it does something like this:
> 
> if [ -f "$HOME/.profile" ] ; then
>   . "$HOME/.profile"
> fi
> 
> A -f instead of -e would exclude symlinks.

Yep, that would be one of the candidates. That's why I'm insisting Brieuc
tries things like "bash -l" and reports the results.

Actually "shopt login_shell" will tell you (with bash at least) whether
your current shell thinks it is a login shell.

> My two pieces of advice:
> 
> 1. Be the master of your login process: start with a .xsession file that
> does exactly what you want it to do before it starts a desktop.

That's what I usually do for shells running beneath X.

> 2. Use zsh instead of bash [...]

This is not really helpful: I know zsh can do many tricks bash can't, and
there are reasons for it (and against, mind you), but this doesn't address
OP's problem.

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to