Environment variables are system-wide variables which share the same value. These variables are often parsed by the shell when executing commands, and are expanded into their appropriate variable. For example, this allows users to move file locations without needing to update hard-coded paths in ...

learn more… | top users | synonyms

1
vote
1answer
269 views

$HOME environment variable edit

I have a question which might sound quite naive but I would like to confirm the behavior of the $HOME environment variable on the MAC OS X. I would like to know if we can append paths to the $HOME ...
13
votes
4answers
94k views

Easier way to change environment variables in Windows 8? [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? I know that I can edit my environment variables in windows 8 by going to Start -> All ...
1
vote
0answers
83 views

Windows: Monitor Access to Environment Variables?

Programs (on Windows) often expect certain environment variables to be set. However, the name of these environment variables is often not well documented. E.g.: Does Eclipse expect %MINGW_HOME% or ...
2
votes
2answers
2k views

sudo, runuser, su don't work as I expect when run as root with command as “echo $HOME”

When I run these commands it outputs as shown. /root $ sudo -u someuser -i "echo $HOME" /root $ runuser -l someuser -c "echo $HOME" /root $ su - someuser -c "echo $HOME" /root What i expected ...
4
votes
1answer
918 views

Escaping Variable in Cat

I'm trying to write a shell script over ssh via a bash prompt. The shell, however, insists on interpreting any variable I want to write instead of writing it directly to file. For example, cat ...
1
vote
1answer
1k views

How do I set an environmental variable with a dot?

I couldn't find a way to set an environmental variable with dot (.). For example: export mule.home=/Users/chandra/mule/ export {mule.home}=/Users/chandra/mule/ export $mule.home=/Users/chandra/mule/ ...
0
votes
2answers
648 views

How do I stop the command window from automatically closing at the end? [duplicate]

Possible Duplicate: Batch file that runs cmd.exe, a command, and then stays open at prompt I have a set of environmental variables that I have to run before I can run other operations. I ...
1
vote
3answers
3k views

Term Enviroment Variable not set, when executing a Bash File via SSH

i am trying to run a bash script on a remote machine. If I open a ssh connection in a terminal, i can easily run the script. But when i run it like that: ssh user@ip < /etc/script I get an ...
0
votes
1answer
628 views

In linux, how can we change bash environment variables using initialize script?

We know that we can change bash's environment variables, for example PATH, using initialize script, for example .bashrc. Just writing PATH=<VALUE> and you will get what you want. But, consider ...
1
vote
1answer
178 views
2
votes
1answer
388 views

Can I change local environment variables for a running process?

Suppose I have a continuous process running that reads an environment variable: export APPLE=abc123 watch echo \$APPLE Now, is there any way to change the value that's being read during execution? ...
1
vote
3answers
414 views

How to find out environment variables set after logging into a shell session

How can I find out the environment variables set after logging into a shell session? My two dummy solutions have been so far as follows: _VariableName1="VarValue1";export _VariableName1; ...
2
votes
1answer
1k views

How to set environment variables for Xfce windowing environment

We're using Ubuntu 12.04.1 with Xfce 4.8. We have a script which sets environment variables needed by our software. In the past, I figured out how to run this script in the Xfce start up so that ...
0
votes
1answer
74 views

How to set env variable for all process?

I'm working on Linux, Can anybody please help me to set a env variable on Linux that will be available for all process running on the same machine?
0
votes
1answer
3k views

Adding an environment path to the Visual studio command prompt

Does the following add an environment path? setx path "%path%;C:\foo" It will leave any existing paths alone? i.e nothing will be deleted? If I open the Visual Studio Command Prompt and run the ...
3
votes
2answers
2k views

Transferring environment variable through SSH / quoting in bash/sh/csh/tcsh

I want to transfer an environment variable over SSH. The "correct" way is using SendEnv/~/.ssh/environment, but that requires the server to support AcceptEnv or PermitUserEnvironment, which it does ...
1
vote
3answers
8k views

Editing the /etc/launchd.conf file in OS X

I am trying to run Android project using Maven in Mac 10.7.4, for that I need to set environment and path variables. This are the steps I need to follow to run android using Maven Maven 3.0.3+ ...
2
votes
3answers
2k views

Why java -version returning a different version than the one defined in JAVA_HOME?

I am trying to set JAVA_HOME in Ubuntu OS. I have copied jdk 1.7 in /usr/lib/jvm and set JAVA_HOME in /etc/profile file. Contents of /usr/lib/jvm folder are as follows : shekhar@ubuntu:~$ ls ...
0
votes
0answers
108 views

Why does %ProgramFiles% not work in startup paths?

A program (allowing me to zoom with my trackpad) ran at startup on my computer. Then I disabled it through Administrative Tools > System Configuration > Startup. When I re-enabled it that same way it ...
6
votes
3answers
4k views

Wrong java -version being reported

I am running Windows 7 Professional x64 and have the following Java versions installed: x64 C:\Program Files\Java jdk1.6.0_24 jdk1.7.0_04 jdk1.7.0_07 jre6 jre7 x86 C:\Program Files (x86)\Java ...
5
votes
1answer
1k views

Is there a way to see current environment variables for a process with WMI?

I have a weird problem where something is changing my path in my login session. The permanent path in the registry is not changing. I wanted to monitor changes to the explorer.exe process's ...
1
vote
0answers
260 views

My path keeps getting truncated and I have to restart explorer.exe to fix it

I have a mysterious problem on my machine. Periodically I find that my path on Windows 7 machine gets set to ...
2
votes
0answers
1k views

How can I pass environment variable in nginx conf?

I have nginx conf as location /static/ { alias $HOME/code/python/vlists/vlists/static/; # if asset versioning is used if ($query_string) { expires max; ...
1
vote
2answers
203 views

Where do the environment variables for an elevated cmd.exe process come from?

The environment variables shown by the SET command can be notably different depending on the privilege level of the command prompt session. Moreover, it seems that any program run with administrative ...
4
votes
2answers
9k views

WINDIR environment variable resolves to %SystemRoot% and not C:\windows

Some time ago I manually changed the WINDIR environment variable to test something in a legacy program I was working with (should have done this on a VM rather than my desktop :/ but it's too late ...
7
votes
5answers
6k views

Setting environment variables in OS X for GUI applications

How does one set up environment variables in Mac OS X such that they are available for GUI applications without using ~/.MacOSX/environment.plist or Login Hooks (since these are deprecated)?
4
votes
2answers
681 views

Need to truncate the %username% variable in windows 7 to seven characters

I use a script that generates a session name for out AS400 sessions based on the system %username%, the problem is that if the username is over 7 characters long the connection will fail. The session ...
4
votes
2answers
192 views

How to create a directory symbol like ~ for HOME?

I've got a directory path for which I want to create a shortcut, like ~ for a users home directory. I've tried the ENV variables, and I could match $<something> for a path, but I dont want ...
1
vote
1answer
232 views

How to set and print environment variable in Power Shell?

I work on Windows 7 and I wont to know how to set and print environment variable in Power Shell (for example $PATH)?
4
votes
1answer
320 views

Is there a way to reload environment variables in emacs?

When emacs starts it inherits the environment variables that are set at the time, either in the launching application (Linux) or in a central repository (the Windows registry). On Windows, ...
3
votes
2answers
437 views

How to capture session name into tmux variable?

I want to execute an external command based on the value of my session name. I know that the :display-message '#S' will give me the session name, but I want to have that name automatically sent to my ...
3
votes
1answer
2k views

Global vs User Windows Environment Variables

I need to understand how Global vs User variables works in windows. Case 1: If the same variable is defined at user and global section what is the behaviour? E.g. I have defined a %PATH% variable ...
2
votes
1answer
6k views

Modifying the Path environment variable is not working

I have my PATH variable set on my Windows 7 machine, and everything appears normal when I do echo %Path% The paths look fine and are separated by ";" like normal, however, when I try to run any ...
2
votes
1answer
356 views

Is there any way to recover an environment variable?

I recently installed openssh on my Windows 7 machine. The install overwrote my Path variable and blew away all of the other paths I use in the command line. I probably have 50 paths in there and it is ...
0
votes
0answers
85 views

Access environment variable on both OSX and Win7

I'm fairly sure this is impossible because of syntax issues, but here goes anyway... I'm using dropbox to sync some files that I need to access in both windows and osx. In the program I need to ...
1
vote
1answer
651 views

installing GNU GUILE

I want to install guile at a custom location so downloaded the source code and am trying to configure it from with the following command: ./configure ...
2
votes
1answer
522 views

Can't save PATH or JAVA_HOME variables, Oracle Linux 6

I am on Oracle Linux 6 and I am trying to add the path: /root/jrockit-jdk1.6.0_33-R28.2.4-4.1.0 to the PATH and JAVA_HOME variables. So, I login as root and I try: export ...
1
vote
1answer
82 views

Add paths to environsment and launch and app

I want to add some shell actions to execute some apps. These apps require some environment set from complex batch files. That is, my action should call: c:\xxx\SetPath.bat c:\yyy\startApp.exe The ...
3
votes
2answers
2k views

Is it safe to change %TEMP% and %TMP% to a custom location?

I have an SSD drive that is nearly full and I'm looking for options to free up space. I noticed C:\Users\myusername\AppData\Local\Temp has several gigs of data. Is it safe to change the User ...
2
votes
0answers
593 views

Is there a way to expand environment variables in *.ini files?

I have to work with an ini file, but I need a value set in the file to be based on an environment variable. For example, ... [program] dir=%SystemDrive%\SomeFolder\ ... In this case, ...
8
votes
3answers
522 views

What is the simplest scriptable way to check whether a shell variable is exported?

For some shell sessions I want to be able to print a warning flag if a shell variable is not set and exported. It is fairly simple to do something like this to print "Error" in the prompt if SET_ME ...
3
votes
1answer
415 views

Is it valid for %Comspec% to have multiple entries?

I'm working through troubleshooting a problem on my laptop, and I've noticed something odd - my COMSPEC environment variable has two values. Output from typing SET at a command prompt: ...
0
votes
3answers
2k views

How to change the PS1 value.

I am logged in as the root of a Linux 2.6.18 machine. I changed the value of PS1 as: export PS1="$PWD> " It works and hardcodes the command prompt as the home directory followed by a >. Now ...
1
vote
3answers
9k views

Why can't I use %USERPROFILE% in %PATH%?

On my Windows 7 machine, using the System Properties > Environment Variables tool, I try to add %USERPROFILE%\Bin to the system variable PATH. For some reason, that doesn't work, even though ...
0
votes
1answer
143 views

Where do I put environment variables that I want set on boot (or login)? [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? Where do I put environment variables that I want set on boot (or login)? In particular, I ...
8
votes
2answers
5k views

Why do I have three My Documents folders?

I'm trying to fix my profile on Windows 7. Currently %USERPROFILE% points to C:\Users\myUsername My Documents is also at C:\Users\myUsername \\profileServer\profiles$\myUsername has TWO "My ...
0
votes
3answers
94 views

How to retrieve environment variables from XP?

What is a way for a novice user to retreive the environment variables on an XP machine? I need to ask a user to do this but it needs to be very simple and easy to copy into an email.
0
votes
1answer
970 views

Set vim's internal shell path

I'm trying to configure the $PATH env variable of vim's internal shell. I have commands that update the $PATH several times during a session. I see that vim inherits my shell's first $PATH - but not ...
2
votes
2answers
2k views

Windows 7 environment variable not removable

I installed MKS on Windows 7 and with it MKS Toolkit was silently installed. This also seems to set some global environment variables like "TERM" and "TERMCAP". As these variables won't work together ...
4
votes
2answers
904 views

How do I set the TEMP environment variable for the “Network Service” user?

We have a system that uses Path.GetTempFile and Path.GetTempPath calls to work with temporary files fairly frequently. This system also runs as the "Network Service" user. We're finding that we're ...