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

learn more… | top users | synonyms

10
votes
1answer
283 views

How do you set up the environment for es?

I've been playing with es the last couple of days, and it (like rc) has the quirk/feature that it only runs its startup script (.esrc) on login. The usual way to run code in each interactive session ...
3
votes
3answers
2k views

Why do 'ssh host echo $PATH' and printing the $PATH after ssh'ing into the machine give different results?

On a particular host, when I ssh into the machine and enter echo $PATH I get /home/wxy/bin64:/home/wxy/bin:/usr/kerberos/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin and if I ...
-3
votes
1answer
8k views

“not a valid identifier” when I do “export $PATH”

When I run export $PATH in bash, I get the error not a valid identifier. Why? Here's my ~/.bashrc file # ~/.bashrc: executed by bash(1) for non-login shells. # see ...
9
votes
3answers
2k views

Why $SHELL doesn't change when I run new shell?

$ echo $SHELL /bin/bash $ /bin/ksh93 $ echo $SHELL /bin/bash $ file /bin/ksh93 /bin/ksh93: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for ...
2
votes
4answers
117 views
1
vote
3answers
3k views

Get environment variable of other user [closed]

Is there a way I can see the environment variable of an other user? I want to do that as root, so permissions won't be a problem I guess. For the user himself, I use echo $PATH or set | grep PATH ...
3
votes
2answers
3k views

How does the path enviroment variable work in linux?

I'm confused how does the enviroment path work under linux, I'm a Linux Mint 15 user. First, I read about editing the /home/.bashrc file and doing a PATH=$PATH:/directory, but I also knew about ...
0
votes
0answers
31 views

Spurious “command not found” [duplicate]

I am in the process of trying to build and install pjsua on my embedded board running linux with a kernel which is a variant of 2.6.18.. The board is booted via nfs from my filesystem. I have built ...
7
votes
2answers
11k views

How to alter PATH within bash script?

I have several projects that require me to change versions of Java/Grails/Maven. I'm trying to handle this with some Bash scripts that would make the changes. For example: #!/bin/sh export ...
2
votes
2answers
723 views

Checking if PATH contains $HOME/mydir and adding it if not (all in a script) [duplicate]

Possible Duplicate: keep duplicates out of $PATH on source I am not an expert with Unix scripting. Some of my scripts are located in $HOME/mydir. Unfortunately, they are not accessible from ...
0
votes
1answer
230 views

Fedora 7 server export in .bashrc not getting set [duplicate]

I'm trying to set the JAVA_HOME environment variable in my .bashrc but every time I log back in it gets unset again to its original value, below is my .bashrc file # .bashrc # User specific aliases ...
2
votes
1answer
2k views

export PATH only once per login in zsh

I need to alter my PATH variable so I put export PATH=$PATH:somedir in my $HOME/.profile which is sourced by my $HOME/.zshrc. This works, yet whenever I open a new terminal (urxvt in X11), .zshrc ...
-1
votes
3answers
2k views

How to run a shell script with export command in crontab

I have a shell script that exports values of variables when executed. The same values will be used in another script. How to run this script(test.sh) in cron. #!/bin/sh export I="10" echo $I I will ...
1
vote
3answers
405 views

SUDO: Username condition in sudoers file

I'm trying to allow my user (via sudo, launched in a script) to copy a file from their home to a web directory. Command would be: sudo cp /home/$LOGNAME/file_source /var/www/$LOGNAME_file_dest So ...
4
votes
4answers
3k views

What is the `editor` command in bash?

I was looking for a command that would hopefully open the current user's favourite text editor, because I am writing out some instructions with commands in a blog. I was expecting a command like edit, ...
1
vote
2answers
17k views

How to set environment variable JAVA_HOME that will be saved on exit? [duplicate]

Possible Duplicate: How do I set a user environment variable? (permanently, not session) I use Suse. First was installed jdk7, so JAVA_HOME remains like: /usr/java/jdk1.7.0_05/ After I ...
15
votes
4answers
4k views

Why do I have to re-set env vars in tmux when I re-attach?

I mainly work on a mac and ssh/tmux attach to a Linux machine to do my work. I have ssh-agent running on the Linux machine. I have set -g update-environment "SSH_AUTH_SOCK SSH_ASKPASS WINDOWID ...
5
votes
3answers
18k views

How to change locale environment variable?

I have generated en_US.utf8, et_EE.iso88591 and ru_RU.utf8 localisation files. Now if I try to change any of the locale variables to a ru_RU.utf8 or en_US.utf8, then this does not have any effect: # ...
3
votes
3answers
253 views

Where is the environment string actual stored?

But when we first time we adding a new name,we have to call malloc to obtain >room for a new list of pointers. We copy the old environment list to this new area and store a pointer to the ...
1
vote
2answers
571 views

How do I set an environment variable for sudo in MacOS?

I have installed ServiceMix on my machine, and am trying to start it. The startup script is called start.sh. When I did ./start.sh, it gave me a Permission Denied message. So I used sudo ./start.sh, ...
1
vote
4answers
305 views

linux shell global linux memory in mem variable - from shell

Is there any way for me to set an env variable without editing files to be in memory and effect other shells as well, which will take effect on any new user who connects that machine and will take ...
1
vote
1answer
290 views

Why ssh -nq -t can't see my environment variable?

I am executing a command on remote machine with -t flag ( to prevent the command from 'blocking' ) the prompt (somehow it works that way). So I am using ssh -nq -t root@ip but with this, the script ...
0
votes
1answer
540 views

Difference between sudo su - user and sudo -iu user [duplicate]

I was wondering if there were any difference (in environment ?) between doing sudo su - user and sudo -iu user From what I know: By using sudo su - user I open a new shell as user, and the ...
1
vote
1answer
2k views

Setting locale for user

I'd like to set a locale for my user different than system locale. By putting export LANG=en_US.utf8 in .bashrc I could do that for the shells, but still it's not working for applications not started ...
5
votes
1answer
184 views

Permanent Environment Variable for all users

I want to have all users on the system to have an environment variable named SPI that points to /usr/local/share_ideas directory. How do I do it?
8
votes
4answers
3k views

Adding paths to PATH using a multi-line syntax

As far as I understand, the usual way to add a path to the PATH environment variable is by concatenating paths separated by the : character. For example, if I want to add three paths to it ...
2
votes
1answer
44 views

Installing packages and tools on a local non-standard directory

TLDR: What environment variables should I update to guarantee that my system has access to everything a package provides when building it on a non-traditional path? I usually don't have root access ...
3
votes
1answer
256 views

Why is uname -M returning an empty string?

On the exact same machine (AIX 6.1), in 2 different login shells (both ksh), with different user IDs, I can do uname -M; in one shell I get the system model. In the other shell I get BLANK! The only ...
1
vote
1answer
76 views

Effect if any of changing LD_LIBRARY_PATH environnment variable on emacs fonts?

The rendering of my emacs fonts changes if I define a specific list of directories under the LD_LIBRARY_PATH environment variable just before I call emacs. I changed this because I wanted to use emacs ...
1
vote
2answers
208 views

How to print shell variables and values to be able to copy/paste them?

In Bash 4.2.25, the set and env output is not escaped, so shell escapes and any non-printable characters won't be copy-pasteable. Take for example this shell session: $ export foo=$'a\nbar=\baz' $ ...
4
votes
4answers
849 views

Detecting X session in a bash script (.bashrc etc.)

Recently I put xset b off to my .bashrc. Now I'm annoyed by the error thet pops up when I log in via tty or via ssh, i.e. outside X session. First thing that came in my mind was [[ -z "$SOME_VAR" ]] ...
3
votes
5answers
2k views

Environment variable does not seem to work in sudo

I use apt behind a firewall, so I specify a proxy in the http_proxy environment variable. What I have done is added the following line to both .profile and .bashrc (for good measure) of the root ...
1
vote
4answers
381 views

Environment of another user in a child process

I have a parent process running as 'root' user. After fork(), execl() and setuid()/setgid(), the child process is started as another OS user (say user1). Printing the environment shows that this is ...
0
votes
1answer
98 views

Colon breaks the variable subsitution [closed]

I am trying to lookup some C functions so that I could debug while using strace. So I setup a bash function to look it up in firefox (or links), but the substitution falls apart with : and escaping ...
14
votes
3answers
8k views

How to read environment variables of a process

Linux's /proc/<pid>/environ does not update (as I understand it, the file contain the initial environment of the process). How can I read a process's current environment?
1
vote
2answers
607 views

Backup to a synology NAS with bup

I am trying to make a remote backup to my Synology NAS (DSM 4.1) using bup. I compiled bup on my NAS from source, did there: BUP_DIR=/volume1/public/Backups/bup bup init Initialized empty Git ...
3
votes
1answer
288 views

How to print apparently hidden environment variables?

Environment variables can be shown with env; but, some are not shown. For example... echo $EUID might produce as result of 1000 yet env | grep EUID produces no result. What is this type of variable? ...
1
vote
1answer
557 views

Set environment variable for all of tmux shells when gnome-sessions gets restarted

To solve this problem, I need to set the environment variable DBUS_SESSION_BUS_ADDRESS for all shells inside tmux every time I restart gnome without restarting tmux (this is often). How can I best ...
1
vote
1answer
277 views

Variable expansion did not happen in /etc/environment

I changed the /etc/environment to add more directories to the PATH variable. But looks like $PATH in double quotes were not expanded and I could find any command from the shell and ...
0
votes
2answers
1k views

Is there anyway to set a readonly environment variable?

I am using the following in openssh/telnet code, which sets the user environment. setenv("TEST_ENV", "testing", 1); But this can be modified by the user, is there anyway to make it readonly env ...
2
votes
1answer
3k views

Users home path in a bash script

I'm writing a bash-script that will be run as a cron job everyday. Very basic, I was wanting to change the wallpaper daily. I have mint-14 with mate. The thing I'm getting caught up on right now ...
6
votes
1answer
2k views

grep: Ignoring GREP_OPTIONS to search case-sensitive

I have set GREP_OPTIONS="--ignore-case --color" in ~/.bashrc as I normally want grep to work case-insensitive. However, there are times when I need grep to actually search case-sensitive, but the man ...
1
vote
1answer
4k views

Set global environment variables at boot in Solaris 11

I am wanting to create a file in Solaris, so that I can export a few "items" whenever the machine is started up. i.e. I want to export ORACLE_HOME and ORACLE_SID and some other directories, of my ...
3
votes
1answer
1k views

How do you make DISPLAY variable undefined?

I am using Ubuntu, but I think this applies to all Linux. What's the command to set DISPLAY to be undefined in the shell?
2
votes
1answer
1k views

How to run Steam from the Xfce desktop?

I've installed Steam on Debian 7.0 without any hassle, and I can run it by typing steam &. I've set it as a desktop launcher in Xfce, but when I ran it, nothing happened. Then I've check the ...
1
vote
2answers
905 views

OS X setting environment variables

I have OSX 10.8.2 with ZSH as my shell and iTerm as a terminal (don't know if the last thing is relevant). I have to mention that I'm relatively new to OSX. I'm trying to set up some environment ...
3
votes
2answers
2k views

Why isn't my environment variable visible from the command line?

I'm trying to run the James SMTP server on Lion (Mac OS X 10.7.2). When I do this: sudo JAVA_HOME=/Library/Java/Home ./james-2.3.2/bin/run.sh it works fine. However, I'd like to make JAVA_HOME an ...
0
votes
3answers
1k views

LANG environment variable not respected

OS: Mint13 I have set my preferred language to zh-cn via the language support option. This has changed the language of a small handful of things (synaptic, dates and times). However everything else ...
7
votes
1answer
316 views

What does the Enlightenment desktop (E17) environment variable “PANTS=ON” do?

Installing the Enlightenment Window Manager (E17), results in an environment variable being set: PANTS=ON What does this environment variable do? What will happen if I set PANTS=OFF
3
votes
1answer
292 views

Awesome: Incorrect timezone

Typically, I set the timezone of my computer's clock by changing the .bashrc file, appending, say, TZ='America/Los_Angeles'; export TZ such that whenever date is invoked the right time in the right ...