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

learn more… | top users | synonyms

0
votes
1answer
87 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 ...
1
vote
2answers
483 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
233 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? ...
7
votes
4answers
4k views

Prevent SSH client passing TERM environment variable to server?

I'm currently using Fedora 18 gnome-terminal, then started tmux multiplexer in it. After I connected to a CentOS 5 server via ssh command, I find: ls result has no color tmux, screen, hexedit, htop ...
1
vote
2answers
503 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
1answer
220 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 ...
1
vote
1answer
442 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 ...
2
votes
1answer
2k 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 ...
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 ...
6
votes
1answer
1k 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
3k 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 ...
-1
votes
3answers
1k 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
2answers
700 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 ...
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 ...
0
votes
3answers
982 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 ...
6
votes
2answers
276 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
251 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 ...
1
vote
1answer
233 views

Environment auto-install script

When I work, I often have to switch computers or virtual machines which means that every time I switch, I have to set up my (Linux) environment again. Is there a tool (in contrast to a simple bash ...
2
votes
3answers
136 views

Bash - setting environment vars from bash invocation line

I'm looking for a way to manipulate some env var, which will be available for processes spawned by bash. Something like the below (of course, the syntax is not correct) /bin/bash VAR_X=2 and then ...
2
votes
3answers
4k views

Storing a list in a variable

I am trying to store the name of list of files that contain 781 in their name. I will be using this list to perform some operations and after that I will delete this list. I have two options to do ...
0
votes
1answer
376 views

difficalty to save traceroute output in shell variable?

I need to filter and store traceroute output in shell variable (array). But I am getting some unusual output. As I try to explain in following lines. My present directory is temp, having some ...
2
votes
3answers
977 views

What is the difference between '.' and 'source' in shells? [duplicate]

Possible Duplicate: running script with “. ” and with “source ” I have used both the dot command '.' and 'source' to reload a given rc file (typically to update my environment variables) ...
3
votes
2answers
833 views

Environment variable set but not respected

I find the following behavior a little confusing, can someone please explain why it happens? In /etc/bash.bashrc I have: EDITOR=vim And it is indeed set: lev@home ~ $ echo $EDITOR vim I would ...
5
votes
1answer
653 views

Difference between environment variable and shell variable

It is said that environment variables are inherited in child processes but shell variables are not. However the following test shows shell variables are seen in child process just as environment ...
3
votes
1answer
481 views

Why can I only use apt-get when I use “su”?

Not sure what info you need here, if any. Just let me know. I have a proxy that bypasses the corporate net set in my profile file for both su and normal user. When I do a sudo or regular apt-get ...
2
votes
2answers
98 views

Can I change the shell used to run GUI applications from a Desktop Manager?

A bit of background I'm a developer and I install most of my tools in my home folder. So my shell's rc file is full of JAVA_HOME, GROOVY_HOME, MAVEN_HOME, ... variables. To expose all these ...
1
vote
0answers
37 views

Modify environment variable in a running process [duplicate]

Possible Duplicate: change environment of a running process Is there a trick to modify an environment variable in a running process? I need to add a repository at the end of PATH. I have ...
8
votes
2answers
653 views

Interactive shell with environment identical to cron

I am aware of a lot of pitfalls in the magic world of crontabs, but sometimes it would help troubleshooting a lot when you have some smart way to enter an interactive (bash) shell with exact identical ...
7
votes
3answers
16k views

How do I set an environment variable on the command line and have it appear in commands?

If I run export TEST=foo echo $TEST It outputs foo. If I run TEST=foo echo $TEST It does not. How can I get this functionality without using export or a script?
2
votes
1answer
106 views

Is there a way to define the preferred merge or diff tool under Unix?

I know that you can define the preferred editor by setting the EDITOR environment variable. My question is if there is a similar solution for setting the preferred merge or diff tool.
10
votes
2answers
1k views

How can I create a clean shell environment for temporary use?

I am a frequent answerer on a Unix-focused popular Q&A site, and in many of my answers I provide examples using the bash shell. However, each time I do this I have to manually go through the ...
3
votes
0answers
118 views

tab-expansion and “./” bash shell [closed]

Maybe someone here would be able to help me out. Have installed Ubuntu 12.04 LTS (kubuntu) on two machines. The .bashrc and .bash_profile files are identical as the file structures on each machine is ...
2
votes
3answers
265 views

What is the difference between ./script and . ./script? [duplicate]

Possible Duplicate: Using ‘.’ to execute files in bash I was trying to figure out how to export my environmental via script instead of changing my .bashrc file. I found this old useful ...
4
votes
3answers
1k views

Bash shells with different environment variables

I want to somehow enter a different bash shell with some altered environment variables. For example, if I run script bfin.sh and it contains something like export PATH=/home/me/bfin2012:$PATH I ...
0
votes
1answer
889 views

Setting up enviroment variables in Ubuntu

I am trying to setup up my enviroment variable in my Ubuntu machine. Now i did some research and tryed the method on this question Set environment variable in Ubuntu Similar question but the thing is ...
0
votes
2answers
982 views

$PATH in /etc/profile not inherited by user shell

I have this in /etc/profile in Fedora 17: PATH=$PATH:"/usr/pgsql-9.2/bin" EDITOR="/usr/bin/emacs -nw" PSQL_EDITOR="/usr/bin/emacs" PAGER="/usr/bin/less" export PATH USER LOGNAME MAIL HOSTNAME ...
4
votes
2answers
900 views

How to add a path to system $PATH for all users's non-login shell and login shell on debian

I installed some programs in /opt/my-program/bin, I wanted to add /opt/my-program/bin to system $PATH for all users's non-login shell and login shell. What should I do? Changing /etc/environment is ...
4
votes
2answers
318 views

Inhibit Variable Expansion in Paths

How do I prevent Zshell (and Bash I assume) from expanding environment variables in paths be completed as shown in the following example: $PREFIX/alt/li should expand to $PREFIX/alt/lib and not ...
17
votes
3answers
3k views

How to run a program in a clean environment in bash?

I want to run a program in an empty environment (i.e. with no envariables set). How to do this in bash?
4
votes
2answers
2k views

Change user and load entire environment in shell script

I'm having some trouble with an upstart script of ours that changes user and starts up a few ruby daemon processes. In the past i would simply bash -c "do the business" -l someuser making sure to use ...
3
votes
1answer
392 views

Environment settings on setuid executables

I am observing a curious behavior when running a program with setuid bit enabled. Program foo is owned by user bar with setuid bit set. User execbar runs foo foo reports that one of the dynamic ...
2
votes
2answers
1k views

Sharing Variables across sub shell scripts

I have a Main shell that runs a profile, The profile contains some variables such as Count. When I call the main shell, it loads the profile and then call another shell script. I want that inner shell ...
4
votes
3answers
5k views

How to add a path to system $PATH for all users's non-login shell for debian

After installing some programs in /opt/xxx/bin, I want to add /opt/xxx/bin to system $PATH for all users's non-login shell. What should I do?
2
votes
1answer
1k 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 ...
3
votes
0answers
254 views

assigning a multiline variable (tcsh prompt) to another

For tcsh, I have a prompt that is multiline: set prompt = "%/\\ %n@%m[%h]% " This shows the cwd on one line and then the user/host on second line. However, with this, I cannot make a copy of that: ...
4
votes
2answers
9k views

How to export LD_LIBRARY_PATH to all users and system services

I want to export LD_LIBRARY_PATH to system services and all users. System services are run before login, so .bashrc is not applicable. How to achieve this?
10
votes
1answer
274 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 ...
2
votes
2answers
1k views

How to automatically add new path to $PATH variable after RPM packet installation?

I want to automatically add a new path to the $PATH variable each time when my RPM package is installed. I tried to use a post installation script in the my RPM. Here is the part of RPM spec file ...
8
votes
3answers
1k 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 ...
0
votes
2answers
699 views

How to set environment variables permanently for one user [duplicate]

Possible Duplicate: How do I set a user environment variable? (permanently, not session) I have a user XX and I want to set the env variables for it. I looked for .bash_profile in the home ...