Questions tagged [environment-variables]
A set of dynamic variables that can affect the running processes behavior and access to resources.
1,025
questions
0
votes
3
answers
2k
views
Problem with environment variables
I tried creating a shortcut to easily change into some of my Windows partitions. After mounting them, some works fine, some not. Here's what happens.
My ~/.bash_aliases contains:
export geo=/media/...
0
votes
2
answers
3k
views
HDF5 and GSL library problem on Ubuntu 14.04.1 64-bit
I ran into errors in the installation of the FDTD software MEEP on Ubuntu.Although I have hdf5-tools and libhdf5 installed on my system(Ubuntu 14.04.1 64-bit), the make step of the installation of ...
4
votes
1
answer
23k
views
Environmental variables resets after reboot [duplicate]
I am working on PhoneGap and I need to set some Environmental variables.
I used to set it by export and it sets.
But when I reboot or relog then it wipes out the variables I previously exported.
I don'...
0
votes
2
answers
11k
views
"sudo su" does not pass the environment variables to the new shell? [duplicate]
su manual
http://manpages.ubuntu.com/manpages/precise/man1/su.1.html
The current environment is passed to the new shell.
Obviously you cant use su in Ubuntu as in su but it has to be always sudo ...
2
votes
3
answers
15k
views
$PATH not saved as I login again [duplicate]
When I make a change in my ~/.bash_profile file and I add such a variable as:
export PATH="$PATH:$HOME/.composer/vendor/bin"
And after save and close, I need to reflect these changes in my $PATH ...
0
votes
1
answer
257
views
Use other environment variables in PATH definition [duplicate]
I've been wondering if there is a way to set the PATH system variable using other system variables. For example my /etc/environment currently looks like
PATH="........other stuff........ :$SCALA_HOME/...
0
votes
2
answers
613
views
Set custom added PATH vars to work in each Terminal session [duplicate]
I ran these 2 commands simply in the terminal:
export PATH="$PATH:/home/milkncookiez/Developer/android-studio/bin"
export PATH="$PATH:/home/milkncookiez/Developer/PhpStorm/bin"
in the 2 bin folders ...
3
votes
0
answers
2k
views
Unable to connect to X11 display. is $DISPLAY set? - Yes, it is
I'm trying to run this in my /etc/init.d/rc.local. I had to manually add the exit 0 because it wasn't there by default if that makes any difference.
cd /home/john/xcape && ./xcape -e '...
2
votes
1
answer
7k
views
How to set DISPLAY variable for a process?
I try to run pgadmin3 as user postgres and I get following error:
No protocol specified
Error: Unable to initialize gtk, is DISPLAY set properly?
Command pgadmin3 runs well under pavel (my main user ...
1
vote
1
answer
744
views
Can't log in after trying to set environment variables
So I added a file called gradle.sh to /etc/profile.d/ that had the following lines:
export GRADLE_HOME=/home/gradle/
export PATH=$PATH:$GRADLE_HOME/bin
I restarted my machine, so that it would pick ...
1
vote
1
answer
4k
views
Add custom script to PATH
I know there are quite some answers about that, but still could not make my way around it. I read all this and tried to follow the example under System-wide environment variables (for my case of ...
16
votes
2
answers
12k
views
Is $HOME/.local/share the default value for $XDG_DATA_HOME?
What's the default value for $XDG_DATA_HOME variable? I get an empty line with:
echo $XDG_DATA_HOME
According to the Free Desktop XDG Base Directory Environment variables specification, it might be ...
4
votes
1
answer
30k
views
Ubuntu 14.04: setting environment variables [duplicate]
I need set environment variables for Android Studio project EVERY TIME when reboot or close terminal. (Ubuntu 14.04) For setting variables I use:
export KEYSTORE_NAME=/home/anna/Documents/keys/NAME....
8
votes
3
answers
43k
views
Changing ownership of folder not working!
I am trying to change the ownership of a folder and subfolders by typing either of these:
sudo chown $user -R /usr/bin/.folder/
sudo chown $user -R /usr/bin/folder/
sudo chown $user -R /usr/bin/....
0
votes
1
answer
102
views
Server cannot run apt-get anymore
I was trying to setup an older version of gcc (4.1) on ubuntu 14.
I was having some difficulties to set alternatives. I so thread where someone said to use this command:
export PATH="/usr/bin:$PATH"
...
5
votes
1
answer
15k
views
How to set environment without sourcing .bash_profile myself every time? [duplicate]
When I restart Ubuntu 14.04, environment variables are set back to default and I have to run source .bash_profile every time which is very annoying. I generally keep my environment vars in ....
0
votes
1
answer
1k
views
Exporting LD_LIBRARY_PATH that contains spaces and special characters
Trying to deploy a Qt application on Ubuntu
Directions from Qt site show how to allow the library dependencies to be loaded, by changing the LD_LIBRARY_PATH variable:
#!/bin/sh
appname=`basename $0 ...
5
votes
3
answers
6k
views
Ubuntu 14.04 and playing songs from cron
I recently upgraded my computer to Ubuntu 14.04.
After the upgrade the system no longer plays the few songs I had it play via crontab.
The crontab lines look like so:
0 9 * * 1-5 /usr/...
21
votes
5
answers
239k
views
How to fix "not a valid identifier" error after setting environment variables?
I'm trying to setup cocos2dx in Ubuntu 14.04 LTS but after setting the environmental variables (in .bashrc) I start getting this error:
bash: export: dev/cocos2d-x-3.2/tools/cocos2d-console/bin': not ...
1
vote
1
answer
7k
views
save number of lines of a text file in a variable shell file
I'm working on terminal and running a .sh file and I want to count the lines in another file and save it as a variable to be used in this .sh file.
I'm using this command sed -n '$=' /lines.txt when I ...
1
vote
2
answers
580
views
Creating a Path Variable
I need to set a path for a variable $week4 to be Week4/assignment so that typing cd $week4 will change the working directory to Week4/assignment/
I've seen a few examples of similar stuff on here, ...
1
vote
1
answer
2k
views
shell file opens terminal and run a sequence of commands in specific order
What I used to do is:
Manually open a terminal instance to run the following commands and shell files
Run
PACKAGE_PATH=/home/userA/package1:/home/userA/package2:$PACKAGE_PATH
run:
cd /home/...
4
votes
1
answer
249
views
How to quickly check the value of bash variables, aliases and history commands from terminal?
How do you expand in place:
bash aliases
environment variables
history commands
to edit them and check they are correct?
For example, I have some aliases I use for flashing different devices and I ...
0
votes
1
answer
225
views
When I open a terminal and type set I get a strange output
I opened a terminal on the desktop in Xubuntu and typed
set
and then a new line. I aws expecting to see a display of my environmental variables, but all I got was a display of a lot of code.
What on ...
1
vote
1
answer
8k
views
JDK 8 Installation for Ubuntu 14.04 (Android Studio & NetBeans)
I downloaded jdk-8u11-nb-8-linux-i586.sh and installed it in my home folder. Then I install NetBeans, it is successful I think because I can compile my java code using netbeans. Now when I install ...
1
vote
1
answer
311
views
Environment Variable or saving dev_key file
I am slightly new to ubuntu,
I have a NASA-ADS dev_key to access some data on there system but am unable to:
save it as an environment variable named ADS_DEV_KEY or
save it to a file called ~/.ads/...
3
votes
2
answers
8k
views
Changing environment variables
I just changed my /etc/environment file to:
M2_HOME=/usr/local/apache-maven/apache-maven-3.1.1
M2=$M2_HOME/bin
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/...
1
vote
1
answer
5k
views
Why won't Vim source my .vimrc at startup?
Note: edited to provide more info.
I have modified my ~/.vimrc significantly (although some of my initial modifications I made in the system-wide /etc/vim/vimrc). It probably doesn't matter either ...
2
votes
2
answers
1k
views
What exactly should I set as JAVA_HOME?
I am trying to make Tomcat 7 working with Eclipse, and I am not sure if my JAVA_HOME is correct.
~$ echo $JAVA_HOME
/usr/lib/jvm/default-java
And there is no such catalog!
I only have:
~$ ls /...
28
votes
4
answers
8k
views
What is the $BASH_COMMAND variable good for?
According to the Bash manual, the environment variable BASH_COMMAND contains
The command currently being executed or about to be executed, unless the shell is executing a command as the result of a ...
1
vote
1
answer
3k
views
`TERM` environment variable not exported from `.profile`?
I have this in my .profile (I'm running Ubuntu 12.04):
export TERM="xterm-256color"
The variable seems not exported or be invariably later overwritten as TERM="xterm".
A test with Gnome Terminal:
$...
16
votes
2
answers
10k
views
How to start/configure pulseaudio remotely with ssh?
I have a remote machine to which I can ssh. On the remote machine there is a program that uses pulse audio to get input from a USB microphone attached to the remote machine. This setup works fine when ...
0
votes
1
answer
155
views
var.sh is not exporting the variable using terminal
I want to export many paths using a .sh script. after running it nothing is exported I don't know why. so if anyone can advise.
This is the script used:
#!/bin/bash
txtrst=$(tput sgr0) # Text reset
...
1
vote
2
answers
2k
views
How do I set environment variables through a keyboard shortcut?
I have a script that increments an environment variable, but it only works if I run it by perpending it with "source" or with a ".". Unfortunately, this means that if I attempt to bind it to a key, I ...
1
vote
2
answers
239
views
why everything is reverted back in PATH env variable after reopening shell?
As far as I know PATH is not a temporary variable. And when you reopen your terminal it should work as before. In my case it's not.
What I do is to add another path to $PATH:
export PATH=$PATH:/...
0
votes
2
answers
1k
views
How do I set $PATH to factory setting in Ubuntu 12.04 LTS [duplicate]
I executed this command from terminal:
export PATH=/home/ravinder/Java_Folder/Important_Programs/Servers/apache-maven-3.2.2/bin
So this is the only directory in my $PATH, I want to restore my path ...
6
votes
2
answers
29k
views
Why I obtain this error when I try to perform this simple bash script?
I am following this tutorial to correctly execute Aptana Studio on my Ubuntu 14.04:
Command menu in aptana studio 3 is not working in ubuntu 14.04
So I have installed the Oracle JRE and finnally I ...
0
votes
2
answers
2k
views
How to bring ".bashrc" in effect without logging out or Restarting the current session?
I am basically using .bashrc for adding environment variables. Each time I add a new Environment variable, I have to log out the current session and log in again to bring the changes in effect.
Is ...
0
votes
1
answer
1k
views
What is the default values of KMP_AFFINITY variable?
I was playing with the KMP_AFFINITY variable in my program and forgot to back-up the previous value.
Now the performance of my C++ program has fallen to 50%. Can anybody tell me what is the default ...
81
votes
4
answers
258k
views
Permanent PATH variable
How will I make this /media/De Soft/mongodb/bin PATH variable permanent?
Everyone is saying "export PATH=$PATH:media/De\ Soft/mongodb/bin to your ~/.profile, or .bashrc, or .zshenv depending on your ...
20
votes
6
answers
34k
views
How can I make it so I can run a specific program, just by typing its name in the console?
I have just recently installed Light Table downloading it from the git repository, and followed the instructions on this website to create a desktop launcher.
Now I want to run the program by ...
0
votes
1
answer
166
views
problem to update bash profile
Each time i work with a tool named criu, i set the path variable:
PATH=$PATH:/home/th/criu-1.3-rc2; export PATH
to be able to run
criu dump
but when I close the terminal and open it, it does not ...
0
votes
0
answers
80
views
Environment Variable - how does properly set them (bashrc or profile) [duplicate]
I am very new in Ubuntu and I am lost about Environment Variable. I have read some Forums but I didn't understand yet.
If I type java -version I got the java confirmation but if I type echo $...
4
votes
1
answer
524
views
How to execute a command with "=" sign in a desktop shortcut?
I'm trying to modify my Firefox shortcut in Unity so that it started with a specific parameter. From a terminal, I would start like this:
VDPAU_DRIVER=va_gl firefox
I tried modifying the firefox....
2
votes
3
answers
768
views
Can the PATH variable be corrupted?
I installed rbenv, a ruby version management program. I looked in the .bashrc file and noticed that the path variable was changed as below:
export PATH="$HOME/.rbenv/bin:$PATH"
I think the ":$PATH" ...
17
votes
2
answers
25k
views
Difference between $LOGNAME and logname
When the echo $LOGNAME and logname commands run normally, I get identical results from them:
pandya@pandya-desktop:~$ echo $LOGNAME
pandya
pandya@pandya-desktop:~$ logname
pandya
Is there any ...
2
votes
2
answers
256
views
Can you help me to understand this explanation of shell quoting?
I'm trying to comprehend and reproduce this
I read this section in the book Learning The Bash Shell;
My question about it is below it:
"Notice that we used double quotes around variables (and ...
3
votes
1
answer
3k
views
Why can't a process see environment variables set in /etc/environment?
I defined several environment variables in /etc/environment, but a process (build started by TeamCity) cannot see their values. I don't know what I'm doing wrong here.. this is the content of my /etc/...
0
votes
1
answer
7k
views
How to configure path or set environment variables for installation?
I'm aiming to install APE in Ubuntu 14.04 LTS, a simple code for pseudopotential generation. I'm having this error message while running ./configure:
checking for gsl-config... no
checking for GSL - ...
24
votes
4
answers
124k
views
When I use ZSH, how do I set PATH in /etc/profile.d?
I'm using zsh as my shell, and I'm trying to configure my environment.
I usually define my $JAVA_HOME variable by creating a file:
/etc/profile.d/java.sh
with the following content
export ...