[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: add custom environment variable in bash source code
From: |
Dale R. Worley |
Subject: |
Re: add custom environment variable in bash source code |
Date: |
Wed, 17 Aug 2022 22:09:54 -0400 |
Sam <sam@cmpct.info> writes:
> You probably want to edit /etc/ld.so.conf or /etc/ld.so.conf.d/* instead.
The overall concept is that you almost certainly don't want to modify
the bash source code (and thus executable) to do this.
In general, if you want to have a particular environment variable set
"all the time", you insert "export X=..." in one of your startup files.
If you want it visible to everybody, you insert that in one of the
system startup files. Depending on exactly what processes you want
affected and how your OS handles these things determines which file to
modify.
However, the original question is
> I want to automatically add LD_PRELOAD before starting bash to make
> this dynamic library work
I see looking at the ld.so manual page:
/etc/ld.so.preload
File containing a whitespace-separated list of ELF shared
libraries to be loaded before the program.
So if what you want is for all processes to preload a particular
library, add its name to this file. Or rather, check how your
particular OS provides this facility.
Dale
- add custom environment variable in bash source code, b1431736437, 2022/08/17
- Re: add custom environment variable in bash source code, Chet Ramey, 2022/08/17
- Re: add custom environment variable in bash source code, Alex fxmbsw7 Ratchev, 2022/08/17
- Re:Re: add custom environment variable in bash source code, b1431736437, 2022/08/17
- Re: Re: add custom environment variable in bash source code, Alex fxmbsw7 Ratchev, 2022/08/17
- Re: Re: add custom environment variable in bash source code, Alex fxmbsw7 Ratchev, 2022/08/17
- Re:Re: Re: add custom environment variable in bash source code, b1431736437, 2022/08/17
- Re: Re: Re: add custom environment variable in bash source code, Alex fxmbsw7 Ratchev, 2022/08/17
- Re: add custom environment variable in bash source code, Sam, 2022/08/17
- Re: add custom environment variable in bash source code,
Dale R. Worley <=
- Re: add custom environment variable in bash source code, Alex fxmbsw7 Ratchev, 2022/08/17
- Re: Re: add custom environment variable in bash source code, Martin D Kealey, 2022/08/18
Re:Re: add custom environment variable in bash source code, b1431736437, 2022/08/17
Re: add custom environment variable in bash source code, Ángel, 2022/08/17