Environment variables are configuration options that can be set in a shell or other similar environments. All programs started from within the shell can read them and configure themselves.

learn more… | top users | synonyms

82
votes
9answers
42k views

Environment variables of a running process on Unix?

This is to troubleshoot some problems related to environment variables .. On Windows, I could do this by using tool such as ProcessExplorer to select particular process and view values of each ...
7
votes
2answers
14k views

CentOS /usr/local/lib system wide $LD_LIBRARY_PATH?

I install custom software in /usr/local/lib. How do I set the PATH and LD_LIBRARY_PATH in CentOS 6 system-wide to use /usr/local/lib. I realize there may be more than one way. What's the simplest and ...
2
votes
1answer
833 views

How can I use perfmon/logman to set up logging on a master (Windows) VM, writing to another machine on the network?

I know how to set up logging to write to a remote location in the general case - just specify the output filename using the full UNC path (e.g. \\HOST-PC\directory\logoutput.etl) when creating the log ...
2
votes
2answers
1k views

Win Service running under LocalService account cannot access environment variables

I am looking for prove or disprove of my theory. We have windows service which runs under LocalSystem account. the service is calling msbuild and builds csproj (Visual Studio project) file, which use ...
4
votes
1answer
3k views

Make IIS see updated environment PATH variable

We've installed Oracle Express on a Windows 2003 Server and in the process it updated the PATH. We're trying to get IIS to see this change in the PATH but we can't figure it out. We've recycled the ...
3
votes
3answers
7k views

How to override a PATH environment variable in sudo?

I set PATH in /etc/profile. I do not have any problems in the case of the general user, but PATH does not go when I become the root authority in sudo. What would you do to override the PATH which is ...
9
votes
2answers
3k views

Why is “AcceptEnv *” considered insecure?

In /etc/ssh/sshd_config, there is an option called AcceptEnv that allows the ssh client to send environment variables. I need to be able to send a large number of environment variables. These change ...
6
votes
2answers
6k views

Windows: How do I add a program to the system's path environmental variable from the command line?

I'm looking to permanently add a directory to the %PATH% environmental available on a large number of Windows machines. Is there any way to do this from a command line (cmd) so I can script up a ...
6
votes
1answer
5k views

Windows - how to set environment variable for another user

What the title says. On windows, how do I set an environment variable for a user other than the currently logged in one. I need to set the TMP variable to change the temporary directory used by a ...
4
votes
2answers
1k views

linux: how to permanently and globally change environment variables

I want to do the following for every user that logs into my linux box: export PATH=$PATH:~/.path And I don't know how to do that besides manually adding that line in every ~/.bashrc file. Also, a ...
2
votes
1answer
893 views

How can I use environment variables in haproxy.conf

My haproxy.cfg file has one backend servers using hostnames: backend servers server myapp ${PORTAL_PORT_3000_TCP_ADDR}:${PORTAL_PORT_3000_TCP_PORT} maxconn 32 myapp is running in other docker ...
2
votes
2answers
6k views

Apache proxy: passing on REMOTE_USER to backend server

We are using shibboleth for authentication. Our shibboleth Service provider is running on a host that is running apache with reverse proxy configuration (mod_proxy). The applications using shibboleth ...
1
vote
3answers
8k views

crontab execution doesn't have the same environment variables as executing user

I ran my crontab job 0 2 */1 * * /aScript >aLog.log 2>&1 as a 'root' user, and however I found the env is different from env of the 'root' user, and therefore experiencing a different ...
9
votes
2answers
5k views

Environment Variables in PATH Not Expanded for non-Admin Command Prompt?

I have a Windows 7 machine which, when Command Prompt is run by a normal user, fails to expand environment variables in the %PATH%. If command prompt is instead run as administrator (right click, Run ...
6
votes
2answers
6k views

Can start-stop-daemon use environmental variables?

I need to daemonize a Windows app running in Wine, and create a pid in /var/run. Since it requires an X11 session to run, I need to make sure the $DISPLAY variable is set in the running user's ...
4
votes
2answers
4k views

Can you use variables when editing /etc/environment in ubuntu 10.04?

I'm trying to introduce a variable and add it to the global path in ubuntu 10.04. According to the official docs, /etc/environment is the right place. Here's what my example looks like: ...
4
votes
8answers
14k views

How to specify root's environment variable?

I do rails development. In this app, I need to specify the environment variable LD_LIBRARY_PATH = /usr/local/oracle/lib, but when I run the app with sudo script/server, it doesn't run because that ...
3
votes
3answers
1k views

How to set an environment variable for a process spawned by the webserver?

In my setup (debian etch, lighttpd), one one my websites is calling a program for some image manipulation via PHP, I think. I'd like to change the behavior of this program by setting an environment ...
1
vote
1answer
672 views

Apache Accessing System Environment Variables (for Log File Location)

Is there a way to let Apache access the system environment variables? I know it has its own environment and can pass them to spawned processes like PHP, but is there a way to let the server itself ...
1
vote
3answers
1k views

I can run a script locally, but cannot do “ssh HOSTNAME /path/to/script.sh”

I have a linux server, and a linux desktop. I have written the following simple script to dump the database of a django web application: #! /bin/bash set -o errexit cd $(dirname $0) . ...