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
2answers
461 views

Environment variable not being read

I am running Ubuntu 12.04.2 LTS and am having problems with getting a command to execute. I have set up the variable in /etc/environment which looks like this: FEDORA_HOME="/var/lib/fedora" ...
2
votes
2answers
156 views

Unable to get profile variable using ssh

Unable to retrieve the profile variable using ssh. server2 ==> user apptst ==> bash profile has $APPHOME variable. Was trying to retrieve the value from server1 using ssh but failed. Used options ...
1
vote
1answer
790 views

Setting user environment variables is very slow

I'm using the GitHub for Windows application. Lately I've noticed that starting a PowerShell console from within the GitHub application takes ages. After some digging I've found that the slow command ...
1
vote
3answers
2k views

How can I store encfs6.xml in another location (and still make it detectable)?

How can I make encfs4win search for the encfs6 file in another location? I tried modifying the encfs_mount.cmd file at the end, like so: set ENCFS6_CONFIG=c:/test1/.encfs6.xml %pathtoencfs%encfs ...
1
vote
2answers
1k views

Set three PATHS in Ubuntu

I've been at this all day now, reading every single type of different way to add these lines. It resulted in me being locked out of my profile because I set the .profile wrong. So I'll just ask the ...
0
votes
1answer
42 views

Auditing use of system vars in Win7

I was wondering if there is a way to mount some sort of a hook on a system variable in Win7 which would allow me to trace which application and at what time referenced it. I would like to know this ...
0
votes
0answers
333 views

Path variable broken Windows 7?

I have been trying to compile and execute both Python 2.7 and Java programs on my Windows 7 computer. Both of these have been installed, and I am attempting to run my programs off of the command line. ...
0
votes
1answer
630 views

Ubuntu environment setting for GUI session (or making the same with terminal)

I'm using Ubuntu 10.10 When I log in using normal GUI desktop, it seems that the environment is not the same with the terminal. I modified $PATH and other information in .bashrc. But, this doesn't ...
1
vote
1answer
151 views

What is the significance of the 'Case' in PowerShell's Env: variables?

Why are some of Windows environmental variable names in Proper case, while most are in UPPERCASE? What is the reason that windir alone is in lowercase? Get-ChildItem Env: Sample: Name ...
2
votes
1answer
294 views

Environment variable's address is changing?

Don't ask why I am not posting this at Stack. So I have this small C program. It returns the address of the environment variable specified in argv[1]. #include <stdio.h> #include ...
2
votes
1answer
345 views

Echo string in tcsh with special characters escaped

Is it possible to echo out a string in tcsh such that it is fully escaped, as tcsh would understand? In the same way as printf %q works in bash: % # Create a variable containing a tab character % ...
0
votes
1answer
139 views

Zsh alternative to bash's quick assignment and inheritance trick

There's a trick available in bash allowing you to set environment variable for child process and run it in single line, retaining original values of variable in the shell. For example, in order to set ...
3
votes
1answer
688 views

Does Cygwin import user variables or just system variables?

I can see windows system variables in cygwin with echo $MYVar However, user variables don't seem to work. I'm referring to the variables you set in system properties->advanced->environment ...
4
votes
1answer
727 views

sudo -E not passing all variables

Reading the man pages I expected sudo -E to pass all environment variables to the subshell, but I am not getting the expected results. As expected, awesome: $ export ...
1
vote
2answers
501 views

Can I change the environment on a per-process basis on Windows (like on Unix)?

On Unix operative systems I can start a process with additional environment variables like this: $ DEBUG=1 VERBOSE=3 python myscript.py Does the Windows CMD have an equivalent for this? I'm stuck ...
1
vote
1answer
51 views

Escaping a directory in a $PATH-like list

I'm developing a wrapper for LibGit2, the Git library. And I come out with a problem: Many GIT functions accept path lists, that is, a string composed of a series of paths separated by a token, that ...
1
vote
1answer
3k views

Path variables from system restore point, Windows 7 64-bit

Reading the answer here I don't understand this 'little button' to right of open. Navigate to your C:\Windows\System32\config\RegBack, click the little button to the right of "Open" for "Show ...
1
vote
1answer
415 views

Is it possible to use a Windows environment variable in a Chrome bookmark?

I use a software library whom I often refer to the documentation pages. Those are html pages, therefore I created several bookmarks to quickly access to them. However, when the library version ...
0
votes
0answers
106 views

Set windows system enviroment variable to use the enviroment variable %username%

I'm trying to set a system environment variable to use use the current logged in username. I'm tried the below using the username environment variable but it doesn't work. I'm using "setx /m" on ...
0
votes
2answers
405 views

Root set environment variables

I have a small bash script which downloads a critical file, opens an SFPT connection, puts the file and closes the connection. As you can imagine, my script has some username and password information ...
0
votes
2answers
4k views

Using Call SET to Designate a Variable in a Dos Batch “For” Loop

Trying to use the Call SET to set a variable in a windows batch file loop. Not working but here is the input / output file. trying to assign Var C to equal 1. Batch file: @ECHO OFF for /f ...
0
votes
1answer
31 views

Environment auto-install

When I work, I often have to switch computers or virtual machines which means that every time I switch, I have to set up my (Linux) environment again. My question is the following : Is there a tool ...
16
votes
4answers
10k views

Cannot resolve %windir% / Cannot modify %path% or %path% being reset on boot

See Updates 3 and 4 below for how the issue has evolved My computer (Windows 7 x64, Lenovo Thinkpad T530) is having an issue resolving %windir%. After boot-up, everything works fine. At some ...
0
votes
2answers
3k views

Home directory variable for Windows 8

Is the home directory variable for Windows 8 the same as it was for Windows 7, %UserProfile%?
1
vote
2answers
110 views

Cygwin not cooperating

This is gonna sound very simple for you guys but I've never installed cygwin and the tutorial I used gave no contingency plan for when something goes wrong. I added the path C:\cygwin\bin to my Path ...
1
vote
4answers
1k views

zsh: automatically set environment variables for a directory

Let's say I have a project in: ~/working_dir Whenever I run commands from this directory, I need to have certain environment variables set. So I can export them like so: export VAR=value ...
3
votes
2answers
437 views

Unix environment variables with arguments

I'm trying to set my $EDITOR variable to be emacs with no window, so the command to call it would be emacs -nw. However if I set it like this: export ...
0
votes
1answer
1k views

Update http_proxy environment variable in Ubuntu 12.04

I just updated my proxy username's password and now I want to update the http_proxy environment variable.How can I do it?
6
votes
3answers
5k views

What is the Unix PATH variable and how do I add to it?

Many programming tutorials ask users to add something to their PATH but don't explain what it is. The existing resources that explain the PATH to users new to the command line are not very good. ...
1
vote
1answer
519 views

If you associate a Microsoft Account with a Local Account in Windows 8, will it maintain the original Local USERPROFILE path name?

If you choose to use a Local Account, you get a nice "clean" USERPROFILE path of: C:\Users\username If you then associate a Microsoft Account to that Local Account, will it maintain the original ...
0
votes
0answers
86 views

How to prevent one service from changing the USERPROFILE environment variable for other services?

I am facing a problem on Windows XP with environment variables. Scenario: We have some services installed on an XP machine. These services have login accout set to the Local System acccount. Then ...
1
vote
2answers
858 views

Environment variables not loading on startup

I'm encountering a strange issue where it doesn't look like my environment variables are loading up properly whenever windows starts up. This was actually a pain to figure out what was happening and I ...
0
votes
2answers
207 views

Add a single exe in given directory to PATH environmental variable

Is it possible to add a single program among many in a directory to the PATH environmental variable? Say I have a bunch of programs in D:\utils. Rather than adding D:\utils\ to PATH I want to add ...
1
vote
1answer
436 views

How to save environment variable on my Ubuntu Linux system

I am using Maven to the build process of my Java project. To launch the mvn command in any position within the shell I am using the following command to declare the environment variable in this way: ...
1
vote
1answer
280 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 ...
17
votes
4answers
111k 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
85 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
999 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
698 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
4k 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
649 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
190 views
2
votes
1answer
423 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
432 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
2k 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
76 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
4k 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 ...