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

2023-06-10 Thread gene heskett

On 6/9/23 16:01, David Wright wrote:

On Fri 09 Jun 2023 at 09:41:23 (-0400), gene heskett wrote:

On 6/9/23 06:51, David Wright wrote:

On Fri 09 Jun 2023 at 06:20:07 (-0400), gene heskett wrote:

On 6/9/23 00:46, to...@tuxteam.de wrote:

On Thu, Jun 08, 2023 at 09:08:59PM -0400, gene heskett wrote:

[...]


Perhaps I've ben mistaken, but the files in /etc/udev/rules.d are not the
same as /lib/udev/rules.d, so which one actually rules?


The one in /etc, as David said. Unless it doesn't exist.

This is actually the classical pattern of "layered configuration", which
is widespread in the UNIX world. You see that often with a system config
which can be overridden by a user config.

Sometimes you have even three layers: distro (e.g. lib), local (etc) and
user.


Thanks for the clarification Tomas. That would intimate the search
order would be /home/$usr/someplace, /etc/someplace, /lib/someplace.
Is that correct?


Not only did I give the priority for the task you're tackling
(which BTW would not concern an individual user's directory tree),
I also gave you the reference: man udev.

What is your problem??


man udev is as opaque as you can make what looks like plain English.


I find it hard to believe that the exams you're always talking about
having passed are any easier than understanding:


The last of those tests, was in 1972, 51 years ago.  I finally did get a 
GED about 25 years ago. My now departed 3rd wife had a degree in music, 
and said it was embarrassing to tell her friends her hubby only had an 
8th grade education. Now I'm 88 and fading which I'll also admit to.


But I'll readily admit its been one hell of a ride to get this far. ;o)>

Pure serendipity has put me in places and times that made history, so I 
also have all these "war stories" I occasionally bore folks with.


  "All rules files are collectively sorted and processed in lexical
   order, regardless of the directories in which they live. However,
   files with identical filenames replace each other.
   Files in /etc/ have the highest priority, files in /run/
   take precedence over files with the same name under /usr/.
   This can be used to override a system-supplied rules file
   with a local file if needed"

But paraphrasing myself, not only did I give you the reference,
I also gave you the priority for the task you're tackling:
  "Files under /etc/ take priority over those under /usr/lib/
   when their filenames are the same."


Yup, you did all of that, thank you David.

Take care & stay well.

Cheers,
David.

.


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 



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

2023-06-10 Thread gene heskett

On 6/10/23 15:27, Cousin Stanley wrote:



Cousin Stanley wrote 

 >> 
 >> $ source .xsessionrc
 >> 


On 2023-06-10 10:10, gene heskett wrote:

 > A neat trick, thanks.

   You're welcome.


 > I've reached that age where I can't remember what,
 > if anything I had for breakfast most mornings.

   I'm on the way 

     Birthday next month will turn 77.


I'll be 89 in October.


   My mother designated age-related memory lapses
   as CRS 

  Can't Remember Squat


She was being nice. My version is CRE.


  I have occasional memory lapses as well.


I think it will happen to all of us, eventually.

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 



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

2023-06-10 Thread Cousin Stanley




Cousin Stanley wrote 

>> 
>> $ source .xsessionrc
>> 


On 2023-06-10 10:10, gene heskett wrote:

> A neat trick, thanks.

  You're welcome.


> I've reached that age where I can't remember what,
> if anything I had for breakfast most mornings.

  I'm on the way 

Birthday next month will turn 77.

  My mother designated age-related memory lapses
  as CRS 

 Can't Remember Squat

 I have occasional memory lapses as well.


--
Stanley C. Kitching
Human Being
Phoenix, Arizona



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

2023-06-10 Thread gene heskett

On 6/9/23 19:36, Cousin Stanley wrote:


On 2023-06-09 13:00, gene heskett wrote:

 >> Did you log out and back in, or did you simply start
 >> a new XFCE4 terminal within an existing session?
 >>
 >> The .xsessionrc file is only read
 >> during X session startup, not when running
 >> various applications like terminal emulators.
 >>
 >>
 >>> (Yes, I know, it's a PAIN to log out and back in,
 >>> at least for me, and> it sounded like for you too...
 >>> but it's required for this test to be meaningful.
 >>>
 >>> logging out and back in may as well be a reboot.

   I sometimes update the  .xsessionrc  file
   for various reasons and then source it
   to activate the changes without logging out
   or restarting 

     sk@jhp1  03:52 PM  ~
     $ echo "export SKUNK='pee euuu' " >> .xsessionrc

     sk@jhp1  03:53 PM  ~
     $ echo $SKUNK

     sk@jhp1  03:53 PM  ~
     $ source .xsessionrc

     sk@jhp1  03:53 PM  ~
     $ echo $SKUNK
     pee euuu



A neat trick, thanks. if I can remember it. I've reached that age where 
I can't remember what, if anything I had for breakfast most mornings.

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 



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

2023-06-10 Thread Cousin Stanley




>> Cousin Stanley wrote 
>>

   I sometimes update the  .xsessionrc  file
   for various reasons and then source it
   to activate the changes without logging out
   or restarting 



On 2023-06-10 00:20, David Wright wrote:

> Two problems here:
>
> Other sessions are unaware of the change made in one ;

  After updating the  .xsessionrc  file in one session
  what I usually do is also source it from another 

$ source ~/.xsessionrc

  However, my naive view of another session here
  entails a different tab opened in qterminal
  running under lxqt 

> and the point of this thread is to find a location
> where Gene's.profile" file is run regardless
> of how he logs in.
>
> This doesn't test that.

  I understand but only wanted to suggest
  that a logout was not necessarily required
  to reflect any changes in the  .xsessionrc  file


--
Stanley C. Kitching
Human Being
Phoenix, Arizona



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

2023-06-10 Thread David Wright
On Fri 09 Jun 2023 at 16:17:50 (-0700), Cousin Stanley wrote:
> On 2023-06-09 13:00, gene heskett wrote:
> 
> >> Did you log out and back in, or did you simply start
> >> a new XFCE4 terminal within an existing session?
> >>
> >> The .xsessionrc file is only read
> >> during X session startup, not when running
> >> various applications like terminal emulators.
> >>
> >>
> >>> (Yes, I know, it's a PAIN to log out and back in,
> >>> at least for me, and> it sounded like for you too...
> >>> but it's required for this test to be meaningful.
> >>>
> >>> logging out and back in may as well be a reboot.
> 
>   I sometimes update the  .xsessionrc  file
>   for various reasons and then source it
>   to activate the changes without logging out
>   or restarting 
> 
> sk@jhp1  03:52 PM  ~
> $ echo "export SKUNK='pee euuu' " >> .xsessionrc
> 
> sk@jhp1  03:53 PM  ~
> $ echo $SKUNK
> 
> sk@jhp1  03:53 PM  ~
> $ source .xsessionrc
> 
> sk@jhp1  03:53 PM  ~
> $ echo $SKUNK
> pee euuu

Two problems here:

Other sessions are unaware of the change made in one; and
the point of this thread is to find a location where Gene's
".profile" file is run regardless of how he logs in. This
doesn't test that.

Cheers,
David.



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

2023-06-09 Thread Cousin Stanley



On 2023-06-09 13:00, gene heskett wrote:

>> Did you log out and back in, or did you simply start
>> a new XFCE4 terminal within an existing session?
>>
>> The .xsessionrc file is only read
>> during X session startup, not when running
>> various applications like terminal emulators.
>>
>>
>>> (Yes, I know, it's a PAIN to log out and back in,
>>> at least for me, and> it sounded like for you too...
>>> but it's required for this test to be meaningful.
>>>
>>> logging out and back in may as well be a reboot.

  I sometimes update the  .xsessionrc  file
  for various reasons and then source it
  to activate the changes without logging out
  or restarting 

sk@jhp1  03:52 PM  ~
$ echo "export SKUNK='pee euuu' " >> .xsessionrc

sk@jhp1  03:53 PM  ~
$ echo $SKUNK

sk@jhp1  03:53 PM  ~
$ source .xsessionrc

sk@jhp1  03:53 PM  ~
$ echo $SKUNK
pee euuu



--
Stanley C. Kitching
Human Being
Phoenix, Arizona



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

2023-06-09 Thread David Wright
On Fri 09 Jun 2023 at 09:41:23 (-0400), gene heskett wrote:
> On 6/9/23 06:51, David Wright wrote:
> > On Fri 09 Jun 2023 at 06:20:07 (-0400), gene heskett wrote:
> > > On 6/9/23 00:46, to...@tuxteam.de wrote:
> > > > On Thu, Jun 08, 2023 at 09:08:59PM -0400, gene heskett wrote:
> > > > 
> > > > [...]
> > > > 
> > > > > Perhaps I've ben mistaken, but the files in /etc/udev/rules.d are not 
> > > > > the
> > > > > same as /lib/udev/rules.d, so which one actually rules?
> > > > 
> > > > The one in /etc, as David said. Unless it doesn't exist.
> > > > 
> > > > This is actually the classical pattern of "layered configuration", which
> > > > is widespread in the UNIX world. You see that often with a system config
> > > > which can be overridden by a user config.
> > > > 
> > > > Sometimes you have even three layers: distro (e.g. lib), local (etc) and
> > > > user.
> > > 
> > > Thanks for the clarification Tomas. That would intimate the search
> > > order would be /home/$usr/someplace, /etc/someplace, /lib/someplace.
> > > Is that correct?
> > 
> > Not only did I give the priority for the task you're tackling
> > (which BTW would not concern an individual user's directory tree),
> > I also gave you the reference: man udev.
> > 
> > What is your problem??
> > 
> man udev is as opaque as you can make what looks like plain English.

I find it hard to believe that the exams you're always talking about
having passed are any easier than understanding:

 "All rules files are collectively sorted and processed in lexical
  order, regardless of the directories in which they live. However,
  files with identical filenames replace each other.
  Files in /etc/ have the highest priority, files in /run/
  take precedence over files with the same name under /usr/.
  This can be used to override a system-supplied rules file
  with a local file if needed"

But paraphrasing myself, not only did I give you the reference,
I also gave you the priority for the task you're tackling:
 "Files under /etc/ take priority over those under /usr/lib/
  when their filenames are the same."

Cheers,
David.



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

2023-06-09 Thread gene heskett

On 6/9/23 11:40, Greg Wooledge wrote:

On Fri, Jun 09, 2023 at 09:47:56AM -0400, gene heskett wrote:

On 6/9/23 09:33, Greg Wooledge wrote:

Start with .xsessionrc (the Debian hack) and see if that works.  Put a
PATH modification in there, and also put something like

export GENETEST=hello


in a $HOME/.xsessionrc had no effect on a new xfce4 terminal.


Did you log out and back in, or did you simply start a new XFCE4
terminal within an existing session?  The .xsessionrc file is only
read during X session startup, not when running various applications
like terminal emulators.

(Yes, I know, it's a PAIN to log out and back in, at least for me, and
it sounded like for you too... but it's required for this test to be
meaningful.  It's not urgent, so you can do it when it's convenient.)

.
logging out and back in may as well be a reboot. I normally run with 
quite a few apps I have to restart, and rebuild my network to up to 9 
other machines, up to 9 ssh -Y shells, (allthough the -Y doesn't work 
any more which severely limits the editors I can use, a bigger pita than 
this in fact.)  and 6 or more links for mc to copy things around.  Yes, 
its a pita.  Done if needed of course.  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 



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

2023-06-09 Thread Greg Wooledge
On Fri, Jun 09, 2023 at 09:47:56AM -0400, gene heskett wrote:
> On 6/9/23 09:33, Greg Wooledge wrote:
> > Start with .xsessionrc (the Debian hack) and see if that works.  Put a
> > PATH modification in there, and also put something like
> > 
> > export GENETEST=hello
> > 
> in a $HOME/.xsessionrc had no effect on a new xfce4 terminal.

Did you log out and back in, or did you simply start a new XFCE4
terminal within an existing session?  The .xsessionrc file is only
read during X session startup, not when running various applications
like terminal emulators.

(Yes, I know, it's a PAIN to log out and back in, at least for me, and
it sounded like for you too... but it's required for this test to be
meaningful.  It's not urgent, so you can do it when it's convenient.)



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

2023-06-09 Thread gene heskett

On 6/9/23 10:23, to...@tuxteam.de wrote:

On Fri, Jun 09, 2023 at 09:47:56AM -0400, gene heskett wrote:

On 6/9/23 09:33, Greg Wooledge wrote:

On Fri, Jun 09, 2023 at 09:25:25AM -0400, gene heskett wrote:

On 6/9/23 07:33, Greg Wooledge wrote:

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.


I would NOT advise modifying the files in /etc/X11, especially if you
aren't 100% sure what you're doing.  There are lot of subtle and delicate
moving parts in there.

Whatever you end up doing to get your PATH set properly at login should
happen only in your $HOME directory.

Start with .xsessionrc (the Debian hack) and see if that works.  Put a
PATH modification in there, and also put something like

export GENETEST=hello


in a $HOME/.xsessionrc had no effect on a new xfce4 terminal.


Make sure /etc/X11/Xsession.options has a non-commented out

   allow-user-xsession

I think on my box it wasn't the default.

And I'm subbed, no need for reply-all. ;o)>


Cheers


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 



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

2023-06-09 Thread gene heskett

On 6/9/23 10:22, to...@tuxteam.de wrote:

On Fri, Jun 09, 2023 at 09:47:56AM -0400, gene heskett wrote:

On 6/9/23 09:33, Greg Wooledge wrote:

On Fri, Jun 09, 2023 at 09:25:25AM -0400, gene heskett wrote:

On 6/9/23 07:33, Greg Wooledge wrote:

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.


I would NOT advise modifying the files in /etc/X11, especially if you
aren't 100% sure what you're doing.  There are lot of subtle and delicate
moving parts in there.

Whatever you end up doing to get your PATH set properly at login should
happen only in your $HOME directory.

Start with .xsessionrc (the Debian hack) and see if that works.  Put a
PATH modification in there, and also put something like

export GENETEST=hello


in a $HOME/.xsessionrc had no effect on a new xfce4 terminal.


Make sure /etc/X11/Xsession.options has a non-commented out

   allow-user-xsession

it was un-commented and still is.


I think on my box it wasn't the default.

Cheers


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 



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

2023-06-09 Thread tomas
On Fri, Jun 09, 2023 at 09:47:56AM -0400, gene heskett wrote:
> On 6/9/23 09:33, Greg Wooledge wrote:
> > On Fri, Jun 09, 2023 at 09:25:25AM -0400, gene heskett wrote:
> > > On 6/9/23 07:33, Greg Wooledge wrote:
> > > > 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.
> > 
> > I would NOT advise modifying the files in /etc/X11, especially if you
> > aren't 100% sure what you're doing.  There are lot of subtle and delicate
> > moving parts in there.
> > 
> > Whatever you end up doing to get your PATH set properly at login should
> > happen only in your $HOME directory.
> > 
> > Start with .xsessionrc (the Debian hack) and see if that works.  Put a
> > PATH modification in there, and also put something like
> > 
> > export GENETEST=hello
> > 
> in a $HOME/.xsessionrc had no effect on a new xfce4 terminal.

Make sure /etc/X11/Xsession.options has a non-commented out

  allow-user-xsession

I think on my box it wasn't the default.

Cheers
-- 
t


signature.asc
Description: PGP signature


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

2023-06-09 Thread gene heskett

On 6/9/23 09:33, Greg Wooledge wrote:

On Fri, Jun 09, 2023 at 09:25:25AM -0400, gene heskett wrote:

On 6/9/23 07:33, Greg Wooledge wrote:

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.


I would NOT advise modifying the files in /etc/X11, especially if you
aren't 100% sure what you're doing.  There are lot of subtle and delicate
moving parts in there.

Whatever you end up doing to get your PATH set properly at login should
happen only in your $HOME directory.

Start with .xsessionrc (the Debian hack) and see if that works.  Put a
PATH modification in there, and also put something like

export GENETEST=hello


in a $HOME/.xsessionrc had no effect on a new xfce4 terminal.


and see if that's present in a shell inside a newly spawned xterm.
If it is, then you know that .xsessionrc is being read during login,
even if the PATH modification is lost.

If GENETEST is present but the PATH modification is not, then you know
something's changing your PATH after .xsessionrc has been read.  In that
case you need to track it down inside your desktop environment.

If neither one is present, then you're not using a Debian X session.

Whatever the results are, you'll have learned *something*.

.


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 



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

2023-06-09 Thread gene heskett

On 6/9/23 06:51, David Wright wrote:

On Fri 09 Jun 2023 at 06:20:07 (-0400), gene heskett wrote:

On 6/9/23 00:46, to...@tuxteam.de wrote:

On Thu, Jun 08, 2023 at 09:08:59PM -0400, gene heskett wrote:

[...]


Perhaps I've ben mistaken, but the files in /etc/udev/rules.d are not the
same as /lib/udev/rules.d, so which one actually rules?


The one in /etc, as David said. Unless it doesn't exist.

This is actually the classical pattern of "layered configuration", which
is widespread in the UNIX world. You see that often with a system config
which can be overridden by a user config.

Sometimes you have even three layers: distro (e.g. lib), local (etc) and
user.


Thanks for the clarification Tomas. That would intimate the search
order would be /home/$usr/someplace, /etc/someplace, /lib/someplace.
Is that correct?


Not only did I give the priority for the task you're tackling
(which BTW would not concern an individual user's directory tree),
I also gave you the reference: man udev.

What is your problem??


man udev is as opaque as you can make what looks like plain English.

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.

PS New thread for a new subject? Come on …

Cheers,
David.


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 



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

2023-06-09 Thread Greg Wooledge
On Fri, Jun 09, 2023 at 09:25:25AM -0400, gene heskett wrote:
> On 6/9/23 07:33, Greg Wooledge wrote:
> > 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.

I would NOT advise modifying the files in /etc/X11, especially if you
aren't 100% sure what you're doing.  There are lot of subtle and delicate
moving parts in there.

Whatever you end up doing to get your PATH set properly at login should
happen only in your $HOME directory.

Start with .xsessionrc (the Debian hack) and see if that works.  Put a
PATH modification in there, and also put something like

export GENETEST=hello

and see if that's present in a shell inside a newly spawned xterm.
If it is, then you know that .xsessionrc is being read during login,
even if the PATH modification is lost.

If GENETEST is present but the PATH modification is not, then you know
something's changing your PATH after .xsessionrc has been read.  In that
case you need to track it down inside your desktop environment.

If neither one is present, then you're not using a Debian X session.

Whatever the results are, you'll have learned *something*.



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

2023-06-09 Thread gene heskett

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  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 



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

2023-06-09 Thread songbird
Greg Wooledge wrote:
...
> I must have said this a hundred times, but... it depends on HOW you login.

  yes!  login vs. non-login.

  the rest left in because it is useful and notable.


> 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  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.


  songbird



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

2023-06-09 Thread Greg Wooledge
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  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.



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

2023-06-09 Thread David Wright
On Fri 09 Jun 2023 at 06:20:07 (-0400), gene heskett wrote:
> On 6/9/23 00:46, to...@tuxteam.de wrote:
> > On Thu, Jun 08, 2023 at 09:08:59PM -0400, gene heskett wrote:
> > 
> > [...]
> > 
> > > Perhaps I've ben mistaken, but the files in /etc/udev/rules.d are not the
> > > same as /lib/udev/rules.d, so which one actually rules?
> > 
> > The one in /etc, as David said. Unless it doesn't exist.
> > 
> > This is actually the classical pattern of "layered configuration", which
> > is widespread in the UNIX world. You see that often with a system config
> > which can be overridden by a user config.
> > 
> > Sometimes you have even three layers: distro (e.g. lib), local (etc) and
> > user.
> 
> Thanks for the clarification Tomas. That would intimate the search
> order would be /home/$usr/someplace, /etc/someplace, /lib/someplace.
> Is that correct?

Not only did I give the priority for the task you're tackling
(which BTW would not concern an individual user's directory tree),
I also gave you the reference: man udev.

What is your problem??

> 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.

PS New thread for a new subject? Come on …

Cheers,
David.