[Top][All Lists]

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

Re: ~/.profile and ~/.bash_profile aren't executed on login

From: Greg Wooledge
Subject: Re: ~/.profile and ~/.bash_profile aren't executed on login
Date: Mon, 11 Dec 2017 14:58:59 -0500
User-agent: NeoMutt/20170113 (1.7.2)

On Mon, Dec 11, 2017 at 01:57:52PM -0500, Chet Ramey wrote:
> On 12/11/17 1:30 PM, Yuri wrote:
> > /usr/local/bin/bash is set as user's login shell in 'vipw'. So when this
> > user logs in, it must be invoked as a login shell. Is this correct?
> Nobody on the list can answer that question. It depends on whether or
> not the agent you're using that starts the shell running in a terminal
> emulator -- assuming that's the shell instance you're concerned with --
> starts it as a login shell.

There are actually two issues going on here:

1) The actual login, which Yuri stated is being done through a Display

2) The invocation of an interactive shell, within a terminal emulator.

If the goal is to configure the environment of the window manager and
its child applications, then one must configure the login environment
as set up by the Display Manager and then the desktop env or WM that
it calls upon (and then possibly other layers like dbus and/or the
systemd user session, especially if GNOME is involved).

If the goal is ONLY to configure the environment that appears within
an interactive shell, then you can short circuit the DM/DE/WM
configuration steps and simply tell the terminal emulator to run
login shells instead of regular shells.

(Unless GNOME is involved, because GNOME is a special snowflake.)

TL;DR: Ask your OS channel support people how to do whatever it is you
want to do.  Make sure you STATE what you want to do, because they
can't be expected to guess.  Be specific.  Not "I want to set PATH"
but "I want to set PATH to include ~/bin first because when I run
my Eclipse IDE from the KDE Menu, it can't find ...".  Specific.

reply via email to

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