A set of dynamic variables that can affect the running processes.
2
votes
2answers
30 views
From where does printenv command read environment variables which I have not defined?
The printenv command lists a number of environment variables most of which I have not defined. From where does it read these values? Where are the environment variables stored in Linux? strace ...
1
vote
2answers
35 views
How to loop through xargs where each script uses a common env variable
Is it possible to initiate 10 of the same shell scripts which also initiate more copies, and have them all use the same env variable?
For example:
script.sh:
#!/bin/bash
export ...
0
votes
1answer
16 views
ENV variables in relation to xargs loops
Are env variables (set using export) treated differently when the same script is run multiple times simultaneously? That's a weird question, so here's an example I built out which is similar to my ...
0
votes
0answers
48 views
Application does not see environmental variables
I am running following 32 bit command on 64 bit system:
LIBGL_DEBUG=verbose glxinfo32 -v -t | head -5
It's output says
direct rendering: No (If you want to find out why, try setting ...
1
vote
2answers
28 views
Running a program to output in Dutch
I'm running KDE Arch linux and trying to update my system using pacman and have it output in Dutch.
I've tried the following
sudo LANG=nl_NL.UTF-8 pacman -Syy
sudo KDE_LANG=nl_NL.UTF-8 pacman -Syy
...
-3
votes
1answer
38 views
where is this HOME environment variable and what do I have to add -H too it?
I recently attempted to run a boot up script which failed I didn't know why it failed so I posted a question about that here.
chkconfig bootup script failing, script runs good manually
Where the ...
2
votes
1answer
16 views
How to avoid warnings from subshells if the function in PROMPT_COMMAND is not defined?
I'm using the following code to get a nice prompt (including git information etc.):
function set_prompt {
# magic happens in here ;)
}
export PROMPT_COMMAND='set_prompt'
However, sometimes I ...
1
vote
2answers
68 views
modify user-defined System Variables(that is a number) of remote Server machine using ssh?
I want to modify the value of a System Variable of a remote server .
The IP of server is 172.16.22.53.
The server runs Windows OS,and Cygwin instlled in it.In ...
2
votes
1answer
41 views
Setting the TOPCOLORS environment variable
I don't seem to be able to find any examples on the Internet for this environment variable, which top will apparently read and use to display colours.
How would I set this variable correctly so top ...
2
votes
1answer
33 views
bash set env variable is not working in pdsh
I am using PDSH to control multiple servers through one command line.
The command below works fine on individual servers, but when I enter the export command within PDSH, echoing it back is empty.
...
5
votes
4answers
110 views
How do I use which(1) with the system's default $PATH?
I would like to use which with the system's default path, ignoring any embellishments from the user's shell configuration files.
Motivation
I am attempting to write a script to find the system's ...
1
vote
1answer
35 views
exported variable disappears when I open a new terminal
I type this: export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk so that I can access that directory by typing cd $JAVA_HOME but every time I close and open the terminal I have to do this again and ...
1
vote
1answer
47 views
How to retrieve environment variable from string name in KSH
I've the following variable :
x="envVar"
and 'envVar' is the one of my environment variable's name containing a path (of a folder by instance).
So I'd like to do
cd $x
but it doesn't work.
...
1
vote
3answers
120 views
Set environment variable automatically upon SSH login (no root access)
The situation:
I run Ubuntu 12.04 LTS on a virtual machine.
I regularly have to connect to my account on a university server, I do this by opening up terminal and using ssh -Y [email protected].
...
1
vote
2answers
128 views
rkhunter warn me about root.rules
I run :
:~$ sudo rkhunter --checkall --report-warnings-only
One of the warnings I've got :
Warning: Suspicious file types found in /dev:
/dev/.udev/rules.d/root.rules: ASCII text
and ...
0
votes
1answer
65 views
How to undo DISPLAY export in linux?
I have exported my X display to another computer using this command:
export DISPLAY=xxx.xxx.xxx.xxx:0.0
How can I undo it?
1
vote
4answers
104 views
How do I run a program in a fresh shell?
I have a program that does a LOT of env manipulation. It sets PYTHONPATH and LD_LIBRARY_PATH and stuff like that.
This program needs to run ANOTHER program, but in a fresh env, without all of the ...
0
votes
1answer
25 views
How do I display contents of a file where PATH environment changes are made?
Say I change the $PATH environment variable. If I'm asked to display the contents of the file where this change happened, how would I do this?
0
votes
3answers
41 views
Unset http_proxy enviroment variable
Updated 11/03: After doing some test with your suggestions, I only can
be sure about one thing: there is something related to the graphical
environment, because if I login through ssh or using ...
3
votes
3answers
104 views
Adding prefixes/suffixes to file names without typing it all over again?
I would like to do something like the following
$ tmp=name*
$ mv $tmp new_$tmp
$ ls new_*
$ new_name-with-stuff-i-dont-want-to-type name-with-stuff-i-dont-want-to-type
Setting the environment ...
2
votes
1answer
76 views
Restrictions of /etc/profile in Gnome
I have an issue which bugs me for a long time. I'm using the Intel C++ compiler which includes shell scripts to set up environment variables for library paths, include paths and more. Sourcing these ...
4
votes
1answer
80 views
Escape hash mark (#) in /etc/environment
I am adding an env variable to /etc/environment but because the variable value contains # sign, string is striped.
MYSQL_PWD="something#no"
Now if I do env above code yields MYSQL_PWD=something. ...
3
votes
3answers
138 views
Setting hostname variable right after SSH login
I have set of some (third-party) shell scripts, which are supposed to connect to remote host and start some daemons (hadoop, if that matters). These scripts rely heavily on hostname in order to ...
0
votes
0answers
91 views
Removing path in env variable PATH permanently [duplicate]
I have recently installed Code Sourcery's ARM EABI Tool Chain. All the executable binaries were installed in a separate folder.
I thought that the bin path will be added to env variable $PATH. ...
2
votes
1answer
45 views
Checking the order of items in a shell environment variable
I am wanting to check that a certain directories always appear after other directories in an environment variable.
List items are separated by a colon, as with the PATH variable.
This is not simply ...
3
votes
1answer
27 views
Appending values to environment variables from within Emacs
I am new to Elisp. I would like to do the following in my init file:
; Retrieve the value of LD_LIBRARY_PATH
; Append '/path/to/some/lib/:'to it
; Save the new value of LD_LIBRARY_PATH
So far I ...
1
vote
1answer
40 views
Launching an application with an user environment
If I launch eclipse from the command line, the application is aware of the environment variables of the user (e.g. PYTHONPATH) and sets up the interpreter accordingly with Auto Config. This is not the ...
1
vote
1answer
104 views
How to assign result of sed to variable
Below is a complete copy of a demo I'm using to to figure out to get the sed command to get rid of the spaces in a persons name, and compress it down to not have spaces.
Once this is done, I want to ...
2
votes
2answers
214 views
Exporting a variable with dot (.) in it
How to export a variable which has dot in it. I get 'invalid variable name' when I tried :
export my.home=/tmp/someDir
-ksh: my.home=/tmp/someDir: invalid variable name
Even escaping metacharacter ...
2
votes
3answers
56 views
Is it a good idea to put environment variables to /usr/local/bin
I'm using aws cfn to start ubuntu instances, and I need to pass variables provided in cfn launch script to the scripts on the instance. For example, I may pass "db-server=db-2.domain.com" and there is ...
4
votes
2answers
41 views
how to prevent exported environment variables to be recognized/accessible by a child shell (bash)?
So, I need to prevent loads of exported variables to be recognized by a child shell.
The problem is an application (Wine+UDK) wont build projects with too many (>65535) bytes on the environment, ...
1
vote
1answer
73 views
How can I keep *all* environment vars for a specific command in sudo?
I have a script that sets several environment variables and then finally calls another script using sudo.
The script run with sudo must be able to pick up those variables, and I'm not always going to ...
4
votes
1answer
96 views
Setting user environment variable permanently, outside shell?
Is it possible to set up an envinronment variable that can be accessible from any shell, not an specific one, and that doesn't decay as soon as your session ends?
I'd like to set up a NODE_ENV ...
5
votes
5answers
344 views
How is sudo set to not change $HOME in Ubuntu and how to disable this behavior?
On Ubuntu 12.04, when I sudo -s the $HOME variable is not changed, so if my regular user is regularuser, the situation goes like this:
$ cd
$ pwd
/home/regularuser
$ sudo -s
# cd
# pwd
...
32
votes
4answers
991 views
What exactly is an environment variable?
I know that VARIABLE=value creates an environment variable, and export VARIABLE=value makes it available to processes created by the current shell. env shows the current environment variables, but ...
1
vote
1answer
251 views
bash: export: `--wait': not a valid identifier
When I run git-sh from my terminal it works fine. But I get the following warning.
bash: export: `--wait': not a valid identifier
What is this and how do I get rid of it?
1
vote
1answer
1k views
How to set Oracle Java's JAVA_HOME in Fedora 19
I just installed Fedora 19 and managed to get FedoraUtils installed. So I chose java oracle. after installation I could see in the FedoraUtils list that oracle java (installed) but I can't see the ...
2
votes
1answer
78 views
Screen - inherit current window's environment
In GNU Screen, how can I create a new window whose shell inherits the environment of the shell in the current window?
The usual Ctrl+A C doesn't seem to do this.
3
votes
1answer
85 views
How to set the path OSX applications use
I'm running Mountain Lion 10.8.4, and have my environment all customized through ~/.profile so that when I run GUI apps like Sublime Text or Eclipse from the command line
open /Applications/Sublime\ ...
7
votes
2answers
245 views
What's the best distro/shell-agnostic way to set environment variables?
The question says it all. I currently use Arch Linux and the zsh, but I'd like a solution that (at minimum) works both on VTs and in xterms and also (hopefully, preferably) will continue to work if I ...
15
votes
3answers
2k views
What does “LC_ALL=C” do?
What does the C value for LC_ALL do in Unix-like systems?
I know that it forces the same locale for all aspects but what does C do?
4
votes
7answers
231 views
how to share environment variables between shells like globals related to a master pid?
So, I need to share environment variables between shells, and that the changes on the variables be promptly recognized by all shells, like global variables. But they must be related to a master pid, ...
1
vote
1answer
96 views
Why does export not seems to affect child shells?
if I have
$ x='This is a String'
$ export x
$ xterm &
[3] 14089
The child process doesn't seem to respond to
$echo $x
$
Update: The FIRST time I export the variable it seems to span a ...
3
votes
2answers
140 views
Which Debian package does /etc/environment come from?
I know that /etc/profile is installed by base-files, but it doesn't look like this package installs /etc/environment:
$ dpkg -S /etc/environment
dpkg-query: no path found matching pattern ...
0
votes
1answer
2k views
bash setenv command is not found
every body I am new in centos server I am getting a error while using following command
setenv CLASSPATH /path/mysql-connector-java-ver-bin.jar:$CLASSPATH
error is
bash setenv ...
0
votes
2answers
101 views
gmrun stopped searching user added path
gmrun started ignoring the PATH variable I defined in ~/.bashrc for no obvious reason. Anyone has any idea how I can find out a way to solve this annoying problem?
EDIT
I have not found the ...
2
votes
1answer
127 views
How to source correct startup scripts on interactive, non-login shell
I'm trying to set up a sane/usable environment in a barebones OpenSolaris-derivative (OmniOS, a distribution of Illumos/OpenIndiana). I have all the plumbing code I need in .profile, .inputrc, and ...
0
votes
3answers
112 views
TERM variable in chroot
I've created a chroot with the help of jailkit and now I'm trying to install some other libraries and tools.
The first library I try to install, is the clear library. I've copied the file from the ...
3
votes
2answers
154 views
Setting environment variables for system users
I have a couple of system users that have no password set, login disabled and no home directories. They are used solely to run FastCGI processes for a couple of websites.
I want to avoid hard coding ...
3
votes
2answers
77 views
Current environmental variables of a process
This question relates to this answer.
Is it possible to get the current (not initial) environmental variables of a process by making a child process and checking its initial environmental variables?
...