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
2k views

Set environment variable for another user (Standalone Trac problem)

I'd like to run tracd (Trac in standalone mode) with custom template for multiple repository list: $ tracd -p 8080 -e /my/projects/path For custom template, I need an environment variable (as said ...
6
votes
1answer
8k views

What is the purpose of the environment variable asl.log?

I run Windows 7. I notice that there's an environment variable called asl.log. What is this thing? Who puts it there? What's the purpose of it? I searched and found only references to MacOS and ...
12
votes
1answer
11k views

How can I set environment variables for a remote rsync process?

When I use rsync to copy files from one computer to another, an rsync process is started on both ends. However, on the remote end, shell initialization files are apparently not read, so I cannot set ...
7
votes
4answers
229 views

Unexpected behavior in Bash

From man bash: A simple command is a sequence of optional variable assignments followed by blank-separated words and redirections, and terminated by a control operator. The first word specifies the ...
0
votes
2answers
2k views

How do I set an environment variable in tcsh that dynamically references other env vars?

I'm using tcsh here, and am trying to get an environment variable that references another one dynamically... I want to be able to do the following, and I'm sure I've seen it done before elsewhere: $ ...
2
votes
1answer
185 views

Windows: Finding application that set environment variables

Is there a way on Windows to trace the changes from applications or scripts to environment variables on startup? I changed an environment variable in the System->Advanced->Environment Variables ...
3
votes
1answer
3k views

Why can't my bash script export variables?

I am using MSYS and have a file vars.txt with variable, value keys like: WINDIR C:/WINDOWS STS_BUILD_DIRECTORY D:/STS/TMP ALLUSERSPROFILE C:/Documents and Settings/All Users I want to read this in ...
2
votes
2answers
4k views

How to get access to environment variables in Windows?

I have borrowed a laptop with Windows XP from a company that I will do a project for. They say that I have almost Admiinistrator rights on the computer so that I can install software. Now I have ...
3
votes
6answers
2k views

Are there any alternatives to adding to the PATH environment variable in Windows?

Many applications (specially developer tools) require that you add the path to the PATH enviroment variable in Windows. I know what is does, but for me this feels low-level Aren't there any ...
2
votes
1answer
1k views

How to set PATH to run programs outside of default path?

I'm working on a project on my school's linux servers. I have a program deep in a directory, we'll say it's ...
2
votes
1answer
4k views

Setting (permenant) environment variables in Ubuntu 10.0.4

I am running an application which requires setting environment variables to be set. At the moment, the way I am achieving this is by exporting the EV at the command line, and then running the app ...
1
vote
1answer
253 views

Why PATH variable is different between 'launching from command line' and 'click the icon' in Mac OS X?

As I asked in here, I learned that the environment variable of PATH is different depending on how I launch the app. Using 'aquamacs' from command line is run on top of bash, so the PATH variable is ...
0
votes
1answer
818 views

In Windows XP environment variables, what is the difference between user and system variables?

Is there a reason to add a variable to one over the other if I only ever use one user account?
4
votes
3answers
4k views

Setting environment variables Mac 10.6 [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? How to set an environment variable in Mac OS 10.6. I am finding it difficult or the options ...
3
votes
4answers
307 views

Why is it bad to add '.' to PATH?

I've read one explanation saying it can allow malicious executables that are in the cwd to run in place of similarly named built-ins and core utilities. For something to wreak true havoc, wouldn't ...
1
vote
1answer
613 views

Problem isolating the environment variable in a shell script

Hey superuser, I’m a novice here but stackoverflow has helped me in the past. I’m writing a bash shell script to generate a makefile (starting small). echo "\ include ...
3
votes
1answer
9k views

Windows Server 2008 R2 Environment Variables

How do you set environment variables on Windows Server 2008 R2, specifically the PATH variable? The Microsoft Help source provides advice that doesn't match the screens and options I see on my server. ...
7
votes
1answer
7k views

How to export Environment variables to a text file

I want to have a look into my Environment variables as a text file into XP Professional. Is there any way?
3
votes
3answers
2k views

Use ~.ssh/config to always set TERM=cygwin for certain hosts?

I use WinSSHd on several Windows servers. To access them from my Mac (and presumably, just about any Unix-based terminal), I need to set the TERM environment variable to cygwin, e.g.: TERM=cygwin ssh ...
0
votes
5answers
4k views

Ubuntu: Edit environment variables via command line

How can you edit the environment variables via command line in ubuntu?
4
votes
3answers
2k views

how to set path environment variable

I want to compile a code in software which is needed to call visual c++;My Os is windows cp professional; I've installed visual studio professional v10.but it still shows an error message indicating ...
4
votes
4answers
366 views

How to get an .exe file to execute no matter where the user types its name in command shell on windows 7?

I have Windows 7. I have a .exe file here: c:\tools\dailybackup.exe When I am in the CMD window, I want to be able to type "dailybackup" in any directory and have it execute. Do I still need to ...
0
votes
1answer
133 views

What is “set environment” variables for?

hey, i noticed that whenever I execute *.bin files, it is needed to run command setenv PATH... Can anybody explain me what is the usage of this command? cheers
10
votes
2answers
10k views

.profile or .bash_profile

I'm confused, where do I set environmental variables? In .profile or in .bash_profile? I am using both mac osx and ubuntu. Confused as to which one I use here.
5
votes
2answers
8k views

How can I set up the python environment variable on Windows 7?

I would sure like to be able to type "python" on my command line instead of C:\Python27\python.exe. So to that end I'm trying to get the environment variable set up for myself. Problem is, I can't ...
15
votes
2answers
22k views

How can I set user environmental variables (such as PATH) from a non-administrator account on Windows 7

How can I set user environmental variables (such as PATH) from a non-administrator account on Windows 7? On Windows XP I could go into the Advanced Settings in the System Control panel. However, on ...
0
votes
1answer
2k views

How can I restore my Vista PATH environment variable when System Restore is not available?

After installing IShadow I found out that my PATH environment variable was changed from some 20 paths to only one path: c:\program files\ishadow\system32. Many Windows tools stopped working, well ...
3
votes
3answers
1k views

If I change an environment variable can that be reflected in cygwin without restarting?

If I have an environment variable set up in windows xp, e.g. JAVA_HOME I can access this from cygwin. But if I change that environment variable through My Computer whilst cygwin is running, cygwin ...
6
votes
5answers
16k views

Windows XP environment variable for “local setting” folder

There's an environment variable, %appdata%, equal to C:\Documents and Settings\<username>\Application Data\ Is there a variable for either C:\Documents and Settings\<username>\Local ...
2
votes
2answers
854 views

mac, when adding environmental variables using 'export ABC=/var/blah/ where is this stored?

when adding env varialbes like: export JAVA_HOME=/usr/java/skd/bin where is this stored if I want to edit it later? is it a file somewhere?
2
votes
3answers
720 views

macbook, messed up my .profile and now no commands work like nano, rm, etc

I messed up a .profile and now I can't even get nano to work. I was trying to add git to my environment variable whenever I start terminal, and I messed the command up obviously and no nothing works. ...
0
votes
4answers
10k views

set JAVA_HOME in windows but “ant build” still fails

I've set JAVA_HOME in my Windows environment preferences: echo %JAVA_HOME% C:\Program Files (x86)\Java\jdk1.6.0_20 However whenever I try to run ant build I get the following: Perhaps ...
2
votes
1answer
1k views

/etc/environment and cron

I've got two machines: Fedora and CentOS. And a cronjob 0-59 * * * * env > /home/me/env.log On CentOS I can see that /etc/environment is affecting the output while on Fedora it does not. I want ...
1
vote
1answer
2k views

Exporting Environment Variables in Ubuntu Linux

I know many people have asked about environment variables before, but I am having a hard time dealing with these paths while ensuring I don't mess around with the original settings. How would you go ...
1
vote
1answer
67 views

Weird behavior with Bash

I recently changed my .bashrc and tweaked how my PS1 looks, but now it has a very weird problem. Before the end of the line in terminal (about 2 3rds of the way in) it jumps back to the begining of ...
2
votes
3answers
7k views

Setting environment variables in OS X /etc/launchd.conf

I'm trying to set some env variable in OS X 10.6 (/etc/launchd.conf) setenv M2_HOME /usr/share/maven setenv M2 $M2_HOME/bin setenv MAVEN_OPTS '-Xms256m -Xmx512m' M2 and MAVEN_OPTS are not working. ...
4
votes
4answers
7k views

cmd.exe SET command does not save values for new cmd.exe sessions [duplicate]

Possible Duplicates: Set Permanent Environmental Variable in Windows XP Is there a way to set Windows environment variables from the command line PERMANENTLY The set command does not save ...
1
vote
1answer
445 views

environment variable issue in shell

I am using Red Hat Linux Enterprise 5. I know the theory that -- using export to set environment variable, the environment variable will apply to current and child environment, but without using ...
3
votes
1answer
76 views

Tricking Linux apps about current time with environment variables

Sometimes it is possible to trick a Linux app by calling it like this: HOME=/tmp/foo myapp This would make myapp think /tmp/foo is the home directory, it won't try to get the user id, find its home ...
8
votes
4answers
9k views

Setting Linux environment variables

I am running Red Hat Linux Enterprise 5; I am always using the export command to set environment variables. Are there any other ways to set environment variables and what are the ...
0
votes
2answers
936 views

Setting default path in Unix

I just installed valgrind on my Fedora12 machine. $ valgrind // 1 $ valgrind: Command not found. //error $ /usr/local/bin/valgrind // 2 works fine My $PATH has ...
4
votes
3answers
6k views

Where do I initialise the LANG and LC_ALL sys variables under Ubuntu 8.10?

Under Ubuntu 8.10, bash shell, the LANG and LC_ALL variables are not set: user@machine1:~$ locale LANG= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" LC_TIME="POSIX" LC_COLLATE="POSIX" LC_MONETARY="POSIX" ...
1
vote
3answers
2k views

Why do I get duplicated entries in my $PATH?

I'm using Ubuntu 9.10 (karmic). And, my ~/.pam_environment looks like the following. PATH DEFAULT=${PATH}:~/Adobe/Reader9/bin:~/texlive/2009/bin/x86_64-linux GIT_EDITOR DEFAULT=vim ...
1
vote
1answer
6k views

Set Permanent System variable through bat file

This is a follow-up to Set Permanent Environmental Variable in Windows XP. I want to change System variables in XP through running a bat file. But when I run it I get the error "Too many command-line ...
6
votes
1answer
14k views

Set Permanent Environmental Variable in Windows XP

I want to set environmental variables permanently through a batch file. Is there a command to set Permanent Environmental Variable (other than SETX) for Windows XP service pack 3? command SETX ...
0
votes
3answers
722 views

How to run a command from anywhere in Mac OS X

I need to use a command for converting my images to pvrtc. It is located in /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool. Right now I have to be inside that folder to be able ...
14
votes
1answer
36k views

Windows 7 - User-specific %PATH%

I'd like to set up a system for Windows 7 where each user has their own private directory in %PATH%. I tried setting %PATH% to %HOMEDRIVE%%HOMEPATH%\Bin;%SystemRoot%\System32;[...] but it doesn't ...
0
votes
2answers
909 views

Make environment variables available when running command as sudo

I am using Curl, and am having a problem trying to get it to recognize the $http_proxy environment variable when using sudo curl. I tried putting export http_proxy=.... in my /etc/profile and ...
9
votes
1answer
32k views

HOSTNAME environment variable on Linux

On my Linux box (Gentoo Linux 2.6.31 to be specific) I have noticed that the HOSTNAME environment variable is available in my shell, but not in scripts. For example, $ echo $HOSTNAME returns ...
2
votes
3answers
1k views

Windows 7 command line variable equivalent to `$0`

Is there an environment variable in Windows 7 that is set to the name of the currently running script when I run a script? I'm looking for the Windows equivalent of the Linux variable $0.