A set of dynamic variables that can affect the running processes.

learn more… | top users | synonyms

5
votes
4answers
737 views

Pulling multiple alternatives from a variable in a case condition

I'd like to use variable as condition in case statement. Something similar to: #!/bin/sh ALLOWED_SERVICES=tomcat6|james; case $1 in $ALLOWED_SERVICES ) service $1 restart ;; * ) ...
17
votes
2answers
9k views

Is there a difference between “.” and “source” in bash, after all?

I was looking for the difference between the "." and "source" builtin commands and a few sources (e.g., in this discussion, and the bash manpage) suggest that these are just the same. However, ...
1
vote
1answer
1k views

NoClassDefFoundError: org/apache/derby/tools/ij

Derby says to install to opt, so I did: thufir@dur:~$ thufir@dur:~$ ll /opt/db-derby-10.9.1.0-bin/lib/derbytools.jar -rw-r--r-- 1 root root 174932 May 31 12:19 /opt/db-derby-10.9.1.0-bin/lib/...
1
vote
1answer
15k views

Setting up JAVA_HOME and CLASSPATH correctly on 12.04

I am having some issues with Java (OpenJDK Java 7 Runtime) on Ubuntu 12.04, and just want to make sure I have my CLASSPATH and JAVA_HOME variables set correctly. CLASSPATH=".:/usr/local/sbin:/home/...
2
votes
1answer
2k views

No such file or director in $PATH

I wanted to be able to run program from anywhere without adding ./, so I edited ~/.bashrc to contain this line export PATH=$PATH:. Now when I type echo $PATH I get [......]:/home/yotam/omnetpp-4....
16
votes
0answers
4k views

How do I set a path permanently? [duplicate]

Possible Duplicate: How to add a directory to my path? I am trying to install the play framework permanently. http://www.playframework.org/documentation/2.0.2/Installing export PATH=$PATH:/...
2
votes
1answer
551 views

$PATH from /etc/environment overwritten

I'm upgrading a bunch of installations of 10.04 to 12.04. In 10.04 I used to define system wide env. variables in /etc/environment. It works, but not for $PATH that seems to be overwirtten. I don't ...
3
votes
2answers
2k views

What does “export” do?

I never understand what "export" does. For example, what's the difference between these two? PYTHONPATH=/home/myaccount/ & export PYTHONPATH and PYTHONPATH=/home/myaccount/ One with export ...
3
votes
3answers
16k views

Environment variables - where are they stored by linux, how do I change them and is it safe to do so?

I am trying to configure a build from source an old version of gcc on my dev machine. The documentation highlight several environment variables that need to be changed in order to do this. I was ...
1
vote
3answers
4k views

PATH variable resets with reboot

Just as the title indicates my PATH variable resets after every reboot. I read that I have to edit my bashrc file's PATH variable, but I don't have anything there that suggests anything related to the ...
2
votes
2answers
5k views

Why isn't adding a path to “.profile” working?

I am using Lubuntu 12.04. I am having problems setting the path variable for my application. I am trying to set the path variable in the .profile file, however after adding the path when I echo $...
1
vote
1answer
3k views

“FreeType NOTFOUND” error when trying to build Okular from source

I am trying to build Okular from source. I checked out commit 8ab768 from Tue Jul 10 17:45:23 2012 +0100. However, FreeType seems to be missing in some path variable. Here is the output from cmake. $ ...
17
votes
3answers
24k views

How do I set persistent environment variables for root?

To create persistent environment variables, I add the script file to /etc/profile.d directory, for example: # my script export MY_VAR=var_value This works properly for current user: alex@alex-64:...
0
votes
1answer
630 views

How to read the password from variable?

I am trying to move my file to another system which is located in some other place, with this command: rsync -avrz src destination It works fine. But what I need is to put this command in shell ...
1
vote
1answer
4k views

setting XDG_DATA_DIRS and XDG_DATA_HOME

I made some mistake by setting environment variabel Now i can not launch any application from the console and recieve this error: GLib-GIO-ERROR **: No GSettings schemas are installed on the system ...
10
votes
1answer
56k views

JAVA_HOME is not defined correctly [closed]

I installed java jdk hotspot 1.7. When I type java -version I am getting: java version "1.7.0" Java(TM) SE Runtime Environment (build 1.7.0-b147) This is correct. And I tried to install maven, ...
1
vote
2answers
546 views

How do I set and use shell variables?

IRSTLM=$HOME/irstlm I need help setting this variable up. Was wondering if this is correct syntax IRSTLM=/home/user/irstlm Is that possible to run from root? I need it to be done in root in order ...
3
votes
2answers
2k views

How do I set JAVA environment variables system wide?

I work as java/j2ee application developer so kindly tell me how to set JAVA_HOME, JRE_HOME, CLASSPATH so that I may use Tomcat, Mysql ,java all together in Terminal. I may be using all together in a ...
0
votes
0answers
190 views

How to set an environment variable for system users [duplicate]

how can I change the environment variable PATH for all users, even system users which have no home directory? I have tried setting it in /etc/environment and /etc/login.defs but the changed do not ...
3
votes
3answers
1k views

Difference between ~/folder and /home/username/folder when creating a path in /etc/environment

I had an executable script on my ubuntu located on ~/project/ directory and I tried to add that path to /etc/environment . So , I edit the path to this PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/...
28
votes
5answers
28k views

difference between bash.bashrc and /etc/environment file

Till date I used to set my environment variables in the bash.bashrc file. Recently I was told to use the /etc/environment file. Well, both work fine. So, what is the difference between them? I ...
4
votes
1answer
633 views

Difference between launching an application from a keyboard shortcut vs the terminal?

What I have observed: When I type emacs in gnome-terminal, it launches in the same environment, with variables set in .bashrc. If I use a keyboard shortcut to the command emacs, it opens in an ...
5
votes
3answers
3k views

“Pointers” with $ Syntax in /etc/environment

Is it valid to have "pointers" in /etc/environment using $FOO syntax? Right now my /etc/environment looks like this: JAVA_HOME=/usr/lib/jvm/java-6-openjdk MAVEN_HOME=/usr/bin/apache-maven/apache-...
9
votes
2answers
33k views

Why doesn't apache2 respect my envvars file?

My envvar files has these lines in it: export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data My apache2.conf has these lines in it: # These need to be set in /etc/apache2/envvars User $...
33
votes
1answer
12k views

Set variable in .desktop file

Is there a way to set the enviroment variable in .desktop file? I'm trying to run application (eclipse) with custom gtk style, so basically I want to get the following result by runing a .desktop file:...
1
vote
1answer
618 views

Correct place to set $BIBINPUTS environment variable

If I set the $BIBINPUTS environment varibale in my .zshrc, it is recognized by emacs-reftex (via emacsclient), if I start emacs from my zsh commandline. However if I start using the menubar or gmrun ...
3
votes
2answers
562 views

Environment variables in motd not working

I’m trying to send user login logs to my email with the users name and location. After making the script I found that environment variables can’t run in this script, I’m hoping that someone out there ...
6
votes
1answer
7k views

Is there a GUI to edit the PATH variable?

There's a GUI in Windows to edit the path variable. I was wondering if there's something equivalent in Ubuntu to do the same.
30
votes
2answers
134k views

What is the PATH environment variable and how do I add to it?

I just installed picc-9.82.9453-linux.run from Microchip website, and at the end it asked me ==> NOTE: You may wish to add the following /usr/hitech/picc/9.82/bin to your PATH ...
2
votes
1answer
2k views

enviroment variables are not loaded

I use Qt Creator to manage my C++ codes on xubuntu 12.04 LTS. I have a bunch of environment variables defined in .bashrc_vars that are loaded in .bashrc. These variables are required for building my ...
7
votes
2answers
863 views

What is the difference between `VAR=…` and `export VAR=…`?

What is the difference in doing $ MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=384m" to doing $ export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=384m" and is there any side-effect of doing either in an SSH ...
22
votes
2answers
57k views

Setting the PATH so it applies to all users, including root/sudo

The instructions in How do I set PATH variables for all users on a server? work to set the PATH for all 'normal' users. However, if I do sudo -s and then printenv PATH the updated path is not shown. I'...
6
votes
2answers
8k views

How to open ~/.pam_environment?

I wanted to set environment variables JAVA_HOME and PATH. So I wanted to open ~/.pam_environment since it is the best place to set environment variables relevant to a particular user according to the ...
96
votes
4answers
139k views

Why ~/.bash_profile is not getting sourced when opening a terminal?

Problem I have an Ubuntu 11.04 Virtual Machine and I wanted to set up my Java development environment. I did as follows sudo apt-get install openjdk-6-jdk Added the following entries to ~/....
0
votes
1answer
934 views

Environment variable blank inside application

I have an environment variable that I've set in ~/.profile with the following line: export APPDIR=/path/to/dir When I log in and load up a terminal, I can verify that the variable is set: $ ...
1
vote
1answer
2k views

symbolic link to /opt

How do you : "Create as administrator (sudo) one link in /usr/bin to the command that you'd like to call (for example with8.5 and tclsh8.5). One time that you had create the links you can run ...
2
votes
4answers
7k views

Setting environment variables when executing Eclipse via Unity launcher icon

My question is a followup for the following: How to pin Eclipse to the Unity launcher? I created Eclipse's icon to the Unity launcher based on the selected answer at the above link. However, when I ...
10
votes
4answers
27k views

How can I reset $PATH to its default value in Ubuntu 11.10?

I accidentally unset all the directories of $PATH while trying to add a new one in ~/.bashrc. I opened a new terminal window as I was editing and now $PATH is empty. I'm worried if I boot from another ...
0
votes
1answer
654 views

Rails application directory has different $PATH value than other directories on the system

I recently installed Rails 3.2.1 (Gem version 1.8.7) running on Ruby 1.9.3 on Ubuntu 11.10. I installed ruby, rails, and gem using rvm. I currently only have the one version installed. When I type "...
0
votes
1answer
1k views

environment variables

I want to ask newbie question about environment variables in ubuntu I'm trying to configure maven3 using /etc/environment. I installed maven manually i.e. unpacked, moved to /opt/maven. My /etc/...
1
vote
1answer
3k views

Default Ruby version set with RVM not recognized by system

I'm trying to get the system to use the Ruby version I've set with RVM. The following commands produce this output: $ rvm use 1.9.2 --default Using /usr/share/ruby-rvm/gems/ruby-1.9.2-p180 $ rvm ...
2
votes
1answer
724 views

Adding directory to PATH, various ways and differences

I have seen the thread How to add a directory to my path? I already have added the directory in my PATH by directly editing the /etc/environment. However, I do not get the command working when I use ...
2
votes
2answers
845 views

Which PATH variable is valid for launchers?

In my .bashrc file I have defined PATH variable, but it seems it's not validated by desktop launchers Where should I define PATH variable so that launchers can pick it up?
1
vote
1answer
246 views

Unable to press 'E' key in bash when I add export EDITOR=vim in /etc/inputrc

When I add the line export EDITOR=vim into /etc/inputrc and start a new session in BASH, I am unable to press the E key on the keyboard. (Well, I can press it, physically, but nothing shows up in the ...
1
vote
3answers
2k views

How to use text extracted from the “grep” command as an argument in a bash script?

I have a file called "krylov_methods", which has text like this: cg - preconditioned cgne - normal equations nash - cg subject to constraint stcg - another method for constraints gmres - ...
0
votes
1answer
1k views

Explanation of exporting a path variable

Was hoping someone can explain what the command to exporting a path variable means? e.g.: alias TEST1="/usr/local/test1" export PATH=$TEST1:$PATH Does the colon append?
7
votes
3answers
21k views

Add bash script folder to path?

I have some bash scripts in an application folder that I'd like to use as if they were on my path. If they were straight-up applications, I'd just add the directory to ~/.bashrc, but these are ...
6
votes
4answers
185 views

Why doesn't changing a variable in a script alter it outside the script?

Let's say I export a variable with the terminal. After that I call a script that alters that variable to something else. But when I return to the terminal and echo the variable, it remains as its ...
8
votes
2answers
2k views

How to add a user environment aware application launcher to unity panel?

Here is my problem: When I search from Unity's Dash Home for NetBeans and drag&drop it to unity launcher it, I observed that netbeans does not have access to my environment variables which were ...
6
votes
3answers
18k views

How do I install the Instant Messaging application IP Messenger?

I've recently downloaded g2ipmsg (IP Messenger for Ubuntu 11.10). However - this comes not as an installable package as previous ubuntu versions. Thus I think I need to compile it. This application ...