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

3
votes
1answer
812 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 ...
2
votes
1answer
754 views

Environment variables have different values depending how CMD.exe is launched

I have a command setup in the Registry as a folder association, so I can shift + right-click any folder and open a VS2010 prompt there, instead of having to open a command prompt and then CD to the ...
1
vote
1answer
379 views

Setting HOME variable in RHEL6 system wide

Where does the HOME variable get set in RHEL6 (SL6.1)? On one system all users get HOME set to /home/username/, i.e. with the trailing slash, which I don't want, so I need to remove it.
4
votes
3answers
5k views

Launch Windows program with custom environment variable

My JAVA_HOME on my dev machine - which is Windows 7 Pro 64 Bit - points to a 64-bit Java, and that's fine in general. However, I just installed a program - to wit, the FlashDeveloper IDE - for which ...
0
votes
0answers
186 views

Show the %username% for the logged in user in an elevated command prompt instead of elevated users %username%?

On a Windows Vista Business machine, I have Windows Task Scheduler task set to run everytime any user logs in. The task runs as a certain elevated admin user because the script is being executed from ...
13
votes
3answers
16k views

How do I see a list of all currently defined environment variables in a Linux bash terminal?

In a Linux bash terminal, there are often many environment variables that have been set, like $PATH and $HOME. Is it possible to see all of the environment variables that have been set? How?
1
vote
1answer
156 views

Accessing external HDD on different Windows computers with the same path

I have a external HDD and have a folder in it called icons\ which stores all the custom icons (yes, I'm nostalgic!) for the different folders on my drive. But when I open my hard-drive on a different ...
0
votes
1answer
669 views

Environment Variables and Shell Rc File [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? I am trying to automatically establish a connection with Amazon s3 using keys. This ...
0
votes
2answers
390 views

Passing optional extra environment settings to the shell at Konsole launch time

I have a bunch of different "hats" on my computer, including multiple on-the-go projects (e.g., $work, a few projects on github, some on Sourceforge, some I'm involved with, some I just follow, etc.). ...
0
votes
1answer
106 views

COMP_LINE not set despite bash completion being installed

I'm using homebrew's bash completion package on OSX, which is installed in /usr/local/etc/bash_completion. It's working fine, but there are many extensions for it which rely on various environment ...
2
votes
1answer
7k views

TEMP environment variable occasionally set incorrectly

Occasionally, I find my TEMP and TMP environment variables set to C:\Windows\TEMP. They should be set to %USERPROFILE%\AppData\Local\Temp, and are configured correctly in System Properties. This ...
2
votes
1answer
278 views

Java: compile and run hanging at command prompt

I'm having an issue that I'm hoping someone can help with. I'm working on netbook running WinXP Pro SP3, 1.6GHz & 1GB of RAM. I've got a relatively simple java program that I'm able to ...
2
votes
2answers
2k views

Escaping %’s in file-/folder-names at the command-line

Does anybody of a way to access files and directories that have a % in their name (which is valid) from the command-line? Specifically, if there are two %’s and the text between them happens to ...
14
votes
2answers
17k views

Environment variables in bash_profile or bashrc?

I have found this question [blog]: Difference between .bashrc and .bash_profile very useful but after seeing the most voted answer (very good by the way) I have further questions. Towards the end of ...
1
vote
1answer
1k views

HOMEPATH not defined when running cmd as administrator (Windows 7 x64)

The application I want to use needs the HOMEPATH environment to be set in order to work flawlessly. It's usually no problem because it's set by default. Here's the cmd dump: C:\Users\xxxx>set home ...
1
vote
2answers
2k views

Win7: messed up system - set too long path variable

I just messed up my Windows 7 Enterprise 64-bit. I tried to install CMake - and during installation i got an error saying something like it can't set the path variable, because it is too long (I ...
1
vote
0answers
337 views

Maintain select Windows environment variables in text file

I'm working on several Windows computers (mostly Win7) and like to carry my configuration around with me. That configuration is mostly development stuff, like: Where is the main Mercurial repo on my ...
3
votes
1answer
1k views

Will PROCESSOR_ARCHITECTURE Environment Variable Identify as 32 Bit on a 64 Bit Machine with a 32 Bit OS Installed?

If I had a 32 bit version of Windows installed on a 64 bit capable machine, will the following command return "x86"? echo %PROCESSOR_ARCHITECTURE%
3
votes
1answer
794 views

~/.bashrc not sourced in a new lxterminal window

I added some lines to my ~/.bashrc like export JAVA_HOME=/opt/jdk1.6.0_22 I sourced it: $ source ~/.bashrc $ env | grep 'JAVA' JAVA_HOME=/opt/jdk1.6.0_22 Then I created a basic bash script under ...
2
votes
2answers
5k views

LANG and LANGUAGE environment variable in Debian based systems

It seems both the LANG and LANGUAGE environment variable are used by some programs to determine their user interface language. What are the exact semantics of these variables and where can I read ...
3
votes
2answers
3k views

How can I find out where an environment variable (like PATH) was set?

I have a xterm with the bash shell in linux. When I echo $PATH, it is showing a directory and I want to know who put this directory in the PATH. How can I find out? Thanks!
0
votes
1answer
201 views

Is there a “FORCMD” variable (like “DIRCMD”, “COPYCMD”, etc.)?

The dir command checks for a dircmd environment variable for default arugments to use. Likewise, the copy and move commands check copycmd. Is there a corresponding variable (by any name) for the for ...
0
votes
1answer
40 views

How can you use the domain of the client connected over ssh in the shell?

Is it possible to get the users ip address, domain name, or host-name of an established ssh connection in the shell? For example, when I connect over ssh the first printed line says something like ...
0
votes
1answer
10k views

How can I refresh my PATH variable from the registry, without a reboot, logoff, or restarting explorer?

I've made some changes to the %PATH% variable in the registry. Now, I'd like to see those changes applied without having to go so far as a logoff, reboot, or reload of Explorer. Is there a way this ...
2
votes
1answer
229 views

Git, Powershell, %HOME% and multiple repos

I'm going to start off by saying that I'm not particularly good with either git or Windows. However, I've been successfully using msysgit on Windows 7 for a while now, keeping track of a number of ...
10
votes
1answer
11k views

How can I permanently append an entry into the system's PATH variable, via command line?

What I need to do: Append a folder to the %PATH% environment variable at the SYSTEM level. Make the change permanent. How I need to do it: Using the command prompt, or another method by which ...
3
votes
2answers
1k views

In which places is the Windows %PATH% defined? [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? I ran a third-party install script which added its folders to the %PATH% variable in the ...
0
votes
1answer
83 views

Where was environment variable set?

I've an environment variable ($M2_HOME) which I'd like to modify. The thing is, I can't find where I originally set it - this is quite bizarre as I exclusively use ~/.bash_profile. Are there any ...
13
votes
5answers
11k views

Overcoming the 1024 character limit with setx

I am trying to set environment variables using the setx command, such as follows setx PATH "f:\common tools\git\bin;f:\common tools\python\app;f:\common tools\python\app\scripts;f:\common ...
1
vote
1answer
543 views

Environment variable set in batch isn't expanded in shortcut

How can I make my environment variable (set in batch file) visible in application executed right after setting this envvar? Here's the scenario that I use: In my external script (not quite ...
2
votes
2answers
695 views

Variable Names Between Called Batch Files

Let's say I have two batch files, foo.bat and bar.bat, that are located like so: root\foo.bat root\grub\bar.bat Let's also say that both files contain a line that sets a variable, like so: set ...
2
votes
2answers
3k views

Setting proxy via http_proxy on Mac

I am using an HTTP proxy on MacOS 10.7 (which works for Safari.app, when set in the system preferences). I'm now trying to set the proxy for command-line applications using the $http_proxy environment ...
1
vote
1answer
435 views

Copying Environment Variables in Windows XP

How can I copy the value of an environment variable into another environment variable? I'm updating a DOS batch script for use on Windows XP. Let's say that I have environment variable FOO, which ...
1
vote
1answer
78 views

Gentoo Linux global environments for root

I'm confused with setting variables in /etc/env.d directory. When I write "echo $PATH" from user - it's print me all variables that set it myself. But from root I see one... Where should I set ...
0
votes
1answer
780 views

Shortcut target maximum character exceeded

Is there a way to manage the limit of character in target in shorcuts? I need to add more commands in a target (to set environment variables) and I can't!
0
votes
1answer
271 views

Getting man path through Vim

So, I've set up Vim as my default man viewer. I also have NERDTree starting up automatically - but I could really do without NERDTree showing the location the man pages every time I check man. I've ...
1
vote
0answers
227 views

Creating a shortcut in launcher to run a terminal command with more than one parameter as argument

How do you create a shortcut in launcher that lets you run a terminal command using more than one variable? For example, how do you create a launcher shortcut that will prompt you for varA and varB ...
0
votes
1answer
98 views

What environment does an application run in if started via desktop shortcut?

I have noticed that the environment variables I export in my .profile or .bashrc files are not available to applications started via a desktop shortcut. At least to my IDE. They are available if I ...
2
votes
1answer
945 views

How can I add directories to the PATH only for instances of CMD.EXE in Windows 7?

I don't want to modify the system path in Windows 7, or the user path either. But when I start up a Command Prompt (cmd.exe), I would like the path within the command prompt to be modified to include ...
0
votes
1answer
2k views

Why does windows-xp setting environment variable to %USERPROFILE% return the wrong path

I am trying to set HOME to be %USEPROFILE% for the currently logged on user. However, creating a system environment variable HOME and setting to and setting it %USERPROFILE% does not seem to work. ...
0
votes
2answers
528 views

Virtualenv for bash

I really like virtualenv when working with python code and am wondering if there existed some tool which could emulate some of it when working in bash. What I want is some cleanly reverseble way of ...
2
votes
1answer
9k views

where is %username% variable defined?

I just installed Windows XP in my virtualbox on windows 7 host. I can't change the username environment variable: USERNAME=Owner I successfully changed the variable USERDOMAIN because it is defined ...
0
votes
2answers
1k views

how do I add global Environment Variables in Gentoo?

I know they get read from /etc/env.d/ but I tried adding in my own file in there (00example) with a single env variable but they aren't picked up after either env-update. How does a user declare them ...
1
vote
1answer
623 views

How to check whether an environment variable is read only or R+W?

How to check whether an environment variable is read only or R+W on linux system? As an example BASH_VERSINFO is readonly. do i need to check manual? Any other option?
2
votes
1answer
492 views

Prevent Windows System %PATH% from being prepended to user %PATH?

I know how to set system or user specific environment variables: Now, the problem is that the PATH variable is treated such that the value you enter for the user PATH will be automatically appended ...
1
vote
0answers
146 views

Why my $PATH is not inhereted by the invocked bash? [closed]

I work on an AIX system where I have no administrator privileges. It has several shells installed, default being tcsh. I am not allowed to change the login shell. Usualy I start my session from exec ...
1
vote
1answer
66 views

Change $HOME for program generated files

I despise all junk that programs generate in my home directory; I'd like to see this stuff placed in $XDG_CONFIG_HOME and $XDG_CACHE_HOME. However, there are too many programs to configure and most ...
8
votes
2answers
7k views

Is it possible to “declare” a windows cmd-file (batch-file) as 32 bit?

Background: We do quite some scripting and little helpers with batch files (xyz.cmd) at work. Windows 7 is only now starting to become widespread here, and obviously, we hit the problems associated ...
1
vote
2answers
705 views

How to evaluate environment remote variables in SCP?

Is there a way to have environment variables on a remote host evaluated when using SCP? For instance, let's say I have $FOO= /mydir on host A; how would I do something like: scp ...
1
vote
2answers
415 views

Unix Commands are not working

New to Unix, I recently tried to add a $PATH variable in Unix in order to debug my android sdk. I looked up online the directions and tried to follow them as thoroughly as possible. What ended up ...