Questions tagged [environment-variables]

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.

Environment variables are key-value-pair configuration options like KEY=valueor FOO=bar. Environment variables allow you to configure a program before it gets executed and without the need to store these variables in proprietary configuration files.

They are present on all POSIX systems (Unix, Linux, BSD, Mac OS, DOS, Windows, ...). Environment variables can be set by any shell and read by nearly any programming language.

Some programming languages allow you to set Environment variables, but they only persist within the current process. You can't set them to be visible by the calling shell. So they are not useful for inter-process communication.

410 questions
1
vote
1 answer

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 non-standard HTTP request header so that it can…
1
vote
1 answer

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 defined by a module not included in the server…
Colin Dean
  • 121
  • 4
1
vote
4 answers

Tomcat6 cannot find java enviroment variable

Here is a stupid noob question. I installed Tomcat6 and java-6-oracle. I set the /env/environment to contain JAVA_HOME and JRE_HOME (and both point to the correct directory). However when I try and start tomcat6 it says: no JDK found - please set…
user5013
  • 233
  • 4
  • 8
1
vote
1 answer

Path not loaded for user when connecting with SSH

I have an Windows 2008 Server Instance running on EC2. I have installed an application and added it to the path and it is now available to my Administrator user from the Command Line. However, when I SSH in to the server as the Admin User, the…
1
vote
3 answers

How to set $LD_LIBRARY_PATH for a Tomcat webapp after it is automatically unset?

I have a Tomcat webapp that needs LD_LIBRARY_PATH to be set. I'm using RHEL6 and Tomcat6 (from yum package manager), the webapp is called adore-djatoka. I'm starting tomcat by using a supplied script that exports a number of environment variables,…
vowel-house-might
  • 259
  • 1
  • 3
  • 11
1
vote
1 answer

How can I pass environment variables to a WSGI script, using uWSGI?

I've added the following line to /etc/environment: FOO_DEPLOYMENT_ENV="vbox" Upon logging in via SSH, I can echo $FOO_DEPLOYMENT_ENV and, of course, see vbox output to the shell. If I open a Python shell and run os.getenv('FOO_DEPLOYMENT_ENV'), it…
orokusaki
  • 2,763
  • 4
  • 32
  • 43
1
vote
0 answers

"hkcu\volatile environment" missing, hkcu\environment not read

This question is very similar to this one. Suddenly, my "HKCU\Volatile Environment" keys disappeared, and my system no longer reads HKCU\Environment unless I reset it explicitly using SETX (which I think sends a WM_SETTINGCHANGE to all active…
1
vote
1 answer

Best File To Store System-Wide Environmental Variables

Where is the best location that will work with the most flavors of Linux (Ubuntu, CentOS, Fedora, Etc) to store system wide environmental variables? Seems like all three of these locations will work. Which is the…
Justin
  • 5,328
  • 19
  • 64
  • 84
1
vote
1 answer

uCLinux how to make environment variable visible to processes run by init and spawned shells

I'm working on a uCLinux system and need to set a custom environment variable. I want the variable set early in the boot sequence so that started daemons can read it. I tried exporting the variable in the rcS startup script (before it launches the…
fred basset
  • 665
  • 2
  • 7
  • 14
1
vote
3 answers

Windows environment variables: "Default User" vs. "System"

I'm exploring environment variables via the WMI class Win32_Environment. According to the documentation, a variable that's not of a specific user can be either a "System" variable or a "Default User" variable. My question is, what's the difference,…
JCCyC
  • 680
  • 3
  • 13
  • 24
1
vote
1 answer

multi-user rvm gem install failure when called from CloudFormation::Init

I've taken an Amazon Linux AMI (based on CentOS) and installed RVM (1.10.3) to it in multi-user fashion (see {1} below). I used that to install ruby 1.9.3-p125, rubygems 1.8.17, and bundler 1.1 as the baseline requirements for most things I'm…
Peter Mounce
  • 1,253
  • 5
  • 16
  • 29
1
vote
1 answer

Per client profiles in Citrix

I want to associate each Citrix client machine with a certain application specific profile (no windows profile or something similar). I have the following ideas to do this, but maybe there is a better way I am not aware of. a) The client reads the…
deamon
  • 121
  • 3
1
vote
1 answer

"AUTHENTICATE_"environment variables missing in Apache + LDAP authentication

According to the Apache 2.2 documentation, after a successful authentication against Active Directory the LDAP attributes specified in the AuthLDAPUrl directive should be available as environment variables with the default prefix…
alexandrul
  • 1,435
  • 2
  • 19
  • 25
1
vote
0 answers

PATH environmental variable has changed suddenly for root user

Recently one of my Gentoo linux servers, which has been working happily for quite a few years suddenly stopped responding to BASH commands that I commonly issue it. Very basic commands such as rc-update, or check my iptables configuration status.…
dynamphorous
  • 276
  • 1
  • 2
  • 13
1
vote
1 answer

Set php environment variable for cron via Plesk admin interface

Within our application we make use of a environment variable named SERVER_ENV that is used to set whether we are in a production or development environment. This is set through the httpd.conf file for apache. The issue we are having is that using…
Simon Bennett
  • 135
  • 1
  • 5