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

3
votes
3answers
73 views

Will a Local System service notice changes to environment variables in Windows 2008 R2 without a reboot?

Microsoft has a knowledge base article, last reviewed in June 2007, which states: If you update environment variables or add new environment variables, you must restart the computer before the ...
3
votes
1answer
82 views

netsh advfirewall set store gpo: %COMPUTERNAME% does not work

I am in charge of a group of computers that process highly confidential data. They cannot be connected to the Internet or even the company network, only a network drive. So I wrote a batch file on the ...
0
votes
1answer
57 views

Strange behavior with supervisor, gunicorn and Django

I have a really strange problem with supervisor and gunicorn. I read supervisor documentation, all the relevant blog posts, stackexchange questions but none of them solve my strange problem, and I ...
0
votes
1answer
29 views

Set env var for user as root

I'm on debian logged in as root and I am trying to set an env var for a specific user (not root). This is what I tried and didn't work: su - nginx -c export APP_SETTINGS='production.py' The error I ...
0
votes
0answers
36 views

mailx command strange behaviour from cron

I have a script that redirect the df output to a file and then send it in an email. The mail command is set up as following: /usr/bin/mail -s "Subject" -r from@nowhere.com toaddress@somewhere.com ...
0
votes
0answers
41 views

How to modify environment variable in Apache for CLI

I have a Zend framework 2 application which needs to be configured through an environment variable. On my local host (Windows) for example I set APPLICATION_ENV = local and with ...
0
votes
1answer
74 views

OpenSSH client sends environment variable it should not

I have a host that doesn't have the termcap entries for non-standard terminals and I cannot add them (policy). I use tmux which sets a terminal type to something that this device does not recognise. ...
1
vote
1answer
172 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 ...
1
vote
1answer
470 views

How to reload environment variables file in a running Docker container

I have a running container with an environment variables file mounted as such: docker run -d --env-file ./env.list my/image and everything is working well, now I have updated my ./env.list file and ...
0
votes
0answers
242 views

OpenVPN --route-up Missing environment variables when passing to script

I'm diving into the glory of OpenVPN and I'm having a bit of trouble manually configuring the routing tables. I'm on Arch Linux. I know OpenVPN automatically updates the routing tables when ...
1
vote
1answer
71 views

chroot 64 bit -> 32 bit = 'command not found'

Very obviously 32 bit cannot chroot to 64 bit but I am confident that I have successfully chrooted from 64 bit to 32 bit using Gentoo but when I [root@localhost ~]# mount /dev/vg_atom1/lv_root ...
0
votes
0answers
271 views

Set JAVA_HOME is not working

I'm trying to set JAVA_HOME in CentOS 6.5 by editing the file ~/.bash_profile and adding this line at end: PATH=$PATH:$HOME/bin export PATH export ...
1
vote
2answers
158 views

How to “recycle” the IIS process without rebooting the server?

Getting ASP.NET to see changes in PATH I've changed the environment PATH variable on my server and need IIS / W3WP (i.e. my ASP.NET app) to see this change. I understand from this other question's ...
0
votes
1answer
184 views

Setting enviromental variables for login shells under root account in FreeBSD

I am currently in the process of configuring Open Grid Scheduler in FreeBSD. As part of this process I need to set the environmental variableSGE_ROOTas root. To do this I have been experimenting with ...
0
votes
1answer
112 views

Apache: scope for environmental variables

While there's documentation available on Apache environmental variables, I can not find answer to one important question. Imagine I use rewrite rules to set environmental variable RewriteRule ... ... ...
1
vote
2answers
1k views

Change apache (PHP) $PATH environment variable on CentOS with cPanel

I need to add a path to $PATH environment variable for PHP scripts on CentOS linux server with cPanel Pro 1.0 and Apache 2.2.27. For Ubuntu or SuSE it just means adding the row export ...
0
votes
0answers
58 views

Replace an existing environment variable in apache

I'm trying to change the value of Apache's built-in environment variable (eg. SERVER_ADDR), but neither of the following configurations has any effect: Setenv SERVER_ADDR 1.2.3.4 SetenvIf ...
-3
votes
2answers
83 views

How to set environment variables [closed]

Say, I would like to change my editor system-wide to nano. I was doing this with echo 'export EDITOR=/usr/bin/nano' >> /etc/bashrc As I learned, it was a bad idea, because if you accidentally ...
2
votes
2answers
186 views

Apache 2.2.14 / mod_auth_kerb 5.4 : Custom krb5.conf for Apache Instance

Objective: Use Apache/mod_auth_kerb using a custom krb5.conf file, not system standard /etc/krb5.conf. Issue: I've got a strongly regimented environment where we application owners are able to ...
0
votes
1answer
100 views

How to use a freshly installed environment variable in Windows

When I set an environment variable through the setx command in Windows 7, the variable is correctly set but if I type in set, it list the environment variables that were set at the script start up, ...
2
votes
1answer
74 views

Sharing ENV variables between multiple linux servers

I need to be able to share ENV variables between multiple linux servers. These variables are used by my application. I'd like to keep these variables in sync between all servers. Application ...
1
vote
1answer
140 views

Best practices for software configuration?

I'm configuring my AWS EC2 instances with Ansible, but I don't know what's the best way of storing my app configuration. Now I'm just sending a "app.properties" file to the server, using Ansible, but ...
2
votes
1answer
514 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 ...
1
vote
1answer
158 views

What core environment variables should be set for a Windows service?

When using a service manager like srvany or nssm to run a normal program as a service, you can set the program's environment using the registry as documented here: ...
3
votes
2answers
189 views

Managing Python versions with environment-modules

I'm trying to configure a RHEL6 server to allow multiple users to run multiple versions of Python, multiple versions of various python modules, and multiple versions of various other programs (e.g. ...
0
votes
1answer
213 views

order of operations for environment variables

I want to understand how environment variables are set and reset (overridden). I'm running Apache/2.2.24 (Unix) PHP/5.4.14 on a mac . My theory is this: Environment vars can be set in bash, then they ...
3
votes
1answer
908 views

How to load the environment variables at boot time before X11 on Ubuntu Precise?

Using Ubuntu Precise 64 bit, I'm facing a problem that I'm unable to solve and that I'll try to describe below: I'm using a console mode program (let's say abc) that uses Go, NodeJS, Java and Scala. ...
1
vote
0answers
101 views

grep is inconsistently defaulting to grep -P?

I have a script that does some housekeeping that works perfectly well when invoked from an interactive shell, but did nothing when invoked by cron. To troubleshoot this I started a shell with a ...
4
votes
2answers
122 views

Is there a good reason not to add sbin to the default PATH?

Background: The PATH environment variable specifies the directories to be searched through when a command is issued without specifying a path. "sbin" paths (/sbin, /usr/sbin) are intended to house ...
1
vote
3answers
124 views

Dynamic logic in environment variable?

I regularly invoke a particular remote server from a (Linux/bash) command line via tools like cURL or wget. This server requires an authentication token that expires every 10 minutes. I have a program ...
2
votes
3answers
371 views

Is there a utility to read environment variables from an env file and then run a command (more lightweight than foreman)?

foreman can read .env files and set environment variables from the contents, and then run a program e.g. foreman run -e vars.env myprogram ...but it does a lot of other things (and is primarily ...
1
vote
1answer
708 views

Trying to create a GPO shortcut to local app data directory

We have a lockdown browser application that was installed on all of our students' laptops, but it was installed to the local app data of the user that performed the install. Therefore, none of our ...
4
votes
3answers
244 views

Environment variable in /etc/environment with pound (hash) sign in the value

On Ubuntu 12.04, I have an environment variable defined in /etc/environment like this: FOO="value_before#value_after" When I ssh into the server to check the value, I get this: $ env | grep FOO ...
1
vote
1answer
590 views

env variable: username returns hostname within a Scheduled Task - GPO

I am editing a Group Policy Scheduled Task. In General, Security Options "When running the task, use the following user account:" I have the following- %USERDOMAIN%\%USERNAME% Updating the gpo, and ...
4
votes
2answers
188 views

Preventing bash tab completion of an environment variable with a FS path value from removing the environment variable name

Friends, I am using GNU bash as my shell on Linux: $ bash --version GNU bash, version 4.2.45(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU ...
0
votes
2answers
1k views

Setting locale in Ubuntu 12.04 (openvz)

I have a fresh installation of Ubuntu 12.04 as virtual openVZ guest. The defined locale for LC_* in basic setup is POSIX. I'd like to change this to en_US.UTF-8. So I installed language_pack_en_base ...
8
votes
1answer
99 views

Is there a way to control where a windows update extracts temporary files?

Working on a vendor built system, we've realized that OS partition (C:) they created was rather small (38 GB). The object is to update Windows 2008 R2 to SP1. Several sources state that 8 GB is ...
0
votes
2answers
535 views

ssh SendEnv from windows to linux server using cygwin

I am doing ssh to a Open SUSE linux server from windows cygwin. I am trying to send one of my local environment variable through the ssh command so that I can load some specific .bashrc file right ...
0
votes
1answer
72 views

Apache2 PassEnv not working after reboot

I have an Ubuntu 12.04 LTS server with a vanilla apache install. In my Apache Config, I'm using PassEnv to pass an environment variable: PassEnv MY_VARIABLE MY_VARIABLE is defined in ...
0
votes
1answer
200 views

Processes spawned by taskset not respecting environment variables

I've run into an issue where an intel compiler generated program that I'm running with taskset has been putting its temporary files into the working directory instead of /tmp (defined by environment ...
2
votes
1answer
640 views

Security risks of PermitUserEnvironment in ssh

I've read quite a few posts regarding the use of PermitUserEnvironment and the file ~/.ssh/environment in order to pass env variables to an ssh shell. The official sshd docs and a few other resources ...
0
votes
1answer
226 views

Using mod_expires conditionally depending on an environment variable

I've borrowed some mod_expires code from the HTML5 Boilerplate that adds some sensible defaults for asset expiry (I have filename version revving configured with htaccess so I can add mtimes before ...
1
vote
1answer
115 views

How to store value of a non-standard HTTP request header to be used in an Apache If conditional

My server will be receiving a non-standard HTTP request named EmployeeID that I want to use to determine access rights to certain directories on the server. How can I store the value of the incoming ...
0
votes
1answer
76 views

How to use a common library of environment variables among different languages?

We have three main languages with which we perform system tasks: Bash, Ruby, and PHP, and Perl. Four, four main languages. We use managed environment variables to provide authorization info that ...
1
vote
1answer
166 views

How do I put a newline into an environment variable in an Apache SetEnv directive?

I'd like to have a newline character in an environment variable. I've tried SetEnv DI_collection_clients_list "client1 client2" which results in Invalid command 'client2"', perhaps misspelled or ...
0
votes
1answer
1k views

Equivalent of PHP setlocale in an APACHE config file

I need to display a date in french locale. A solution is to use setlocale(LC_TIME, 'fr_FR'); But I'm looking to set the locale directly in the configuration of my apache server. In the ...
0
votes
2answers
108 views

How to set a user environmental variable in .profile

I set an environmental variable for user on CentOS by simply: 1.) Logging in with the user 2.) Going to their home directory cd ~ and creating a file .profile 3.) Putting the following in the ...
1
vote
1answer
739 views

Prevent setx to expand an environment variable?

I can add to the PATH variable from the console using the following command: setx PATH "%JAVA_HOME%\bin;%PATH%" /m However, when I check the PATH variable afterwards the JAVA_HOME variable has been ...
0
votes
1answer
515 views

How can I change path for xml2-config

I've already asked same question in stackoverflow.I need some more help. I’m trying to upgrade libxml2 from 2.6.26 to 2.7.7 on CentOS5.5 I installed libxml2-2.7.7 in /opt/libxml2-2.7.7/bin/ I'd ...
1
vote
2answers
529 views

How to escape spaces in Apache SetEnvIf value

I am trying to use SetEnvIf (Apache2, via a .htaccess file) to store an environment variable where the value to be assigned to the variable needs to contain spaces. For example, trying to set ...