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

Powershell: A variable within a variable; Variableception

So the easiest way to explain my problem is for me to show you this simplified version of what I'm trying to do: PS C:\> $a = 'hello' PS C:\> $a hello PS C:\> $b = '$a world!' PS C:\> $b ...
0
votes
0answers
19 views

Setting Environment Variables on Mac OS X

I'm new to using Mac OS X. From my understanding, it uses Linux under the covers. I have a need to add an environment variable. Currently, whenever I start a terminal window, I've been executing ...
1
vote
1answer
22 views

MAC equivalent - user name & appdata

I have a couple of questions: On PC I can get the username from the environment variable USERNAME and on LINUX it is USER - what the MAC equivalent? The users local area on windows can be found via ...
1
vote
1answer
17 views

Should system path & user path match?

This morning I was trying to add python to my windows 7 PATH and used: setx PATH "%PATH%;C:\python34\" /M This seems to have changed my path but not in the manner I'd hoped! My user path now ...
1
vote
1answer
20 views

How to call environment variables in runas command for right click context menu

I am having trouble with using environmental variables with using runas when using the command in the registry for a right click context menu command. I have tried different methods of escaping the ...
1
vote
1answer
20 views

Windows 8 Can't find executable in path with “where” command

I added the following line in my System Variable Path "C:\Program Files (x86)\FontForgeBuilds\bin" I can then run fontforge: C:\Windows\system32>fontforge -v Copyright (c) 2000-2014 by George ...
1
vote
1answer
39 views

Do I need SQL Server paths in my PATH environment variable for it to work?

SQL Server adds things to my PATH environment variable, and over time that bloat makes me hit the 2048-char limit in Windows 7. Do I really need them there for SQL Server to run? This is on a ...
1
vote
1answer
20 views

Run a function from bashrc, but modify exported variable

I am trying to run a function from my bashrc that refreshes every minute and externalizes a variable. It looks like this: export CFN = '' _some_fn { export CFN = 'test' sleep 60 _some_fn ...
0
votes
2answers
40 views

How to echo string of another string shell variable

We would like to echo the value of a shell variable which has another variable string in its variable name. eg: we want the following output var1=1 var2=2 We tried several various forms similar to ...
0
votes
0answers
9 views

Can't change system variables from config files on MariaDB/MySQL on Linux

I want to change two system variables on my MySQL testing server, namely collation_server and collation_database from latin1_swedish_ci to utf8_general_ci, because its annoying that everytime I create ...
0
votes
2answers
14 views

All the Environment variables have been deleted in my Win7 64bit [duplicate]

I have overwritten all the paths in environment variables. . How can i restore those variables back.
0
votes
1answer
26 views

Cronjob: Iterate through files

I want to iterate through a list of bash scripts with a cron-job. I.e. every two hours I want to start another bash script. My idea was to set a new environment variable, each time the cronjob script ...
1
vote
1answer
29 views

batch current directory when starting as administrator

Background: I like to have my computer clean. Especially I don't like programs and services starting with my windows, but I still want to use all my programs without having to manually start ...
0
votes
1answer
26 views

Weird behaviour while editing “Environment Variables”

If you take a look at the following screenshot, you see 2 very similar "Environment Variables" menus. The one the left was accessed by: Computer->Properties->Advanced System ...
2
votes
2answers
35 views

Setting the variable $USERNAME has no effect

Setting the variable USERNAME has no effect. Accessing the variable always returns the current logged in user. james@localhost:~$ USERNAME=foo james@localhost:~$ echo $USERNAME james I could not ...
0
votes
0answers
29 views

How to set truly global environment variable?

I am working on a Mac and I tried setting them in /etc/launchd.conf and tried running a Java program from shell and the same program from Eclipse. I get two different outputs for System.getenv() in ...
1
vote
1answer
54 views

Why is my IP address appearing in the email header even though I am using a proxy server?

When I visited a proxy-check site accessing through a proxy server, I found that my true IP didn’t appear. But in the header of the mail that I sent—using Thunderbird—accessing through the same ...
1
vote
1answer
24 views

Is it possible to have the PATH environment variable update without logging off?

In Windows 8.1, if I change the Environment Variable for PATH under either System or User and open a command prompt and execute path, whatever I appended to PATH is not shown unless I sign out of my ...
2
votes
0answers
17 views

What is the path environment variable? [duplicate]

I just started with using the (Windows) command line tool for working with npm. And I end up quite often on StackOverflow when I'm stuck with some error and the solution is often to add [something] to ...
0
votes
2answers
37 views

How can I set up an environment variable to work with TCC?

I am trying to set up TCC on Windows 7, but I can't seem to make it work dynamically from cmd To be able to invoke the compiler from everywhere on your computer by just typing "tcc", please add the ...
0
votes
1answer
26 views

Unable to open display to specific user in Red Hat 6.4

I am trying to install Oracle database 11g in my Red Hat 6.4 and the installer aborts with a warning followed by an error message: Warning ">>> Could not execute auto check for display ...
2
votes
1answer
104 views

What is the scope of “exported” in Unix shell variables?

I have set some environment variables in the following way: MY_VAR='helloworld' export MY_VAR Then I have switched to another user via su SOME_OTHER_USER I echo the MY_VAR variable.. and I see ...
0
votes
1answer
31 views

Is it possible to substring an environment variable in a windows 7 shortcut? [duplicate]

If I have an environment variable in Windows such as %username% if there any way I can substring that? I'd like to substring it down to the first 8 characters.
0
votes
1answer
51 views

Why is the directory Windows/Temp used instead of the Local user Temp when using %TEMP%

After installing my system in a new season of work, you must create a mechanism to actualize the same. This mechanism of this command line: schtasks /CREATE /SC onstart /DELAY 0015: 00 /TN "AppName ...
0
votes
2answers
49 views

Append to System PATH variable without including the User's PATH variable

Imagine the following environment variables: System PATH = C:\Windows Bob's User PATH = C:\Users\Bob In a command prompt the PATH command returns C:\Windows;C:\Users\Bob After running setx /m PATH ...
1
vote
1answer
297 views

Permanently remove an environment variable

While installing Android Studio, it installed Jayatana as a dependency. Now when I ran java, it showed me a message as: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar I ...
1
vote
2answers
54 views

How do you create system variables via batch file for Windows 7?

How can I create a batch file which creates a new system variable? (You know, in advanced system settings > environment variables > System Variables). I want to create a new variable named ...
1
vote
3answers
78 views

Cannot resolve %windir% on Win 7 64-bit

I'm having a problem with my laptop, it can't resolve the %windir% environment variable. I checked on the net and find that the PATH variable must be under 2024 characters length. Mine is 3145. ...
1
vote
1answer
36 views

Unknown path in my environment variables

I have a path in my Windows 8 Environment variables .bin;does this make any sense? Is it most likely a typo or typeover? I was having some issues with Chocolatey working in my Console2 and when I ...
1
vote
1answer
71 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
27 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
32 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
23 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
51 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
56 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
38 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
275 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
45 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
59 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
27 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
43 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
37 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 ...
2
votes
2answers
95 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
125 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
119 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
86 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 ...
1
vote
0answers
40 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
53 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
35 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
32 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 ...