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

Re: Bash invocation, was Re: 60-serial.rules, broken



On 6/9/23 07:33, Greg Wooledge wrote:
On Fri, Jun 09, 2023 at 11:51:15AM +0100, David Wright wrote:
On Fri 09 Jun 2023 at 06:20:07 (-0400), gene heskett wrote:
Change of subject:

I have a mod I make to the $PATH which I've put in .profile, but I've
failed to find a place to make it autoexec when I login. And I'm tired
of typing ". .profile in every shell tab I open.

Suggestion?

Read INVOCATION in man 1 bash (and check the existence and priorities
of the several startup files). But I feel I'm wasting my breath.

I must have said this a hundred times, but... it depends on HOW you login.

The only times .profile is read are when you have a login shell (from a
pure text console login, or an ssh login, or something like "su - gene"),
or if some other file that IS read dots it in.

If your changes to .profile are not being seen at login time, that means
you aren't using one of the above -- OR, something is overwriting your
change later.

In your previous emails, you've mentioned a Trinity Desktop Environment.
If that's how you login (a graphical Display Manager brought in as part
of TDE), then it's no surprise that .profile is not being read.

See <https://wiki.debian.org/Xsession> assuming your TDE + Display Manager
setup still uses a Debian X session.

If your setup does NOT use a Debian X session, then I would revert to the
traditional configuration -- create a .xsession file, put your changes
in it (which may simply be dotting in .profile, or not, depending on
what's in .profile), and then make sure it executes the startup command
for TDE at the end.  Which means you have to figure out what that startup
command IS.

The tricky parts of the traditional configuration are figuring out how
to invoke your WM or desktop environment, and figuring out whether you
can dot in .profile, or whether you have to duplicate parts of it.  The
key is that .xsession is NOT executed in a terminal environment.  So,
if it tries to write any messages to stdout, you won't see them.  If
it tries to call stty or any other terminal-oriented program, it will
fail.  In a lot of cases, you can simply ignore these failures, but
without knowing what's in your .profile (and all the files it dots in),
it's impossible to give specific advice.

Finally, remember that .xsession is run by /bin/sh, not by your login
shell.  So, if you've got bash syntax in .profile (or anything it dots
in, such as .bashrc), then you cannot safely dot it in from .xsession.

.
Apparently this last is true. I put it as next to last line in /etc/X11/Xsession and killed everything I had running but did let me exec a new xfce4 terminal, which did not get the fix so fixed it back to original but still had to reboot. With my local network thats about 15 times typing my pw's :-\ add 2 more times for every one of the bpi's actually running. Making an .xsession file also failed, didn't do anything.

Thanks Greg.
Take care & stay well.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>


Reply to: