1
vote
1answer
39 views

Multiple MODULEPATH entries in .modulesbeginenv

I'm switching between paths/code projects. At each place I have different modules. To handle this there is a setup script that modifies what to use. This is handled with the tool 'module'. NOTE: ...
2
votes
2answers
60 views

What environment and credential is used by startup, background and service processes

Startup scripts (on boot) Processes running in (or sent to) the background (when using SSH -fN for example) Services etc... What $path variable will they be using? What credentials? Anything else I ...
2
votes
1answer
73 views

Where do I place commands to automatically be exported for all users?

I have an embedded platform running an Arago linux distribution. Right now the only "user" is root but there will eventually be others, but I don't know how many or what user IDs they will have. ...
0
votes
1answer
37 views

Permanent Environment Variable with # linux Ubuntu

I am trying to set some environment variables permanently by editing the /etc/environment file. One of my environment variables has a "#" in it and some text after the "#". Everything after the "#" ...
2
votes
3answers
72 views

Is it a good idea to put environment variables to /usr/local/bin

I'm using aws cfn to start ubuntu instances, and I need to pass variables provided in cfn launch script to the scripts on the instance. For example, I may pass "db-server=db-2.domain.com" and there is ...
3
votes
2answers
162 views

Current environmental variables of a process

This question relates to this answer. Is it possible to get the current (not initial) environmental variables of a process by making a child process and checking its initial environmental variables? ...
3
votes
3answers
183 views

Where is the environment string actual stored?

But when we first time we adding a new name,we have to call malloc to obtain >room for a new list of pointers. We copy the old environment list to this new area and store a pointer to the ...
0
votes
1answer
387 views

Difference between sudo su - user and sudo -iu user [duplicate]

I was wondering if there were any difference (in environment ?) between doing sudo su - user and sudo -iu user From what I know: By using sudo su - user I open a new shell as user, and the ...
5
votes
1answer
140 views

Permanent Environment Variable for all users

I want to have all users on the system to have an environment variable named SPI that points to /usr/local/share_ideas directory. How do I do it?
1
vote
1answer
75 views

Effect if any of changing LD_LIBRARY_PATH environnment variable on emacs fonts?

The rendering of my emacs fonts changes if I define a specific list of directories under the LD_LIBRARY_PATH environment variable just before I call emacs. I changed this because I wanted to use emacs ...
3
votes
1answer
237 views

How to print apparently hidden environment variables?

Environment variables can be shown with env; but, some are not shown. For example... echo $EUID might produce as result of 1000 yet env | grep EUID produces no result. What is this type of variable? ...
2
votes
3answers
266 views

What is the difference between ./script and . ./script? [duplicate]

Possible Duplicate: Using ‘.’ to execute files in bash I was trying to figure out how to export my environmental via script instead of changing my .bashrc file. I found this old useful ...
3
votes
2answers
1k views

How to change environment variables without re-logging to UI?

How can I change environment variables without re-logging to UI? I want to re/define some variables and want them set on my current logged in shell (including UI). I know logging out and then logging ...
6
votes
2answers
497 views

Run a script automatically as I switch to a directory [duplicate]

Possible Duplicate: Execute bash scripts on entering a directory I am running an environment which requires some very specific tool versions. The commands to set up the environment are in a ...
1
vote
4answers
507 views

Exporting environment variable

I am having some problem with bash. I want to export an environment variable whose value contains a variable but I don't want that variable (which is within the value) to be evaluated during the ...
12
votes
3answers
6k views

How to read environment variables of a process

Linux's /proc/<pid>/environ does not update (as I understand it, the file contain the initial environment of the process). How can I read a process's current environment?
0
votes
0answers
297 views

Why do you need sudo for “sudo su root”? [duplicate]

Possible Duplicate: When do su and sudo use different passwords? Why do you need to use sudo su root ? Why won't it work to just use su root?
6
votes
5answers
479 views

PATH environment variable in linux

I want to know how the standard environment variables given by the linux OS like PATH, HOME are set automatically. In which file are these read from. There should be some file from which these ...
4
votes
3answers
150 views

How can I make a public variable in Linux that all users would see?

I need to have a variable $FOO on the system that contains a string all users could use, but I have no idea how to create one. The Upstart job is obviously not a solution as from this thread - Is it ...
4
votes
3answers
4k views

Is it possible to export env variable via Upstart?

I need to export a variable FOO=stringhere so that system processes could use it. And the place I would like to do this, is Upstart job. Unfortunately, I tried as per Upstart manual to do env ...
7
votes
5answers
7k views

Why are PATH variables different when running via sudo and su?

On my fedora VM, when running with my user account I have /usr/local/bin in my path: [justin@justin-fedora12 ~]$ env | grep PATH ...