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

4
votes
1answer
17 views

Is it safe to edit the global PATH environment variable?

I just recently found out that I couldn't run mysql without typing out the whole path or being in the correct directory--unless I added the path to the PATH environment variable. I managed to do so ...
1
vote
1answer
24 views

Passing environment variables to remote server as a different user

I'm trying to set environmental variables while I SSH into a remote server on a CentOS server. I am running the command as root but need it to run a command as the Oracle user. I found a few things on ...
0
votes
1answer
27 views

Call sourced file's functions in bash script

I have a bash file, src-useful.bash, containing useful functions such as say_hello(),located in /path/to/useful. In my ~/.bash_profile I added the following lines: export BASH_USEFUL=/path/to/useful ...
0
votes
3answers
39 views

Start a program in Windows as it is run in a clean system

Is it a way to start a program in Windows as it is run in a clean system (without any software or libraries installed)? I can do something like set PATH= but it is not sufficient as I can see. E.g. ...
1
vote
1answer
17 views

Adding ffmpeg as environment variable

I've been trying to follow step two of the dependence guide of Microsofts Project Malmo. https://github.com/Microsoft/malmo/blob/master/doc/install_windows.md I need to create the environment ...
-1
votes
1answer
32 views

delete file-process with powershell using environment variables

I have adapted a powershell script, to delete a file in specific path, but first i must close the process generated by this file, but it has errors (does not recognize route with the environment ...
1
vote
2answers
38 views

Notepad++ - search for same things that are in line twice

I would like to know if there is way to search file for two things in same line. For example if I want to search line with "variable >=" and "variable >=". Problem is that I dont know what "variable" ...
13
votes
2answers
799 views

In Windows Explorer, why can we create a folder or file with the percent symbol, if the percent symbol is reserved for variables?

Go to Windows Explorer, and create a folder named %systemdrive%. Now, open a command prompt, and try to go to the folder you just created. You can't, because there are percent symbols in the folder ...
2
votes
1answer
23 views

Passing variables into ssh sessions (Session has to stay alive)

is it possible to start a ssh remote session and pass a variable to the remote host, which is usable in the opened session. For Example: Client: testvar="this is my text" Open ssh session (ssh user@...
0
votes
1answer
44 views

How can I set a modified PATH for a non-interactive non-login POSIX shell invoked by Scons on Cygwin?

Because I work on a number of separate projects, (each of which uses a different compiler), I don't like to have the path to any one compiler set in my PATH. Now I have joined another project where ...
2
votes
0answers
22 views

DISPLAY environment variable is always 0

I have two monitors attached to the same desktop computer. However, when I do echo $DISPLAY, it prints :0.0 on both screens. Shouldn't echo $DIPLAY print :0.1 from one of the screens?
0
votes
1answer
22 views

Change target of shebang

I would like to create the target python3 to be used in shebangs. Eg. use the first line #!/usr/bin/env python3. What I tried: setenv python3 PATH_TO_BINARY, also put it into .cshrc, echo $python3 ...
0
votes
1answer
31 views

Centos: there is no ~/.cache/upstart

I'm new with linux.As I know ~/.cache/upstart is folder where system processes log their stuff. But I can't find this folder in Centos. What I'm most curious about is that on Ubuntu this folder ...
0
votes
0answers
18 views

OpenSSH won't resolve %temp% environment variable in commands and batch files

I installed OpenSSH on my Windows Server 2012 R2 system. So far everything works except for resolving the %temp% environment variable: In my PuTTy SSH client I can resolve %systemroot% but not %...
0
votes
0answers
17 views

Git installs to a network drive

I'm using Git at work (on Windows 8), but we have a variable in AD called 'HomeDrive', which is annoyingly set to a network drive. Git has decided to install the git bash and other utilities here, ...
0
votes
1answer
51 views

How to handle variable in Batch script nested loop?

the following batch work well until the comment "the following do not perform as expected" I've try any kind of %; %%, ! around the variables but always fail, either do not have any thing or errors! ...
0
votes
1answer
43 views

Does Windows7(+) have the env or equivalent? (Env. variable for single run of application) [duplicate]

I'm looking for an opportunity to launch an application (eg, compilers) with specific environment variables . I want same functionality like env in Linux. env var=value application.exe I found ...
0
votes
1answer
79 views

Is there an environment variable for C:\Users\%USERNAME%\AppData\Local\Temp in Windows 7?

Is there an environment variable that by default points to C:\Users\%USERNAME%\AppData\Temp in Windows 7? Or maybe C:\Users\%USERNAME%\AppData\local\Temp for that matter? Also what are these ...
0
votes
1answer
23 views

Why does Software use it's own proxy settings?

Why does some software on Linux e.g. wget and apt-get/aptitude don't make use of the system variables for proxys? Is the difference between all the system too large to do that or is it just because ...
0
votes
1answer
28 views

Is there a way to modify/set an environment variable for one session? (Windows 7)

I am looking for a way to temporarily change the user-specific PATH variable in Windows 7 in such a way that it resets when the user logs off. Preferably I would like to accomplish this in a batch ...
0
votes
1answer
93 views

What is the difference between DESKTOP_SESSION, XDG_SESSION_DESKTOP, and XDG_CURRENT_DESKTOP?

I want to detect which desktop manager I am running, and I found out that there are three environment variables, DESKTOP_SESSION , XDG_SESSION_DESKTOP , and XDG_CURRENT_DESKTOP which could help me do ...
0
votes
0answers
23 views

bash: illegal character in an environment variable

According to man bash, bash identifiers may consist: "only of alphanumeric characters and underscores", however, bash seems to have been tolerant to this up until shellshock patch. Actually, it still ...
1
vote
2answers
40 views

Using setx to append to user PATH

My attempt: setx PATH "%PATH%;%~dp0" How do I do this without everything in system PATH getting duplicated in user PATH?
0
votes
1answer
11 views

proper way to set IRCSERVER env environment variable?

the IRC BitchX guide says two conflicting things: earlier, when describe all the env vars: IRCSERVER - Server(s) separated by spaces to use, in the format irc.host.com:port[:password] Then ...
0
votes
1answer
22 views

Can rsync use a remote environment variable?

Say I want to use rsync to copy a remote folder to my local desktop: rsync -av remote:$REMOTEDATA $LOCALDATA But I want to access the $REMOTEDATA environment variable on the remote server, not the ...
0
votes
1answer
32 views

Pipe in Environment variable in fish shell doesn't execute the first command?

I want to set fish_greeting to date --rfc-2822 | cowsay -f tux | lolcat (don't judge me). When I run date --rfc-2822 | cowsay -f tux | lolcat interactively, I get the proper output (the date in a ...
1
vote
1answer
35 views

What is the name of the tool that allows one to manipulate environment variables?

For some bizarre reason our corporation has disabled access to modify our own environment variables, they've actually set every single modifiable group policy to disallow us from doing anything, ...
0
votes
1answer
105 views

Intel(R) Management Engine Components\DAL in envoirement variable

Here is my path variable C:\Users\hzhao\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin; C:\Users\hzhao\.dnx\bin; C:\Program Files\Common Files\Microsoft Shared\Windows Live; C:\Program Files (...
0
votes
0answers
43 views

After adding vboxmanage to PATH, getting “ 'cmd' is not recognized as an internal or external command”

Am trying to add virtualbox exe's to the windows PATH. But after adding "C:\Program Files\Oracle\VirtualBox" to the PATH env am getting the below error. And most of the usual commands are not working....
1
vote
1answer
219 views

Why does Windows have a limit on environment variables at all?

What the Technical Reasons for 1024 character limit After having used Linux for the past 3 years, so many Windows 7 Pro issues have been bothering me at my day job. The most inane are the filename ...
1
vote
1answer
59 views

Providing API Keys at Runtime for Chromium doesn't work

I installed Chromium for mac OS X. When I launched the browser, I got a message stating "Google api keys are missing". I followed the instructions on the "Chromium developers how-to". I have ...
-2
votes
2answers
61 views

Path Environment Variable not working

Rephrased question I have an XP machine where I want to access an *.bat file from anywhere in my command prompt. As an example, let's say it's vcvarsall.bat from my Visual Studio 2010 directory. ...
0
votes
2answers
30 views

Pass variable to another pane

I'm working with tmux and I'd like to pass some information from one pane to another. For example in first pane i've got the folder by pwd command and instead of copypast to another pane I want to ...
1
vote
1answer
51 views

Git bash and cmd don't load my user account PATH variable

Start up a gitbash or a windows cmd session and run echo $PATH or echo %PATH% They both print the contents of the system PATH variable, but neither prints the contents of the PATH variable ...
0
votes
2answers
64 views

CMD not recognizing javac.exe

On my Windows 7 64 bits, I changed the JAVA_HOME variable to point on 64 bits JRE, and changed it again to point on 64 bits JDK. I did same operation a few times. Every time I do this change I close ...
0
votes
1answer
29 views

Windows environment variables. How do I change the name that I must type at command prompt to run a path target

I am using Windows 10 Pro, but I'm sure the process is the same as Windows Vista through 8.1 or it's similar enough for me to figure out the minor differences. I have two programs with the same exact ...
2
votes
2answers
36 views

Read lines from a file into command window and expand variables

Im trying to see if its possible to read lines from a file into the command window and then write them back out to a file. The tricky part is that anywhere in the file where there is text resembling ...
0
votes
1answer
39 views

PowerShell environment variable missing

I have the situation. One of PowerShell environment variable has been missing several times. I have to manually add it ($env:path +=';C:\Program Files\Docker Toolbox') and reboot my desktop. I am ...
0
votes
0answers
35 views

Source windows environment variables in MSYS

I have a setenv.cmd script which contains paths for the windows cmd prompt: set CURRENT_SCRIPT_DIR=%~dp0 set PATH=%PATH%;%CURRENT_SCRIPT_DIR%\bin But I'm using bash (via msys in the git for windows ...
0
votes
2answers
28 views

Evaluate each environment variable and set it back in ubuntu

I'm trying to write a shell script which reads all the environment variables, evaluate them for included env. variable with in them and re-export after evaluvation. Example - I've an environment ...
3
votes
0answers
31 views

Shortening Path variable

Currently, my path variable is way too long (as it seems to have been populated by different programs upon installation). I have pasted my path variable below, could you all please tell me if it is ...
0
votes
0answers
40 views

How do I read system environment variable in Windows 10 (without using admin right)

How to I read system environment variable in Windows 10 (without using admin right) my %JDK_HOME% = C:\Program Files\Java\jdk1.8.0_77 when i use command line echo %JDK_HOME% it will show %JDK_HOME% ...
0
votes
1answer
45 views

Path not being completely set in Windows 10

When I open a new cmd and print the path it is not match what is in the System > Advanced system settings > Environment Variables... I have two directories from my User variables and a bunch from my ...
1
vote
0answers
29 views

Sudo user is not able to export path of ant

Sudo user is not able to export path of ant. I am trying to execute shell script setpath.sh which exports path for ant. After executing the script when I am executing ant command then getting ant ...
0
votes
1answer
183 views

How to make an Environment Variable available to Systemd Services

I have a script in /etc/profile.d/setenv.sh which sets the value for JAVA_HOME so that $JAVA_HOME will be available system-wide: # echo "export JAVA_HOME=/usr/java/jdk1.8.0_74" > /etc/profile.d/...
0
votes
0answers
28 views

Cygwin command to set user path when logging in ssh

I've setup a sshd as a service on windows 7 with cygwin, choosing to create cyg_server to run it. Now I can login to my machine via SSH with my normal username, everything works, except what depends ...
1
vote
1answer
18 views

Replace shortcut path during creation (Windows)

I would like all new shortcut links created using the right-click option in windows explorer to replace the absolute path with a system variable. The motivation is to have synchronized shortcuts work ...
0
votes
1answer
34 views

How to remove environment variable

I am use Windows 10 pro. I try to run other Tomcat instance, but I cannot control config (%CATALINA_HOME%). This is systempropertiesadvanced (hasn't CATALINA_HOME variable): I try to echo by cmd (...
0
votes
0answers
42 views

When does %PATH% get expanded?

Ok so I'm pretty sure this question has been answered somewhere already, I'm just not able to find it within 30minutes. I have set some custom variables (system-wide) and added them to my system %...
0
votes
0answers
8 views

how to save URL passed variable for page reloads [duplicate]

i am developing a blog website first time, the problem is here: i am displaying a 150 characters of all post on single page, and when user clicks on a particular post of his interest that post gets ...