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
100 views

How do I extend my PATH environment variable?

Being a power user, my %PATH% variable just isn't long enough to install everything I want to install. Is there any way I can extend the effective length of the variable, or otherwise get more paths ...
0
votes
1answer
37 views

Set ENV variable for all commands in current directory in mac os

Is there a way to run all commands in current directory with some ENV variables predefined? Example of what I need: I put some file, say .env in my directory, with: export SECRET='abcd123' Then I ...
0
votes
0answers
104 views

Correct way of setting Ruby2.1 as the go-to application when it referenced to/called via shell?

I have installed Ruby 2.1 on my headless Debian server (7.4) by downloading the source from https://www.ruby-lang.org/en/downloads/ and then running the routine of ./configure make make install ...
1
vote
1answer
333 views

Awesome WM: execute my aliases via run prompt?

I have aliases in my bashrc for a few programs. One example is: alias chrome='google-chrome --disk-cache-size=1000000000' How can I call this alias from the run prompt (modkey+r)? Im running ...
2
votes
1answer
4k views

How to compare 2 strings in batch and determine if variable is alphabets

I have this code for /l %%a in (0, 1, 25) do ( if /i !TextAlphabet!==!Alphabet[%%a]! ( set AlphabetNumber=%%a ) ) !Alphabet[]! is an array containing alphabets. I tried echoing !TextAlphabet! and ...
1
vote
2answers
930 views

Strange PATH issue in Windows 7 - goes null after being set

I have some sort of a problem with the PATH system variable. Since I use a lot of cmd apps and scripts I've added a lot to it. But the string's length is not the issue. I've worked around this ...
0
votes
1answer
29 views

monit fails to support dbus session

I am trying to use monit to monitor and automatically issues like crashes, memory leaks and cpu hotspinning. For one application - one that uses DBus (serving and calling funcs) just will not start. ...
0
votes
0answers
49 views

Path Variable (for tex) Replaced

While installing gcc compiler, I realized I mistakenly replaced path variable for latex editor with path variable for gcc compiler. I have windows 8 and texstudio. what could be possible path variable ...
0
votes
0answers
42 views

How to create a shortcut in the launcher with specific enironment variable?

I want to start emacs with LANG environment variable set to en_US.UTF-8, and I don't want to affect other programs. In terminal, it could be realized using LANG=en_US.UTF-8 emacs. Then I created a ...
2
votes
2answers
95 views

env -i zsh | How is this magic possible?

I'm currently working, for school, on a home-made shell, therefore I'm kind of curious nowadays about how shell vars are set. Yes, this can be really exciting ! Anyway, we obviously have to deal with ...
0
votes
0answers
39 views

Exporting Variables – Reading Them Returns Blank?

Hi – I'm using Mac OS X (Mavericks), which should be UNIX compliant. In my .bash_login, I'm exporting variables for Cocos2D-X. I know this is executing, as I have a 'echo Test' line that executes ...
0
votes
0answers
55 views

Ubuntu: `env -i bash --norc`, but include essential variables such as HOME, DISPLAY? (where are these set?)

Is there an easy way to isolate a session of bash so that only essential variables (HOME, USER, DISPLAY, etc.) are preserved? (essential in that many programs fail if HOME, DISPLAY, TERM, SHELL, etc. ...
1
vote
0answers
43 views

ifs environment variable is not inherited

In Unix the IFS variable was often used to subvert system integrity. How it was fixed? The only answer I found is in wikipedia page http://en.wikipedia.org/wiki/Internal_field_separator which says: ...
1
vote
1answer
96 views

windows env variables not resolving

I have the following env variables: VIM_HOME: %ProgramFiles(x86)%\Vim\vim74 CMD: %USERPROFILE%\cmd PATH: ...%CMD%;%VIM_HOME%;... C:\Users\me\cmd\vim.bat @echo off start vim.exe %* Prompt: > ...
4
votes
2answers
2k views

TEMP vs TMP in Environment Variables

Is it right to have these two environment variables TEMP and TMP? If I make changes to one should I make the same changes to the other? For example I was installing cygwin and the directions told me ...
1
vote
1answer
179 views

ZSH: Where to place environment variable so that launched application can pick it up?

I need an environment variable KEY="value" made available to a GUI application before starting it. The launcher file (the one that places the icon on the desktop and sidebar in Ubuntu) has a value of ...
0
votes
2answers
43 views

how to set up an environment variable that it stores a path along with another env variable but doesnt expands

I want to know how to set up an environment variable that stores other environment variable but these environment variables doesn't gets expanded when I echo instead if I use eval echo then it should ...
2
votes
2answers
570 views

Is it safe to store critical passwords in server environment variables?

I have a cluster of servers, each with configuration files that currently contain plain-text passwords for sensitive, mission-critical systems (message queues, data stores, and other services). Some ...
1
vote
1answer
58 views

How to redirect a custom environment variable to Window's %HOMEPATH%

On Linux, you can obtain the path of the home directoy via HOME, in Windows via HOMEPATH. I'd like to create a custom environment variable in Windows called HOME that "redirects" to HOMEPATH. The ...
0
votes
1answer
49 views

%PATH% in Explorer bar causes error

When I type "%PATH%" in the address bar of Explorer, I get the error "Windows can't find ...
0
votes
0answers
22 views

How can I set temporary environment for explorer (renewed) [duplicate]

On windows 8.1 command prompt (cmd.exe) I can change environment variables, i.e. path. When I then start an explorer instance, that instance takes the default (its parents?) environment, not the one ...
0
votes
2answers
316 views

Set environment variable containing at symbol

I would like to set an environment variable containing the URL of my proxy server with my credentials, as in this blog post. The problem I'm having is that my password contains an at symbol and I am ...
1
vote
4answers
82 views

Stacking Windows environment variables

Is it possible to "stack" Windows environment variables such as, "RUBY_PATH" = "C\ruby\bin" "PYTHON_PATH" = "C:\python332" "PROGRAMMING_PATH" = "%RUBY_PATH%;%PYTHON_PATH%" "Path" = ...
3
votes
1answer
139 views

Is the Windows 8 path variable supposed to be this long?

I have Windows 8 and my Path variable seems like it's way longer than it's supposed to be (I'm just starting to figure environment variables and stuff out, and trying to change my Path so that I can ...
0
votes
1answer
124 views

Modify persistent variables on a remote server host using 'ssh' from client host

As the title says, I want to modify environment variables on a remote server using 'ssh'. My first attempt was: $ ssh mysvr -l sikaiwei "getId=$ORANGE; echo $ORANGE; ORANGE=$((ORANGE+1)); echo ...
1
vote
2answers
252 views

PowerShell: Env: Avoid truncation of environment variables

PowerShell displays environment variables, one line for each. If a variable has a long enough value, it is truncated, and appended an ellipsis: > gci env: Name Value ...
2
votes
1answer
329 views

Meaning of LC_IDENTIFICATION environment variable

Just out of curiosity, what is the meaning of LC_IDENTIFICATION? The reason I am asking is, that a fresh US-English installation of Linux Mint (I guess Ubuntu would be the same), located in ...
0
votes
1answer
56 views

Windows 8 Enterprise Fail to boot after environment variable setting

I have some problem with my PC after using windows 8 enterprise edition. I use my PC for web development work. So for using PHP framework i need to set the environment variables, in my case i set to ...
2
votes
1answer
77 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
74 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. ...
13
votes
1answer
8k 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
145 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
386 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
561 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
976 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
73 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
470 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
2k 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 ...
0
votes
0answers
43 views

Changing default variables in Netbeans Templates

I am working with Netbeans. I want change templates there. There is some variables that are been set as default. How can I change them? For example: ${user} , "${project.licensePath}
1
vote
2answers
127 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
178 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
0answers
41 views

Removal of old version of java and install new java version

I have removed the older version of java installed (JDK 1.5) and have installed java 7. Now It shows both JDK versions in $PATH. I want to remove all installed java files and want to install new java ...
0
votes
1answer
124 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
157 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
234 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
260 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
938 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 ...