A set of dynamic variables that can affect the running processes.

learn more… | top users | synonyms

3
votes
1answer
73 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
41 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
2k 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
2k 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
72 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
93 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, ...
2
votes
2answers
1k 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
208 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 ...
6
votes
5answers
2k 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 ...
34
votes
4answers
1k 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 ...
2
votes
1answer
1k 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?
2
votes
1answer
3k 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
178 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
326 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\ ...
11
votes
2answers
660 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 ...
30
votes
3answers
14k 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
972 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
141 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
233 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 ...
2
votes
1answer
9k 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
207 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
2answers
298 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
424 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. First I tried to install clear library. I've copied the file from the /bin folder and ...
3
votes
2answers
310 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
163 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? ...
2
votes
2answers
103 views

How to get environmental variables of a very short process?

I have a very short process for which i want to check the environmental variables for debugging purposes. The process is instant from a human perspective. The example illustrates it better. Example ...
6
votes
3answers
2k views

How do I set the PATH or other environment variables so that X apps can access it?

How can I set env variables so that KDE recognizes them? How do you set the path in a non-shell environment (KDE)? Unlike the above two questions, I want to know how to do this for GNOME. Or better ...
19
votes
3answers
804 views

Show PATH in a human-readable way

I want to show my PATH environment variable in a more human-readable way. $ echo $PATH ...
2
votes
3answers
1k views

Why do 'ssh host echo $PATH' and printing the $PATH after ssh'ing into the machine give different results?

On a particular host, when I ssh into the machine and enter echo $PATH I get /home/wxy/bin64:/home/wxy/bin:/usr/kerberos/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin and if I ...
-3
votes
1answer
5k views

“not a valid identifier” when I do “export $PATH”

When I run export $PATH in bash, I get the error not a valid identifier. Why? Here's my ~/.bashrc file # ~/.bashrc: executed by bash(1) for non-login shells. # see ...
2
votes
4answers
112 views

$PATH duplication issues

If I do echo $PATH I get the following: ...
0
votes
3answers
2k views

Get environment variable of other user [closed]

Is there a way I can see the environment variable of an other user? I want to do that as root, so permissions won't be a problem I guess. For the user himself, I use echo $PATH or set | grep PATH ...
3
votes
2answers
2k views

How does the path enviroment variable work in linux?

I'm confused how does the enviroment path work under linux, I'm a Linux Mint 15 user. First, I read about editing the /home/.bashrc file and doing a PATH=$PATH:/directory, but I also knew about ...
0
votes
0answers
31 views

Spurious “command not found” [duplicate]

I am in the process of trying to build and install pjsua on my embedded board running linux with a kernel which is a variant of 2.6.18.. The board is booted via nfs from my filesystem. I have built ...
1
vote
3answers
355 views

SUDO: Username condition in sudoers file

I'm trying to allow my user (via sudo, launched in a script) to copy a file from their home to a web directory. Command would be: sudo cp /home/$LOGNAME/file_source /var/www/$LOGNAME_file_dest So ...
4
votes
4answers
2k views

What is the `editor` command in bash?

I was looking for a command that would hopefully open the current user's favourite text editor, because I am writing out some instructions with commands in a blog. I was expecting a command like edit, ...
5
votes
2answers
3k views

Who sets $USER and $USERNAME environment variables?

Also, will these variables always match currently logged-in username (they do on my Debian system)? Can I assume their availability in other Unix(-like) systems? I'm also curious why one would use ...
2
votes
1answer
145 views

Any other way to define an environment variable?

I'm quite new to Linux. Debian Wheezy is now running on my Laptop (64 bits). I recently installed Oracle 11g R2 database for evaluation purpose, and defined environment variables (such as ORACLE_SID) ...
1
vote
1answer
252 views

Executing commands with PHP: using normal user, but its home directory is /root

I'm using a custom compiled installation of Apache + PHP, listening on port 80. Apache is configured to run as a normal user, with the proper settings User and Group of the httpd.conf file. After ...
3
votes
3answers
183 views

Where is the environment string actual stored?

But when we first time we adding a new name,we have to call malloc to obtain >room for a new list of pointers. We copy the old environment list to this new area and store a pointer to the ...
11
votes
4answers
3k views

Why do I have to re-set env vars in tmux when I re-attach?

I mainly work on a mac and ssh/tmux attach to a Linux machine to do my work. I have ssh-agent running on the Linux machine. I have set -g update-environment "SSH_AUTH_SOCK SSH_ASKPASS WINDOWID ...
2
votes
1answer
266 views

Openbox doesn't seem to have correct environment variables set

I've installed Debian 7.0, and then installed Openbox on top of it. I've got some executable files in ~/bin, and this line in my .bashrc and .profile: export PATH="$HOME/bin:$PATH" I can normally ...
4
votes
3answers
13k views

How to change locale environment variable?

I have generated en_US.utf8, et_EE.iso88591 and ru_RU.utf8 localisation files. Now if I try to change any of the locale variables to a ru_RU.utf8 or en_US.utf8, then this does not have any effect: # ...
0
votes
1answer
391 views

Difference between sudo su - user and sudo -iu user [duplicate]

I was wondering if there were any difference (in environment ?) between doing sudo su - user and sudo -iu user From what I know: By using sudo su - user I open a new shell as user, and the ...
5
votes
1answer
140 views

Permanent Environment Variable for all users

I want to have all users on the system to have an environment variable named SPI that points to /usr/local/share_ideas directory. How do I do it?
2
votes
1answer
39 views

Installing packages and tools on a local non-standard directory

TLDR: What environment variables should I update to guarantee that my system has access to everything a package provides when building it on a non-traditional path? I usually don't have root access ...
3
votes
1answer
230 views

Why is uname -M returning an empty string?

On the exact same machine (AIX 6.1), in 2 different login shells (both ksh), with different user IDs, I can do uname -M; in one shell I get the system model. In the other shell I get BLANK! The only ...
1
vote
1answer
75 views

Effect if any of changing LD_LIBRARY_PATH environnment variable on emacs fonts?

The rendering of my emacs fonts changes if I define a specific list of directories under the LD_LIBRARY_PATH environment variable just before I call emacs. I changed this because I wanted to use emacs ...
1
vote
2answers
169 views

How to print shell variables and values to be able to copy/paste them?

In Bash 4.2.25, the set and env output is not escaped, so shell escapes and any non-printable characters won't be copy-pasteable. Take for example this shell session: $ export foo=$'a\nbar=\baz' $ ...
1
vote
1answer
260 views

Why ssh -nq -t can't see my environment variable?

I am executing a command on remote machine with -t flag ( to prevent the command from 'blocking' ) the prompt (somehow it works that way). So I am using ssh -nq -t root@ip but with this, the script ...