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, ...
2
votes
5answers
89 views
SSH - set env vairables by every connection - godaddy shared host
My problem is, that I have to set env variables (like GIT_EXEC_PATH) on a server. I need that variables by every connection (so by bash and by remote commands either). I managed to set those variables ...
1
vote
1answer
36 views
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 ...
4
votes
6answers
172 views
What is the best place to setup system wide environment variables on Linux?
I just want to setup a system wide environment variable, JAVA_HOME for all users, including root user.
Requirements:
accessible to normal users
accessible to root
always loaded, not only for bash ...
1
vote
2answers
55 views
“service”-command and environment variables
I am trying to start a service that requires a env. variable to be set to certain path. I set this variable in 2/etc/profile.d". However when I start this service using the "service" command, it ...
0
votes
2answers
61 views
Setting LD_LIBRARY_PATH not enough?
I've edited my /etc/bashrc to set LD_LIBRARY_PATH like in my previous question that I asked. However it does not seem to be taking effect. Even though echo $LD_LIBRARY_PATH does show my modifications. ...
0
votes
2answers
139 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 ...
0
votes
3answers
315 views
How to configure sudoers to always keep LD_LIBRARY_PATH envrionment variable?
No matter what I try, it seems that the LD_LIBRARY_PATH environment variable is not kept after I run a command with sudo. The only way I managed to have it stick, is to prefix my sudo command with ...
0
votes
1answer
206 views
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 ...
0
votes
2answers
86 views
BASH store values in an array and check difference of each value
[CentOS, BASH, cron] Is there a method to declare variants that would keep even when system restarts?
The scenario is to snmpwalk interface I/O errors and store the values in an array. A cron job to ...
0
votes
1answer
170 views
Using variables across multiple puppet windows batch scripts
In my puppet script, I have 2 calls to exec that execute different batch files
exec {
command => 'file1.bat'
}
exec {
command => 'file2.bat'
}
If file1.bat sets an environment variable ...
0
votes
1answer
52 views
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 ...
1
vote
1answer
62 views
“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 ...
0
votes
0answers
54 views
How can i test for an environment variable in a RewriteCond
Is there a way to put an environment variable in the condPattern part of a RewriteCond? Here is what i tried:
RewriteCond %{REQUEST_URI} /%{ENV:ALIAS}/(js|css|img).*
RewriteRule (.*) - [L,NS]
But ...
2
votes
3answers
138 views
Why doesn't sudo -E actually preserve my environment?
I'm trying to sudo some binaries that lies in a custom path. That custom path is removed when I run sudo though, but sudo -E should preserve my path. Why doesn't it work?
$ env | egrep ^PATH
...
1
vote
0answers
58 views
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 ...
0
votes
0answers
67 views
Excluding Environment Variables from ZSH Autocomplete
Quick example:
~ $ wor<TAB>
~ $ WORDCHARS= ...
2
votes
1answer
146 views
%sessionname% returns incorrect session name
I have a virtualised Windows XP SP3 machine, which I am connecting to over Remote Desktop.
One of my scripts needs to use the %sessionname% variable. However this returns incorrect information.
...
0
votes
1answer
114 views
How do you set server specific ENV values in Nginx?
I am starting a project that uses environment variables to set the database connection and a couple other things. (They didn't want to use configuration files since people are careless and overwrite ...
0
votes
2answers
72 views
Does java respect PATH env variable when resolves .jar filename?
This is what I have in PATH:
PATH=/opt/ClosureCompiler:/home/vmadmin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
There is a compiler.jar in /opt/ClosureCompiler, but ...
2
votes
1answer
40 views
Can the environment variables tool in windows be launched directly?
Is there a more direct way to the environmental variables GUI then...
Right click 'My Computer' and select 'Properties'.
Click 'Advanced System Settings' link.
Click 'Advanced' tab.
Click ...
2
votes
1answer
155 views
How to SetEnv for an Alias
I have several Aliasses configured in apache configuration.
I would like to set an environmental variables for each of them. How?
I have this
/alias1 /mapped/to/a/path
/alias2 /mapped/to/a/path
...
1
vote
1answer
90 views
PATH variable and quotation marks (windows)
I am having a weird problem with the PATH variable under windows:
My application is in a folder c:\app\bin and the DLLs for this application are in the c:\app\runtime folder. To run my program I ...
0
votes
0answers
46 views
AWS_CLOUDWATCH_HOME is not set
Hi all I am trying to run a bash script which contains following instructions, I have added the bash script to the cron job, when I checked the log the log says, AWS_CLOUDWATCH_HOME is not set. I am ...
0
votes
4answers
422 views
Tomcat 7: “Cannot locate Java Home”
Arch Linux. Servlet apparently had compatibility problems with openjdk so I uninstalled it and installed the plain jdk/jre from AUR.
# /etc/rc.d/tomcat7 restart
:: Stopping tomcat7 daemon [FAIL]
:: ...
1
vote
1answer
90 views
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 ...
1
vote
1answer
101 views
Environment variable not being picked up by app when started with Upstart (Ubuntu)
How does one go about getting a new environment variable picked up system-wide without restarting the server?
As its an Ubuntu 11.x server, I'm using Upstart to start/restart processes.
I added a ...
0
votes
1answer
107 views
How to set PHP environment variables on Ubuntu
I'm sure this is easy if you know how, but I don't.
I've got an ubuntu 10.04 server running PHP5 under apache, all defaults and stuff. The PHP needs some environment variables set. How do I do it?
...
1
vote
1answer
78 views
FreeBSD aliased user identification and GNU screen
The situation is the following.
I have FreeBSD user M, which is an alias for root, i.e., its UID equals to 0.
I have a daemon started as M (as a shell for an autologin console, if it matters).
The ...
1
vote
1answer
104 views
Setting Apache's PATH environment to match users
Using PHP 5.3 as an Apache module with Apache 2, on OS X 10.7.
When I open Terminal and enter echo $PATH I get:
...
0
votes
2answers
101 views
java_home on centos
I am using a centos virtual machine instance.
I have edited the /root/.bash_profile and set the JAVA_HOME path.
the changes are saved but when I type echo $JAVA_HOME, the command executes but show ...
0
votes
2answers
133 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 ...
0
votes
1answer
106 views
Why can't a certain environment-variable be added to my bash profile?
I am having an issue with running a PHP project called Phing with Cygwin.
It's not a huge problem because I can make it work but I am looking for a reason or a fix so I can do it differently.
In ...
-1
votes
3answers
33 views
Different 'development' environments for different developers
We have three environments: development, staging, and production.
In our configuration variables for development, we set our database to connect to 127.0.0.1 with a set username or password.
...
1
vote
1answer
212 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
71 views
Is is possilbe to use environment variables in sudoers rules?
For example, there is a line defining the rule in sudoers file:
%wheel ALL=(ALL) NOPASSWD: $HOME/bin/ls
is it valid? If not, is there an equivalent way to achieve this goal?
Thanks.
-1
votes
4answers
73 views
exporting variable globally
I can save the IP address of the current server to a variable and echo it out.
# myvar=$(/sbin/ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
# echo $myvar
...
0
votes
3answers
191 views
how to set php SERVER_PORT var to 80, behind varnish?
how to force php to read SERVER_PORT as 80, when apache listens on 8080 and varnish listens on 80 ??
if my apache vhost is set to 8080, SERVER_PORT will always be 8080, this is troubling me a little ...
0
votes
2answers
250 views
Using Apache Environment Variables to set custom ErrorDocument
I've got a set of RewriteCond rules that test for various mobile devices and then set environment variables like "env=device:.iphone" or "env=device:.smartphone" if the useragent matches an iPhone or ...
0
votes
1answer
913 views
How to set env variables and run multiple commands with PsExec?
How can I run multiple commands with PsExec, and how can I export environment variables?
I can run two commands by doing the below, but when I try to export an environment variable the second command ...
1
vote
1answer
163 views
httpd conf environment variables - how do they work? (Centos 6)
I have the following config included in my httpd.conf...
Include ${MODULE_DIR}/utilities/devconf/bo/vhost.conf
where ${MODULE_DIR} is an environment variable that I am setting in my httpd init ...
0
votes
1answer
146 views
environment var not found on SuSe init.d script at boot
I've got a /etc/init.d/tomcat1 script which runs on boot on rc levels 3 and 5. This script calls /usr/local/tomcat1/bin/startup.sh on start.
Although I can manually execute ...
0
votes
2answers
193 views
Commands /etc/init/boot.local get started before some environment variables get initialized
I have OpenSuse 11.4.
I start some on-boot scripts inside /etc/init/boot.local.
Where could I move those scripts so that they would be started after all (most) environment variables got initialized?
...
7
votes
3answers
333 views
Is it possible to change value of $TERM when calling ssh?
On my local terminal, I have TERM=konsole-256color, but not all remote machine I connect to have this definition.
Is it possible to make ssh change the TERM on remote machine? Without changing .bash* ...
2
votes
1answer
96 views
Sudo resetting environment variables
Whenever I use the sudo command, none of my environment variables appear to be preserved.
I've tried modifying the sudoers file, by removing the env_reset specification.
#Defaults env_reset
I've ...
3
votes
2answers
425 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 ...
0
votes
3answers
296 views
Use of Export in Bash Script on CentOS
I am very new to Linux and am having problems with what should be a very simple Bash script in CentOS.
#! /bin/bash
# script to restore the cognos rds from snapshot
export ...
0
votes
1answer
55 views
C CGI invoked by apache 2.2 on Windows 7 cannot read environment variable
I have a C CGI that is invoked by Apache, both running as SYSTEM.
The CGI relies on the setting of WINDIR and TEMPLATES environment variables. It gets the value of WINDIR without any problems but ...
0
votes
1answer
75 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 ...
0
votes
2answers
167 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 ...
1
vote
0answers
70 views
Dynamically Authenticate Apache with LDAP Based on Request String?
It is possible to use a portion of the request URI as an input into mod_authnz_ldap's Require ldap-group directive?
I'm trying to dynamically check access to a bunch of different project directories, ...