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

php is not recognized as an internal or external command although it is available in commandline

this is somewhat of a tricky question when it comes to "where should I place it?", but I assume a general problem behind it, which is why I am putting it on superUser. I have a Doctrine script which ...
0
votes
1answer
22 views

Assigning a Windows environment variable to a batch variable?

I can't seem to assign an environment variable to another one inside a batch script. For example, this will work: set varA=C:\this\is\a\directory and I can happily use find /I "MyString" %varA% ...
0
votes
2answers
32 views

CMD doesn't update environment variables even when restarting the OS

I've been setup my variables for my development environment using the Windows cmd, but it works well only the first time I set them with the System>Advanced>Env Vars dialog. I just restart cmd and it ...
0
votes
0answers
4 views

Display variable for headless machine to avoid display errors

I'm running some Python programs on a compute cluster. A package I'm using is still in development and isn't very friendly for real work environments...such as the use of: import matplotlib.pyplot ...
-1
votes
1answer
24 views

Export windows Environment variables to a file. [duplicate]

Can we write a batch file to export all or some environment variables to a file in windos 7?
1
vote
2answers
28 views

What's the Ideal Way to Swap Entries in the $PATH environment variable?

In Linux and/or Mac OSX, what is the best way to automate moving an entry in the $PATH environment variable to the front of the value like this: /foo/bar:/one/two/three:/opt/local/bin:/home/user/bin ...
1
vote
1answer
22 views

How does a process change the environment variable of its parent process?

Take cd as an example. Also, it is cd that reminds me of this question. When we input "cd" and press enter on a terminal, a cd child process of the terminal starts and in my mind all things about cd ...
0
votes
1answer
26 views

How to access Java JARs through CLASSPATH environment variable on Windows 7

I know there is this article on JAR files on Linux but the solution involves some Linux specific commands I don't know, and ultimately I'd like to understand if I can access my JAR (and JARs it ...
-1
votes
1answer
45 views

alternatives to insecure sudo?

How do I protect my environment from sudo erasing half of it? It seems I can protect variables, but functions that the variables (like the prompt, for example) rely on are undefined. This means that ...
0
votes
0answers
6 views

Is it possible to set environment variables in a DE-agnostic manner in X11?

For an example, to set environment variables in Xfce4, I would copy /etc/xdg/xfce4/ to .config/xfce4/xinitrc and add export BLAHBLAH="xyz" in there, but that won't work on Gnome, or KDE, or LXDM, or ...
-1
votes
0answers
25 views

Debian /etc/environment variables being overwritten/replaced by another process

I recently "had" to upgrade to Debian Jessie from a 7.6 Wheezy XFCE live install image i setup on my workstation. Pretty much everything is running smoothly with one very odd and quite frankly very ...
0
votes
0answers
20 views

Inno Setup ChangeEnvironment not working

I am using InnoSetup to create an installer but the Environment is not refreshed after the installation. The user has to restart the computer in order for the Environmental Variable to be refreshed. ...
66
votes
6answers
3k views

Choosing between .bashrc, .profile, .bash_profile, etc [duplicate]

This is embarrassing, but after many years of using POSIX systems full time, I still have a hard time figuring out if a shell customization should go in .bashrc, .profile, or somewhere else. Not to ...
0
votes
0answers
16 views

path setting appears twice in env output

After an OS version upgrade I have the following strange problem: % port MacPorts 2.3.1 ... % sudo -i # port MacPorts 2.3.1 % sudo port sudo: port: command not found Furthermore, if I do it all ...
0
votes
2answers
49 views

Accidently deleted PATH environment variable - how do I get it back? [duplicate]

I had to add the JDK path in the system variables which is under environment variables, but by mistake I deleted the default path which was present in the Path and pasted the JDK path. So how do I ...
1
vote
1answer
37 views

Batch script to take the output of a command and create a variable out of it?

For example, I want to search for a file where /r C:\ "myfile.txt" and then make the output of that command which would be the file path to "myfile.txt" a variable I choose, So then the path to ...
5
votes
1answer
47 views

How to determine whether a folder in %PATH% is required in Windows 7

How can I determine whether a particular folder in the PATH environment variable is used by the system? Recently, some software that relied on the system PATH stopped working b/c another package ...
1
vote
1answer
19 views

Why does 'export foo=1' not get read when I use ssh?

I'm trying to set a remote environment variable explicitly in an ssh command: ssh worker-2 "export OPENBLAS_NUM_THREADS=1; echo $OPENBLAS_NUM_THREADS" Strangely, this prints just a blank line, but ...
0
votes
0answers
23 views

enviroment variable %PROGRAMFILES% with 2 executions

I want to install a program with a batch-file to the Program Files folder. Afterwards I want to copy a folder to the same folder. Here is an example: SET SCRIPT_LOCATION=%~dp0 SET ...
0
votes
1answer
21 views

crontab and binaries in /usr/local/bin

I am working in Redhat and have few programs located in folder /usr/local/bin I would like to call from crontab for root user. I thought that by putting binaries in that folder would be sufficient to ...
0
votes
0answers
26 views

Broken sudo commands

How to repair sudo to use standard commands? I cannot use any command with sudo.
2
votes
0answers
55 views

Task Scheduler program writes to literal folder named %LOCALAPPDATA%

I have a .NET executable (that I created) which uses Microsoft's Active Directory Service Interfaces (via System.DirectoryServices.AccountManagement) to do LDAP queries. Internally to ADSI, it ...
0
votes
2answers
47 views

Two environment variables with the same name

I tried adding an 'Environment variable' with the name "PATH" but I found another entry with the same name. can I change the old one to a different name? I tried openning "GPAC" folder, but didn't ...
0
votes
2answers
44 views

Setting environmental variables for apache user www-data

I want to set the environmental variable GNUPGHOME=/path/to/home for the apache user www-data. I tried setting GNUPGHOME inside /etc/profile with if [ "`id -u`" -eq 33 ]; then export ...
-1
votes
1answer
45 views

Using /usr/bin/env to change directory [closed]

I want to automatically execute commands with the prefix /usr/bin/env $/usr/bin/env composer install (this runs OK) $/usr/bin/env cd public (failed ---> /usr/bin/env: cd: No such file or ...
0
votes
1answer
27 views

Using Environment Variables in an AD Profile Path

When I set a profile in an AD object, I need to use a predefined environment variable, %BUILDID%. So the path would be \SVR-STAFF\Profiles$\%BUILDID%\Administrator.v2 ... But the path doesn't work. ...
0
votes
1answer
46 views

How to set R environment variables on Linux

I call a r script from PHP and it works well. I just call it using this function shell_exec("Rscript play.r"); To do that I had to make setting in environment variables in Windows to the R ...
0
votes
1answer
124 views

Windows 8 'setx' is not recognized as an internal or external command

I'm trying to edit an environment variable, but i'm getting an error that 'setx' is not recognized as an internal or external command, operable program or batch file. I can use the set command, but ...
0
votes
1answer
53 views

How to remove path from PATH variable in fish

I am using fish as my shell in Debian and recently (after some upgrade) whenever I try to use command completion I have: set: No such file or directory set: Could not add component ...
0
votes
1answer
30 views

Win7 loses PATH from user profile

Recently, a very weird thing started to happen that has not happened before: Suddenly, from out of nothing Windows 7 & "forgets" the part from PATH from the user profile. As can be seen on the ...
-1
votes
1answer
32 views

I don't see 'path' under environment vaariables

I am trying to set path for Python but I have no 'path' under environment variables. Below is a link for the original issue as well a screen shot. How can I fix this?
2
votes
0answers
32 views

Windows: Execute program as admin with current environment and with elevation [duplicate]

This question is different from Run as administrator from command line on Windows 8 and I wrote why: I want to run a program a) as a different user b) get elevated privileges (which is additionally ...
0
votes
0answers
47 views

'MSIEXEC' is not recognized as an internal or external command

The system programs are not working on my WIN7 64bit system (CMD, PING, MSIEXEC, IPCONFIG, etc). Steps I've taken: %SystemRoot%\System32; is listed in the Environment Variable Path. At command ...
1
vote
0answers
56 views

Is it possible to set my PATH variable in a desktop entry?

I've created a bin directory in $HOME with shell scripts that are each set up to load a Firefox profile; this way I can use a simple command like e.g. facebook to open a Firefox profile reserved for ...
0
votes
1answer
18 views

How do I unset “!::” environmental variable in bash?

I have a build script that is failing because it tries to unset an environmental variable called !::. That fails: $ unset -v '!::' sh: unset: `!::': not a valid identifier How do I unset that ...
0
votes
1answer
24 views

exporting bash paths with same variable name

I'm looking at my bash profile and not really understanding what I see. I think I see a variable (PATH) being redeclared - though this can't be true as all my programs seem to work. Can you help me by ...
0
votes
0answers
134 views

Problems installing postgresql-9.3.4-4-windows-64 on windows 7

I am trying to install postgresql-9.3.4-4-windows-64 on Windows 7 x64 and keep getting the error message: Error. There has been an error. Unable to write inside TEMP environment variable path. ...
2
votes
2answers
118 views

Issue with environment variable

Please help me running below command from user2 account. I cannot figure out what's the issue with this. [user2@localhost bin]# sudo -u user1 /opt/Tomcat/bin/shutdown.sh Neither the JAVA_HOME nor the ...
0
votes
1answer
54 views

Java version not recognized when JAVA_HOME defined for a particular USERACCOUNT

I have been struck with problem on my development box. I have JRE6 on my system and NO ADMIN RIGHTS. Used this command to add user variables rundll32 sysdm.cpl,EditEnvironmentVariables I have ...
8
votes
2answers
838 views

How do I make a batch file be able to run on other computers

When I create a batch file on my computer to execute start c:\Users\________\Whatever\..., it works on my machine. How can I get it to work on someone else's machine, since their username isn't my ...
0
votes
0answers
32 views

How do I reset my PYTHONPATH?

Somehow my PYTHONPATH environment variable got emptied, and now I can't import some downloaded modules. I've tried running the following command to reinstall all Python packages, but it didn't set ...
0
votes
0answers
25 views

Weblogic 12 and the CLI

I am working with WebLogic on Fedora 19 and am attempting to use the CLI tools to no avail. It appears these were deprecated as far back as WebLogic 9 however I was assured they are still there and ...
0
votes
0answers
47 views

Idiomatic way to read .env variables in Ansible?

I'm provisioning a Vagrant box with Ansible, and using Benno Joy's MySQL role to setup MySQL (including creating a database and users.) The database name and credentials are stored in a .env file in ...
0
votes
0answers
74 views

Recover environment variables windows 8 with out system restore?

I nuked my path variable on a Windows 8 machine accidentally. I then copied the 'basics' from another Windows 8 machine, set up systemroot, and all my user variables such as java_home, etc. This is ...
0
votes
1answer
60 views

How to call a Windows Environment Variable in a Shell script?

It is possible to call Windows Environment Variables in a bat script by defining e.g. %JAVA_HOME%. It looks like this is not possible using CygWin and shell scripts. Is it possible to call Windows ...
0
votes
1answer
40 views

Path variable seem to be ignored

Don't know why but some paths listed in the path variable seem to be ignored. For instance, processing, that when is executed from the right folder it runs without problem, but it is ignored whenever ...
1
vote
1answer
124 views

Environment variables and commands lost after Windows 8.1 upgrade

No sooner did I upgrade to windows 8.1 from windows 8, I found that I was unable to run commands from commandline like python, pip, cat,ls etc which are installed in the system when windows 8 existed. ...
0
votes
1answer
228 views

Forcing programs to be installed to another drive

I have an SSD as my main Windows drive, with a 640GB 2.5" HDD, partitioned to store programs and user settings, and also to act as backup (it's the only thing I had lying around at the time of ...
0
votes
1answer
21 views

Adding App to Path on Mac OS X

I'm in the process of migrating from Windows to Mac OS X. Right now, I'm trying to use this plugin in an application. The plugin states: Make sure you can find Magick++-config in your PATH. My ...
0
votes
0answers
28 views

set/modify environment variable for gnome/kde at runtime

Is there a way to modify or set environment variables in gnome or kde at runtime, ie. after logging in? I specifically need this for gnome, but knowing the kde method would be really useful too. If ...