Tagged Questions
0
votes
2answers
24 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 ...
0
votes
2answers
51 views
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 ...
0
votes
0answers
63 views
Export system wide env variables at boot
how can I export a list of env variables at server startup so they can be reached system wide and without having to login with a system user ?
I've used /etc/profile to export this list of variables ...
0
votes
1answer
181 views
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 ...
0
votes
1answer
27 views
Setting Env Vars in tcsh
Please tell me why I can't set my env var by modifying ~/.profile?
[104] whoami
user
[105]% cat .profile
. /app/share/Profile
# add any personal customizations after this line
set ...
0
votes
1answer
29 views
Provide credentials to process in a safe manner
On system startup I need to launch a process which requires credentials for other services (database etc.) to interact. I obviously don't want to store those on disk for security reasons.
I'm trying ...
0
votes
0answers
41 views
Path erased in Debian [closed]
I'm trying to deploy a rails app in Debian, using Apache/Passenger. I was trying to fox a problem with some GEMs and in the process I put executed this in console: export ...
5
votes
1answer
221 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 ...
5
votes
1answer
246 views
Setting $PATH for weberver user
I tried to add $PATH for all users including the webserver user (i.e. www-data) with different methods such as editing /etc/profile, /etc/environment, etc. In all cases, it works in terminal, but not ...
2
votes
1answer
184 views
How to add new path to $PATH variable in a post-installation script of RPM?
I want to automatically add a new path to the $PATH variable each time when my RPM package is installed.
I tried to use a post-installation script in the my RPM. Here is the part of RPM spec file ...
1
vote
1answer
71 views
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. ...
2
votes
5answers
1k 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
185 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 ...
3
votes
3answers
957 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 "/etc/profile.d/". However when I start this service using the service command, it ...
0
votes
2answers
371 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. ...
2
votes
2answers
2k 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 ...
1
vote
1answer
152 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 ...
2
votes
3answers
715 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
164 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 ...
2
votes
1answer
480 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
...
0
votes
2answers
658 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 ...
1
vote
1answer
421 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)
. ...
-1
votes
4answers
151 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
...
10
votes
4answers
2k 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* ...
1
vote
1answer
228 views
ulimit equivalent for all of a user's processes?
I am the unpopular guy who has brought down our high-memory linux machine twice this past week because some processes I have been running ate up way more ram then expected. One way around this would ...
3
votes
2answers
437 views
Linux (Ubuntu) environment variables, shells and security
I'm attempting to understand some concepts surrounding security and environment variables for a web application running under Apache on Ubuntu 10.04 Server.
I have a few applications that I would ...
4
votes
2answers
395 views
Where to specify JAVA_HOME to make it visible for apache?
It's CentOS 5. I created /etc/profile.d/java.sh file where I set and export JAVA_HOME. Everything works fine in terminal.
When I'm trying to get this environment variable from PHP under Apache I get ...
2
votes
2answers
11k views
How to set $LD_LIBRARY_PATH in Ubuntu?
I need to do this:
On linux, we have to find a few
dynamic libraries which are not on a
standard location. We have to set
$LD_LIBRARY_PATH to /path/to/sdk/lib
How can I do that in Ubuntu ...
0
votes
3answers
43 views
Environment for specific application
Is it possible to specify environment variables for a given application only? So that environment variables are set automatically when the application starts ('VAR=VALUE myapp' is not what I want).
...
2
votes
1answer
2k views
'pargs' command in FreeBSD or Linux
What's the FreeBSD (or Linux) equivalent to the 'pargs' command, available in Solaris? Many times I want to know what are the environment variables for a given process space, with no help from these ...
4
votes
2answers
449 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 ...
0
votes
2answers
2k views
How to set the ery globap $PATH in Ubuntu 10.04 Server?
On Ubuntu 10.04 Server, where can I adjust the essential $PATH environment variable value which will all applications and all users see?
2
votes
2answers
3k views
How to tell start-stop-daemon to update $HOME and $USER accordingly to --chuid parameter
I'm trying to run a service that uses $HOME and $USER environment variables. I could set them in service itself, but that would only be a temporary solution.
Let's say I have a script test.sh with ...
2
votes
3answers
833 views
/proc/pid/environ missing variables
google is giving no love on this one today, so I turn to the experts...
I'm currently hacking together a script that relies on the /proc/pid/environ feature in Linux (RHEL 4) to check for a ...
1
vote
2answers
2k 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 ...
1
vote
2answers
4k views
PYTHONPATH environment variable…how do I make every subdirectory afterwards?
I currently do this:
PYTHONPATH=/home/$USER:/home/$USER/respository:/home/$USER/repository/python-stuff
How can I make it so that the PYTHONPATH can include everything subdirectory?
PYTHONPATH = ...
1
vote
4answers
441 views
How do I have “hostname” and “current user” in my scripts , for linux?
Suppose I want to edit /etc/profile
I want this:
PYTHONPATH = /home/CURRENT_USER/
How do I have a "variable" that will automatically fill in the current user?
What about hostname? Aren't these ...
1
vote
5answers
4k 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 ...
1
vote
5answers
572 views
How can I ensure that an environment variable is set for a user in a bash session?
How can ensure that a environment variable is set for a user? I have
MYVAR=whatever
export MYVAR
in the ~/.bash_profile but a report from the user suggests that it hasn't worked for them. What ...
28
votes
8answers
18k 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 ...
2
votes
5answers
520 views
Why the same user has different PATH value on linux server?
I logged on to my Linux server (Redhat AS4) through SSH as the user 'guest', then run the command echo $PATH, and the output is /usr/local/bin:/bin:/usr/bin.
However, when I run the command su - ...