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
0answers
17 views

Reuse of environment variables in Path

Is it possible to reuse environment variables in the Path environment variable from PowerShell? There are some environment variables like %SystemRoot% defined and are used in Path variable ...
0
votes
0answers
13 views

Starting a chroot and drop into nonprivileged user home

I need to (temporarily) jail a non-privileged user. I tried something like: sudo chroot --userspec=mcon:users /wherever/chroottarget /bin/bash -i This almost works, but it doesn't set env vars ...
0
votes
0answers
21 views

Can the %PATH% be recovered without any Restore Points?

I just found out that my PATH system variable in Windows is nearly empty (it has only the path to the ExtFS tool - I installed that one recently , and I'm guessing it overwrote the Path instead of ...
0
votes
0answers
9 views

How do I set $LESS invocation options in a lesskey file?

I'm trying to use less's lesskey-file support, as described in the manpage: KEY BINDINGS You may define your own less commands by using the program lesskey (1) to create a lesskey file. This ...
0
votes
0answers
19 views

cwrsync on Windows 7 and setting PATH variable

The rsync command rsync.exe -av -riz -e "ssh -p 2222 -i d:/vagrants/rails-dev-box/.vagrant/machines/default/virtualbox/private_key" --delete --delete-excluded --exclude ".git" --exclude "cwrsync.*" ...
2
votes
1answer
26 views

How to start terminal in which bash is running with adjusted environment variables?

I'm using Xubuntu with XFCE. I would like to write a bash script which opens a new tab in the xfce4-terminal. In this tab, the bash should be running with an altered PATH environment variable. ...
1
vote
2answers
34 views

How to use environmental variable in explorer for quick folder access?

I am a user of Windows 8. I frequently create and save document files to a folder with long path. Therefore I tried to create a environment variable for that folder MyFolder, to get fast access. ...
0
votes
0answers
80 views

The Voodoo XP error you cant fix . RDP / MSTSC.exe - cannot find <LANG_NAME>\mstsc.exe.MUI

I keep getting the error cannot file C:\Windows\System32\<LANG_NAME>\mstsc.exe.MUI I do have this path C:\Windows\System32\US_en and this one too C:\Windows\System32\en and I made ...
2
votes
3answers
34 views

How to export an environment variable inside window manager?

I can export VAR="value" and use $VAR from within a terminal until I close it. Is there a way to get this behaviour, inside a window manager/graphical environment? exporting an environment ...
1
vote
1answer
37 views

$HOME is not defined for root user on Ubuntu 14.04

On a fresh Ubuntu 14.04 install, the bash environment for the root user does not have $HOME defined. I need to run some apps from a root shell, for example: gdb /usr/sbin/apache2 This is difficult ...
1
vote
2answers
18 views

why 'export $Path=$Path:dir' won't work?

I am just wondering why do we need to use this command export Path=$Path:dir why does the command not look like export $Path=$Path:dir/dir'
1
vote
1answer
35 views

Environment variables on Linux-like systems

How to set environment variables for a user in most generic way that is independent of shell environment variables (like profile for Bourne-like shells, bahsrc, zshrc, zshenv, ..)? The idea is to set ...
0
votes
0answers
34 views

Is there a window manager that allows you to set environment variables

My problem here is that I often stays logged in for a considerable amount of time and the usual methods of setting environment variables doesn't work in a satisfactory way: If I set environment ...
1
vote
1answer
54 views

Windows 7 CLI not recognizing commands without specifying extension

I've apparently gone and mucked up my system in a strange way. Windows 7's cmd prompt is no longer recognizing any executable or batch files unless I explicitly type their extension. ...
1
vote
1answer
27 views

User vs. System Environment Variables: Do System Variables Override User Variables?

I have elevated rights to my laptop but not admin rights. Admin rights are required to modify system environment variables. I expected that if I created a user environment variable with the same name ...
0
votes
1answer
61 views

cmd error “The system cannot find the path specified.”

I am getting this error when I am doing a cd into a directory I stored in environment variables. But the thing is, when I cd into the same directory using the same ev using vim, I can successfully cd ...
0
votes
0answers
33 views

Set IIS to run with environment variable

I'm trying to run IIS with the COMPLUS_ZapDisable environment variable set to 1. Per this link (which shows how to do it for regular exes), I hope this will allow me to load non-optimized versions of ...
0
votes
0answers
19 views

OSX seems to be ignoring any DYLD_* environment variables

I'm attempting to use a 3rd party SDK which is primarily written in C++. Their recommended approach for running the compiled output (an ODBC driver) on OSX includes setting an environment variable ...
0
votes
1answer
48 views

How to append to the user %PATH% from command line

I found plenty of questions like this one on StackExchange but no one work in my specific case. I would like to easily add literally %FOO% to the user environment variable PATH. I found the ...
0
votes
1answer
30 views

Is there any way to have Cygwin tools in PATH without them replacing Windows commands?

I would like to be able to use GDB, GCC and such straight out of a windows command prompt, so I put my Cygwin bin directory in my Windows path. Problem is that Cygwin programs now take priority over ...
0
votes
0answers
20 views

How to acchieve what http_proxy environment variable does for all traffic leaving the system?

I set up a trafficserver (5.1.2) instance as HTTP cache on a machine in my local network and now I'm looking for a way to enforce the usage of the proxy for HTTP requests to the outside world on port ...
0
votes
0answers
29 views

Centos server change environment PWD

I've a Centos Linux 6.5 server. If in the root (/home/wwwuser/) of this server I execute phpinfo.php, I notice that under "environment" PWD is set to /home/wwwuser/test/. I tried to rename that folder ...
0
votes
0answers
26 views

Server 2012 R2 Folder Redirection via Enviroment Variable

Is it possible to redirect documents using enviroment variables in server 2012 r2? For example, I have an application that is writing files to ...
0
votes
0answers
32 views

environment variable in registry on windows 7 x64

Im playing around with this guide for creating a default profile on Win7 and can't seem to get it working correcting: ...
0
votes
0answers
15 views

Enviroment modules for Windows?

I am starting to learn how to use modules (http://modules.sourceforge.net/) on a hpc server and I like this very clean solution. Is there any tool like modules for windows? I am just interested of ...
1
vote
1answer
28 views

Grep fails to find sequence after assign to variable

I run: awk -F ',' '{print $2}' data.dat | sort | uniq | tr '\n' ',' | grep "*)>nS4XkrlH @XUL" and the sequence is located in results. Then I run b=`awk -F ',' '{print $2}' data.dat | sort | ...
0
votes
0answers
25 views

Batch conditions and variable

I have a question about variable and batch windows. The main goal is : I have files in directory (pattern 0? with ? a number between 0 and 9). First I create a %%nf.bat (filename of each files) ...
0
votes
1answer
57 views

Java runtime environment path issues

I've had a problem with my Java installations for quite some time and I've never had time to sit and try to fix this problem. So I went ahead and uninstalled all the various versions of Java I'd ...
1
vote
1answer
26 views

Are User-specific environment variables in Windows 7 stored locally or in the profile

I have some libraries like Qt and OpenCV which are installed locally on several machines. The environment variables such as QTDIR and QMAKESPEC are user environment variables. Will these be stored ...
-1
votes
1answer
44 views

Wrong environment Settings invoked in Commands

Getting wrong and extra pathnames in error messages using "For /D", "dir" and "if exist" commands when running the non-Powershell batch code to elevate UAC privileges code here. This has been noted at ...
1
vote
1answer
34 views

Effect of Windows environment variables (especially OMP_NUM_THREADS)

Does setting OMP_NUM_THREADS=1 in the global environment variables (via Control Panel -> Sytem -> Environment variables) affect only programs run from the command prompt or all programs?
2
votes
2answers
63 views

Store command output in variable

If I do z='ls' and then echo $z it will print the directory I listed, but without newlines or formatting. I assume lack of colored formatting is impossible to get around, but would it be possible to ...
2
votes
1answer
73 views

Dynamic variable substitution in PATH

I want to run different versions of Java on the same machine (Linux Mint 17) with default to Java 7. So I put this into /etc/environment: JAVA_HOME="/tools/java/java7" JAVA7_HOME="/tools/java/java7" ...
0
votes
0answers
70 views

Alternative ways of passing PS1 env variable into Ubuntu for SSH session

I know that there are twenty thousand answers, none of them worked as expected, I'm more surprised than you are, so please consider reading the story first. I'm trying to achieve what appears to be a ...
0
votes
0answers
49 views

max length for PATH environment variable

Using Windows 7 x64 I've noticed that if you add too much stuff to your PATH environment variable it stops working. There appears to be a max length for the PATH environment variable and I'm curious ...
0
votes
0answers
11 views

VIDLE does not work path

I have Python 2.76 on Windows 7. Canopy, pyserial and now VIDLE I have 64 bit processor so I checked that I chose 32 bit for all the software as the Arduino tutorial I want to do suggested. VIDLE ...
0
votes
1answer
48 views

Difference between su and su -c (environment variables?) when running db2?

When I type this: su <user> -c "/home/<user>/sqllib/bin/db2 catalog tcpip node <dbName> remote <ip> server <port>" I get this error message: SQL10007N Message "-1390" ...
0
votes
1answer
350 views

How to set environment variables for a terminal application on OS X Yosemite?

I am trying to make ABD tool to work in my terminal and I found that the likely reason why I get the command not found warning is that I need to set the environment variable's path. I found that I ...
0
votes
0answers
24 views

How do I set the PATH variable for a service that's running as a non-login user?

I'm running a GitLab server on a Linux machine using Nginx as a Webserver. Several processes (started either manually as root with /etc/init.d/foo start or automatically as sub-processes) run as ...
2
votes
2answers
40 views

How to shrink the prompt of a long path using environment variables in OS X (extend '~')

I've seen this working with the gemset environment, I would like to reproduce it now that I need to work on a very indented directory path. Basically I had a $GEM_HOME environment variable pointing ...
1
vote
1answer
586 views

How to include environment variable in bash line CURL?

Trying to get Transmission to notify when download complete. This works: curl -u <my-api-token>: \ -X POST https://api.pushbullet.com/v2/pushes \ --header 'Content-Type: application/json' ...
0
votes
0answers
44 views

Windows path and semicolon

In Windows 8.1 I have an environment variable LATEX equal to C:\Program Files\MiKTeX 2.9\miktex\bin\x64 and the path variable set to %JAVA_HOME%\bin;%ANT_HOME%\bin;%LATEX% The problem is ...
0
votes
0answers
85 views

msys2 shell uses different PATH depending on launch

When I start the msys shell via the created shortcut, it executes cmd.exe /A /Q /K C:\msys64\msys2_shell.bat and it uses the current PATH environment variable. But when I start ...
0
votes
0answers
22 views

Why does system PATH seem to be cleared?

I have this strange situation at work where me and some other guys regularly have problems with our system PATH environment variable. Whenever that happens, we have problems like shortcuts that stop ...
0
votes
1answer
39 views

Where do the variables of a new BASH shell come from?

I am puzzled as about how environment variables work. From what I am aware, for a new process to have some environment variables, its parent must have issued export. But what about all the variables ...
2
votes
1answer
23 views

Unset bash variables referring to non-existent directories

I have a file which is sourced by an application, adding relevant directories to $PATH and $LD_LIBRARY_PATH. This is fine, but it results in somewhat excessive pollution of the $PATH and ...
0
votes
0answers
31 views

When running a program as a Windows 7 service, where does the HOMEPATH variable map to?

I have a program that's being run as a Windows 7 service. In the program, the HOMEPATH environment variable is being used to set the location of a file. Normally, when the program is simply ran at a ...
1
vote
1answer
59 views

I changed my system path in system variables, how can I bring it back to what it was?

I've been trying to unlock my htc device's bootloader and I couldn't get a fastboot command from the cmd to work. I had tried everything and eventually I found this site which said that I just have to ...
3
votes
1answer
22 views

In bash, declare an alias that depends on current variable content

I would like to declare an alias in my .bash_profile that will use the content of a variable when the alias is used and not when it is declared. Ex: alias goSomeWhere="cd $BASE/somewhere" When ...
0
votes
1answer
24 views

Java Path Set Issue

I am using win server 2008, Trying to set java path. I set it in both user variables and system variables. yet, I couldn't access java. But when I check in java installed path It is working fine ...