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

2
votes
1answer
80 views

Export bash function over SSH

I would like to export a bash function over ssh to use it in GNU parallel. That question seems to be answered here Exporting bash functions through ssh but I don't seem to be able to get it to work. ...
0
votes
0answers
77 views

Driving me crazy. SETX /?

Rosalee is no longer a user, but her name remains %everywhere% I am thinking export registry and find/replace all Rosalee's or trying to use setx, but I cannot figure out the syntax for setx. ...
14
votes
1answer
9k views

How can I set environment variables for GUI apps in OS X Mavericks?

I've been struggling to get an app to run in OS X Mavericks. I finally was able to get it to run by drilling into the .app bundle and running the shell script directly. It seems that JAVA_HOME needed ...
0
votes
1answer
194 views

How to generically refer to the AppData folder on the Windows command line?

The original User's Profile directory lives in a directory like C:\Users\username\AppData. How can I refer to the current user's profile directory when using the Windows command line? By searching I ...
1
vote
1answer
424 views

environment variable for hkey_users/software

Many of my software configurations are stored in theHKEY_USERS\S-1-5-21-2715202203-4090495733-1863141328-1000\Software reg-folder. For developing Portable apps, I want to know the environment variable ...
1
vote
2answers
668 views

how to access variables that are set in a different windows batch file?

i have a windows batch file - called fileA.bat, which contains a variable set in it. Sample code of fileA.bat: set fileA_username=michael now i have another batch file, called fileB.bat, which ...
1
vote
2answers
1k views

Apple Mavericks - why doesn't this one-line BASH script set my Python virtual environment like I expect?

I have the following Bash script: #!/bin/bash echo $MYPROJECT_HOME/bin/myproject_venv/bin/activate source $MYPROJECT_HOME/bin/myproject_venv/bin/activate echo ...
0
votes
1answer
79 views

how to reset the system after accidently deleting the environment variables

I have deleted the paths under the advance system settings>environment variables>system variables in windows vista and since then options like, advance system settings, device manager and many others ...
2
votes
2answers
511 views

Go-lang go tool works with Bash but not Fish

For those of you who have no idea what Fish is: http://fishshell.com/ Similarly, if you are not familiar with a Go coding environment and still wish to try and figure out this small puzzle, here is ...
1
vote
2answers
3k views

I overwrote my environment variable PATH

I've accidentally overwritten the environment variable PATH in Windows 8 (64 bit). How can I reset it? I'm scared to shut down the PC before fixing this problem. Otherwise I might copy it from ...
1
vote
2answers
130 views

Reclaim home directory

The home directory is where a user is supposed to keep their personal files, for example documents and music. On my computer this is C:\Users\Steven also known as the %USERPROFILE% variable. The ...
0
votes
1answer
182 views

Understanding the scope and lifetime of environment variables in shell scripting

I'm pulling my hair out trying to understand shell scripting and passing environment variables, and what not. I'm trying to execute a PHP script from TextWrangler, that in it's turn opens a new PHP ...
1
vote
1answer
2k views

how to properly set environment variables

I've recently started using Windows (having used Ubuntu up until now) and I find myself unable to properly set environment variables. Whenever I set them they don't seem to work. I've been going to ...
0
votes
1answer
133 views

Cygwin messes up Windows PATH

I installed Cygwin and uninstalled it after some time on a Windows 7 machine. But, the PATH variable directories naming is not correct now. Could some one tell me how do I correct this? Log below - ...
1
vote
4answers
164 views

Mac OS X keeps “old” environment variable around

So far I had /Applications/play-1.2.5/ added to my $PATH variable. Now I'm working with 2.2.1, which I installed in /Applications/play-2.2.1 and changed in ~/.bash_profile (which is getting sourced at ...
0
votes
2answers
277 views

Unable to get ls to recognise LS_OPTIONS or LS_COLORS?

Trying to get --color=auto as the default ls argument. $ ls --version ls (GNU coreutils) 8.21 … $ echo $LS_COLORS ...
0
votes
1answer
299 views

Why doesn't environment variable get updated in cmd without restart?

CMD commands: setx SOMEVARIABLE "newpath" /M setx SOMEVARIABLE "%SOMEVARIABLE%;newpath2" /M Expected output on ECHO %SOMEVARIABLE%: newpath;newpath2 Actual output: %SOMEVARIABLE% Actual value ...
0
votes
2answers
1k views

Command prompt cannot find PATH variable

Sometimes, my command prompt cannot find the PATH variable. I have this occasional problem at work where when I open command-prompt and run commands like ipconfig or subst, I get an error saying ...
0
votes
1answer
21 views

Get the user name or host name of a connecting ssh user

I would like to get the user name or host name of a connecting ssh user to exec some functions in the .bashrc. # pseudo code if (ssh && connecting_ssh_username == "foobar") { do something ...
0
votes
3answers
1k views

How to keep variable preserve while running script through ssh

I am trying to run while loop with read through ssh: #!/bin/bash ssh root@10.10.10.10 "cat /var/log/syncer/rm_filesystem.log | while read path; do stat -c \"%Y %n\" "$path" >> ...
2
votes
2answers
2k views

What is the difference betwen /etc/environment and /etc/profile?

I understand that the former is used prior to the latter, but what is the conceptual difference? Is there any good reasons I should set some variables in one and not in other? Except the fact that ...
1
vote
0answers
50 views

What''s the “earliest” place one can set an environment variable during Linux boot process?

I know I can set a variable in a shell startup file, but the thing is, I am trying to set up a POSIX-compatible environment, and a POSIX shell does not parse any startup files other than the one ...
0
votes
2answers
162 views

How put path changing .bat file inside %PATH%?

I have a problem described here (you can read it for better understanding). I need to write .bat file that change path. For example: While sending a command in cmd: cd ~ I want to go to %HOMEPATH%. ...
4
votes
1answer
67 views

When should you set PATH variables in “User variables” vs. “System variables”?

On a single-user system (Windows 7), does it matter whether you set PATH variables in User-variables or System-variables? Why choose one over the other?
1
vote
1answer
2k views

Why does subshell not inherit exported variable (PS1)?

I am using startx to start the graphical environment. I have a very simple .xinitrc which I will add things to as I set up the environment, but for now it is as follows: catwm & # Just a basic ...
0
votes
0answers
25 views

Has anyone gone through relocating the %ProgramFiles% directory, and can comment on the process / pro/con's?

There are many questions on this SE subsite that ask if it is possible/how. I have commented on some of them that suggest changing the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir ...
1
vote
2answers
75 views

Win7 Path not being recongized

I have this path PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;c:\Program ...
3
votes
1answer
306 views

Powershell systemroot in $env:path different when AC elevated

I have a strange behavior with the environment variables at my Windows XP SP3. When I logon as Administrator, the %SystemRoot% strings in PATH are substituted to C:\WINDOWS, the value of the variable ...
0
votes
0answers
214 views

Using environment variables in windows registry

I have a game that normally saves everything to the same folder. I want to have a separate save folder for each windows 7 account. The game's save path is stored in the windows registry. It doesn't ...
0
votes
2answers
1k views

Using an environment variable set to a path value: the system cannot find the path specified for %OPENCV_DIR%

I'm trying to set an environment variable to point to the directory into which I have extracted the latest version of OpenCV, following the instructions in OpenCV's Installation in Windows tutorial. ...
0
votes
1answer
285 views

How can I run a command as a different user while Fedora boots up?

I have a server which runs Fedora 19. When the server boots up, I need to run bunch of commands. I do this in /etc/rc.d/rc.local file. This works well. Now I need to start my nodejs server from this ...
0
votes
1answer
161 views

Ubuntu — Application global environment variables

So I have an application I am deploying to an Ubuntu 12 server. My application has several "parts" to it: There's a web server, run as part of an upstart script There are cron jobs There are ...
0
votes
1answer
472 views

How to set path for MinTTY under windows/cygwin correctly?

I made windows shortcut with the following target: D:\APPS\cygwin64\bin\mintty.exe /bin/env PATH=/local/bin:/usr/local/bin:$PATH /bin/bash --login -i I was expecting it prepend path with my given ...
2
votes
1answer
3k views

How to change the location of APPDATA?

My C: is getting full regularly and now I don't have space. (It is less than 500Mb and system freezes or crashes often). I have already moved all user documents to other harddrive. I want to move ...
2
votes
3answers
70 views

How to get to Environment Variables from Run

I often need access to the Environment Variables on my Windows 7. What command do I need to type in the Run window to get to them? At the moment I do the following: Control Panel > System > Advanced ...
0
votes
1answer
1k views

Microsoft Word suddenly won't save files; “word could not create the work file - check the temp environment variable”

My brand-new install of Word 2007, which had been working just fine, suddenly refused to save any files. I'd hit Ctrl-S, and it wouldn't complain but it wasn't saving. Then upon exiting, Word would ...
11
votes
3answers
9k views

Switching between Java 7 and 8 in OS X

I have installed Java-8. Now I wanted to go back to Java-7 by default so I type in... /usr/libexec/java_home -v 1.7.0_40 --exec java -version /usr/libexec/java_home -v 1.7.0_40 --exec javac -version ...
0
votes
1answer
52 views

Configuring .profile for use across multiple servers

I have a home directory that is mounted to several CentOS servers simultaneously, part of an OpenGrid cluster. Most of these server nodes are configured identically, so my personal configurations in ...
1
vote
1answer
121 views

Deleting an Environment Variable from all users on Windows

I need to know if there is any way to delete all the instances of a given environment variable, this means from all users and from the system itself. The problem is about a software update. I need to ...
3
votes
2answers
71 views

Alert on Windows startup

I get a weird alert on windows startup and have no clue where it is from, but I have a feeling it has to do something with environment variables. I did some research, but couldn't find a thing. I am ...
0
votes
1answer
525 views

Set enviroment variable setx

I am setting a environment variable with setx(win7) in a cmd , that I started from a batch file, if I close the shell an open a new from batch file again and use Set command to check it, I do not get ...
1
vote
0answers
17 views

What is the BLAB_MEM environment variable in Windows?

On my Windows Vista system I see an environment variable called BLAB_MEM, with the value "-Xms128M -Xmx512M". This variable name is shown under both the system and user variables. That value ...
0
votes
0answers
168 views

Why is Eclipse/m2e not using my computer's PATH when executing command line Maven tasks?

My project uses a Maven build system, and the Maven build includes a command line call to thrift to compile some files. In bash, mvn generate-sources successfully completes. But when I use m2e's Run ...
0
votes
1answer
695 views

Scheduled Task and environment variables WITHOUT CMD /C

I need to run a task within Windows 2003 Task Scheduler however the command needs to access environment variables: vlc.exe http://62.196.56.141:8080 ...
0
votes
2answers
347 views

linux- env variables getting reset after closing the console

The env variables I set are getting reset to the previous values after closing the current instance of the bash console. How to set or unset those variables without getting them reset everytime? I am ...
0
votes
1answer
2k views

Strange Windows Errors

I run Windows 7 and I've been getting strange errors from different applications, for example attempting to uninstall VMware Workstation causes the following error: "Error in the lua script: [string ...
1
vote
1answer
359 views

Where Should I Set Environmental Variables For Use By Sublime Text 3

I have a Sublime Text 3 package that will only work if a particular environmental variable is set. The env is currently set in my .bash_profile, so if I launch Sublime Text from the Terminal, this env ...
1
vote
1answer
102 views

Where is file that saves Environment Variables?

I am a developer and usually do stuff with the PATH variable. However, now there are too much path in it, and using a short textbox of Windows is a pain. Before I happen to jump into a text file, ...
0
votes
0answers
181 views

Deleted Path environment variable, how to find the older Path?

I saw the other post like this and that, but i can't solve my problem, I opened regedit and find the previous version of folder USER <-screen, when i select/open it I can see the folder in the ...
1
vote
1answer
158 views

Don't have permission to set environmental variables via a script?

I've written a script to add some environmental variable required to run a certain process. I use it in this way >. ./env_change_script.zsh using the leading dot to indicate I want the script ...