help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: some profile bashrc urxvt issue..


From: Greg Wooledge
Subject: Re: some profile bashrc urxvt issue..
Date: Mon, 26 Jul 2021 14:53:56 -0400

On Mon, Jul 26, 2021 at 08:42:35PM +0200, Alex fxmbsw7 Ratchev wrote:
> as far i understood, in /etc, .profile gets 1. sourced as login shell
> then if its again spawned its 2. the bash.bashrc

You're not hearing me.

If you login with lightdm on a regular installation of Debian 10 (for
example), bash is NEVER RUN AT ALL.  No bash.  The number of bashes
is zero.

Lightdm spawns an X session, which on Debian is a /bin/sh shell script
that dots in various files under /etc/X11/.  One of the files that it
dots in eventually launches your window manager or your session manager,
which creates the GUI you chose.

There is no bash.  (Because /bin/sh on Debian 10 is dash.)

You don't get bash until you open a terminal, which runs bash as an
interactive non-login shell.  This shell reads ~/.bashrc and any
operating system specific hacks such as /etc/bashrc or /etc/bash.bashrc
which differ from one Linux distribution to the next.

/etc/profile is NEVER READ BY ANYTHING for this type of login.

> so do you say
> those bashes in those xterms, they never did read the /etc's ?

They never read /etc/profile because they are not login shells.

They may have read OTHER files in /etc.  For example, /etc/bash.bashrc
which is what Debian's version of bash uses.

This is why I keep saying that you need to consult your operating
system's support list for details on these things.  There is NO
universal answer.  Every operating system does these things differently.
Debian does it differently from Arch Linux, which does it differently
from Red Hat Linux, all of which do it differently from FreeBSD, ....



reply via email to

[Prev in Thread] Current Thread [Next in Thread]