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

105
votes
9answers
54k views

Environment variables of a running process on Unix?

I need to troubleshoot some problems related to environment variables on a Unix system. On Windows, I can use a tool such as ProcessExplorer to select particular a process and view values of each ...
15
votes
2answers
20k 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 ...
4
votes
1answer
1k 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
1answer
1k 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
2k 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 ...
106
votes
6answers
152k views

How do you add a Windows environment variable without rebooting?

This is probably an easy answer, but I have never been able to find it by googling. I simply would like to add an Environment variable to a Windows machine (desktop or server) and be able to use it ...
8
votes
1answer
4k 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 ...
6
votes
5answers
30k views

How to change default /tmp to /home/user/tmp

Is there an environment variable to set the temporary directory on debian based systems? I have a java applet that uses that environement variable and it's getting confused when launching two ...
3
votes
4answers
8k 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 ...
10
votes
2answers
4k 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
8k 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
7k 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 ...
3
votes
3answers
12k 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 ...
2
votes
2answers
7k 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 ...
10
votes
2answers
7k 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
7k 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
4answers
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 ...
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
15k 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
2answers
7k views

Setting Server Variables before Apache Loads

We have CentOS with Apache running on it. Basically, I have a few variables in /etc/environment and they're passed through to our Apache configs using PassEnv. The issue is that because Apache is ...
2
votes
1answer
690 views

Set environment variable for process spawned by Apache webserver

How can I set an environment variable (not an "Apache environment variable", as described in the Apache HTTP server documentation here, but a plain old operating system environment variable) for ...
1
vote
2answers
1k views

Using HaProxy environmental variables in haproxy.cfg not working

Trying to figure out why environmental variables in haproxy.cfg aren't working in HA-Proxy version 1.5.2 on the command line, using Printenv I get a list of environmental variables like ...
1
vote
1answer
831 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) . ...
0
votes
1answer
1k views

Composer works as root but not as a common user, why?

I have installed Composer Globally as this docs shows and it works for root user on my server CentOS 6.6 but as a normal user lets said webvm user it doesn't saying that composer is not found (see ...