Handbook Talk:AMD64/Working/EnvVar

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
Before creating a discussion or leaving a comment, please read about using talk pages. To create a new discussion, click here. Comments on an existing discussion should be signed using ~~~~:
A comment [[User:Larry|Larry]] 13:52, 13 May 2024 (UTC)
: A reply [[User:Sally|Sally]] 10:33, 5 November 2024 (UTC)
:: Your reply ~~~~

Example settings for the mentioned variables code box breaks emerge install

Talk status
This discussion is done as of 2022-11-27.

The example multi-lined "CONFIG_PROTECT=", breaks emerge install on the current version of portage. It can be fixed by changing it to be single-lined.

Jasjar (talk) 05:03, 17 December 2018 (UTC)

Actually the provided example is interpreted as a single line due to the included \ (backslashes). --Maffblaster (talk) 10:45, 27 November 2022 (UTC)

Suggested changes

Talk status
This discussion is done as of 2024-10-12.

"Important examples" section

Proposed changes - Please make edits here until a final revision is agreed upon.

This variable contains a colon-separated list of directories which the dynamic linker searches to find a library.
Proposed changes - Please make edits here until a final revision is agreed upon.

This variable contains a colon-separated list of directories which the man(1) command searches for man pages.
Proposed changes - Please make edits here until a final revision is agreed upon.

This variable contains a colon-separated list of directories which the info(1) command searches for info pages.
Proposed changes - Please make edits here until a final revision is agreed upon.

This variable contains the path to the program used to list the contents of files (such as less or more(1)).
Proposed changes - Please make edits here until a final revision is agreed upon.

This variable contains the path to the program used to edit files (such as nano or vi).

"Defining variables globally" section

"The env.d directory" section

Proposed changes - Please make edits here until a final revision is agreed upon.

There are still occasions where a system administrator is asked ...

"env-update" section

Proposed changes - Please make edits here until a final revision is agreed upon.

Concatenation only takes place with the following variables:
Proposed changes - Please make edits here until a final revision is agreed upon.

It's possible to add more variables to this list of concatenate-variables by adding the variable name to either the COLON_SEPARATED variable or the SPACE_SEPARATED variable (inside an /etc/env.d/ file).
Proposed changes - Please make edits here until a final revision is agreed upon.

to recreate the /etc/ld.so.cache file used by the dynamic linker.
Proposed changes - Please make edits here until a final revision is agreed upon.

Thus, users working in X or Wayland need to either type source /etc/profile in every new terminal opened, or restart X or the Wayland compositor so that all new terminals source the new variables.

"Defining variables locally" section

"User specific" section

Proposed changes - Please make edits here until a final revision is agreed upon.

one might want to add /home/my_user/bin and the current working directory (the directory the user is in) to the PATH variable but not want all other users on the system to have those directories in their PATH.
Proposed changes - Please make edits here until a final revision is agreed upon.

To define an environment variable locally, use ~/.bashrc (for all interactive shell sessions) or ~/.bash_profile (for login shell sessions):

"Session specific" section

Proposed changes - Please make edits here until a final revision is agreed upon.

Sometimes even stricter definitions are required.
Proposed changes - Please make edits here until a final revision is agreed upon.

For instance, a user might want to be able to use binaries from a temporary directory without needing to use the full path to the binaries and without needing to temporarily change ~/.bashrc.
Thank you! These have been added in Special:Diff/1271701/1315907. I left out the env-update ones because most references to it on the Wiki have been removed and we're just waiting for a dev's approval to remove it from the Handbook.
--csfore (talk) 02:34, 13 October 2024 (UTC)