Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #286636
| From | Brieuc Desoutter <brieuc.desoutter@gmail.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: Sourcing of .profile |
| Date | 2026-05-14 12:10 +0200 |
| Message-ID | <MUBaV-53jH-11@gated-at.bofh.it> (permalink) |
| References | <MUwuB-50im-3@gated-at.bofh.it> <MUA5b-52oe-5@gated-at.bofh.it> <MUAHT-52Sc-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Solved! So bash -lv was a good tip: it showed my file was sourced but I guarded some PATH updates within if: if [[ -d "$HOME/bin" ]] ; then PATH="$HOME/bin:$PATH" fi I do not know which program, bash or sh, or even if they are equivalent, but replace [[ by [ does the trick... Thanks everyone for your help. B On Thu, May 14, 2026 at 11:32 AM <tomas@tuxteam.de> wrote: > 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 >
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar
Sourcing of .profile Brieuc Desoutter <brieuc.desoutter@gmail.com> - 2026-05-14 07:10 +0200
Re: Sourcing of .profile <tomas@tuxteam.de> - 2026-05-14 07:40 +0200
Re: Sourcing of .profile Brieuc Desoutter <brieuc.desoutter@gmail.com> - 2026-05-14 08:40 +0200
Re: Sourcing of .profile Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> - 2026-05-14 09:50 +0200
Re: Sourcing of .profile <tomas@tuxteam.de> - 2026-05-14 09:50 +0200
Re: Sourcing of .profile tomas@tuxteam.de - 2026-05-14 09:50 +0200
Re: Sourcing of .profile Chris Green <cl@isbd.net> - 2026-05-14 10:50 +0200
Re: Sourcing of .profile Nicolas George <george@nsup.org> - 2026-05-14 11:00 +0200
Re: Sourcing of .profile <tomas@tuxteam.de> - 2026-05-14 11:40 +0200
Re: Sourcing of .profile Brieuc Desoutter <brieuc.desoutter@gmail.com> - 2026-05-14 12:10 +0200
Re: Sourcing of .profile tomas@tuxteam.de - 2026-05-14 12:30 +0200
Re: Sourcing of .profile Greg Wooledge <greg@wooledge.org> - 2026-05-14 13:30 +0200
csiph-web