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

learn more… | top users | synonyms

0
votes
1answer
11 views

Does X mangles environment variables?

I'm starting it with startx. Before that I have PS1 in my environment: $ cat /proc/self/environ | tr '\0' '\n' | egrep '^PS' PS1=[\u@\H \w] PS3=> PS2=> PS4=+ From inside X I get: $ cat ...
1
vote
1answer
16 views

How can I consistently set an environment variable for a single program?

I'm using LC_TIME="en_AU.UTF-8" in general, and I'm happy with that. However, when I use Thunderbird, I'd like it to use a 12-hour clock. I've created a custom locale, and it works fine if I launch ...
0
votes
0answers
17 views

Possible to pass env vars into chpst without envdir?

I use runit to daemonize my web application, and I'm trying to see if I can have my process managed by sv not have to have a corresponding envdir for its environment variables. I wonder if I can just ...
1
vote
0answers
36 views

What does CRON=1 do?

What does setting CRON=1 do when set in front of a command? CRON=1 ./foobar.sh I suspect that the cron environment variable does something for printing to standard out. But I can't find anything ...
2
votes
3answers
41 views

Controlling the environ passed to child process by bash

I am using x86_64 GNU/Linux with bash #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { system("set > setc"); // A subset of `$ ...
2
votes
0answers
8 views

Configure where GRUB2 environment block is located

I have Arch, Ubuntu, and GRUB2 installed on a BTRFS filesystem. I'm aware that GRUB cannot write to BTRFS for a variety of good reasons, and therefore cannot save environment variables to ...
1
vote
0answers
24 views

How to set environment variable for BACI compiler and interpreter?

I have installed executable files for BACI compiler and interpreter in my Ubuntu system. But now every time I have to compile my .cm file I have to go to the program folder and run ./bacc and ...
0
votes
0answers
25 views

Set Environment Variable for Ranger File Manager

I've recently stumbled across ranger file manager and immediately took a liking to it. However, there is still a problem I couldn't figure out the solution to: How is it possible to change environment ...
2
votes
2answers
45 views

The 'LANGUAGE' locale variable - how to set English as primary language? A bug in gettext?

The "LANGUAGE" variable is supposed to set the default language and can be used to specify a set of languages, where the next language will be used if a message is not available in the first ...
1
vote
1answer
27 views

$USER not set ssh

On some of my debian wheezy servers there is a global variable $USER that contains the current logged in username and on some this variable is not set immediately at login. How do I set $USER so it ...
1
vote
2answers
42 views

Do programs source .bashrc when run?

I append to my PATH environment variable in my .bashrc file (Ubuntu v12). I also have a service (Atlassian Bamboo) that relies on the modifications to PATH. When I restart the service (which runs as ...
0
votes
1answer
52 views

make custom commands on android 4.4.2

I want to program and debug in my android phone. To do that I downloaded c4droid and it's gcc plugin. after a lot of tries I understood that gcc is in directory ...
5
votes
2answers
58 views

Introduction of env --null

I have tried to extract environment variables in a Python process with help of env --null, which works even for environment variables containing newline character. But on some machines I have ...
3
votes
2answers
46 views

Unsetting environment variable with an empty name

For some reason, my system sets an environment variable with no name. This can be seen in the output from printenv as a line containing only = and causes problems for Python (more specifically the ...
0
votes
1answer
29 views

How does sudo -E work here?

I executed the following command to add a ppa repository in Ubuntu: sudo add-apt-repository ppa:ppaname/ppa This command returned an error that the ppa name format is not correct. Then I looked here ...
1
vote
2answers
63 views

Makefile make install not executing multiple line commands

I have a Makefile that contains an install section to allow me to make install after building the source code. The install section contains two lines of shell commands: install: /usr/local/lib cp ...
2
votes
0answers
69 views

Debian ignores PAM env variables (while Arch doesn't)

I have a weird issue with my Debian Sid system. I want to set a global environment variable in /etc/environment, which is supposed to be read by the pam_env module. Unfortunately, after having relogin ...
2
votes
1answer
50 views

Executable cannot be found

I installed gradle in /opt/gradle-2.2.1 I edited /etc/environment to look like this GRADLE_HOME="/opt/gradle-2.2.1" ...
2
votes
2answers
208 views

sudo as another user with their environment

$ whoami admin $ sudo -S -u otheruser whoami otheruser $ sudo -S -u otheruser /bin/bash -l -c 'echo $HOME' /home/admin Why isn't $HOME being set to /home/otheruser even though bash is invoked as ...
0
votes
1answer
96 views

Please set env variable CHROME_BIN

> node node_modules/karma/bin/karma start test/karma.conf.js INFO [karma]: Karma v0.12.30 server started at http://localhost:9876/ INFO [launcher]: Starting browser Chrome ERROR [launcher]: Cannot ...
3
votes
1answer
29 views

Protecting process's envvars from exposure

From I've read about current best practices for developing web applications (such as the Twelve Factor guide), the recommended approach for storing configuration data is within environment variables. ...
4
votes
2answers
119 views

Share environment variables between bash and fish

bash and fish scripts are not compatible, but I would like to have a file that defines some some environment variables to be initialized by both bash and fish. My proposed solution is defining a ...
8
votes
3answers
346 views

How can I list all shell variables?

Reading about this question: In zsh how can I list all the environment variables?, I wondered, how can I list all the shell variables? Also, does the distinction between shell variables and ...
0
votes
1answer
26 views

how to export nam of logged in user correctly?

I have the following script here. #!/bin/bash #some initial variables DLURL=https://raw.github.com/horvan/drubuntu/master DIRURL=/opt/.drubuntu #Get files to run the installation wget -O ...
3
votes
2answers
136 views

forward function and variables into sudo su - <user> <<EOF

I have declared functions and variables in bash/ksh and I need to forward them into sudo su - {user} << EOF: #!/bin/bash log_f() { echo "LOG line: $@" } extVAR="yourName" sudo su - ...
3
votes
2answers
440 views

What is $PWD? (vs current working directory)

So Wikipedia (link) tells me that the command pwd is short for "print working directory", and that makes sense. But for the environment variable, the "P" has to be an acronym for something else than ...
1
vote
1answer
92 views

systemd: default value for environment variable

I would like to migrate some OpenRC init script to systemd but I think that it is general problem of environment variables handling in systemd. Original OpenRC files There is a file e.g. ...
0
votes
1answer
54 views

Issue due to scope of environment variables

I had an Internet connection problem which turned out to be related to setting up the appropriate proxy environment variables. After adding lines like export ...
0
votes
1answer
35 views

Remove a folder with the same name as an environment variable

I was messing around with a log4j properties file and accidently made a folder with the following text ${foo} however I also have an environment variable named foo that points to a folder so thus if I ...
2
votes
1answer
84 views

clear out all variables without closing terminal

I want to know how to clear all variables which I defined in command prompt without closing terminal ? for example, if I set a variable in command prompt as: $ a=1 now I want to delete the ...
1
vote
1answer
175 views

Storing longer text output in memory in shell variables vs Writing to disk

I have the below call to db2 command line tool inside a loop which runs 100k iterations. (the db2 output is 5 rows of 20 chars approx per each call, total of approx 100k calls. The input to SP is ...
1
vote
2answers
27 views

Why is $COLUMNS not listed by either env or set? (on zsh)

I can $ echo $COLUMNS 95 and get a result, but if I env | grep COLUMNS or set | grep COLUMNS I get nothing. (Update: I just discovered that the behavior is different on bash. I'm using ...
1
vote
1answer
35 views

Exporting Variables from Read

I'm asking the user to input some data using Read that data will be save on a variable that is going to be use in another shell script. However, for some reason is not working. This is what I got in ...
0
votes
2answers
56 views

How can I expand all variables at the command line in Zsh?

In an earlier question, specific to bash, I asked How can I expand a relative path at the command line, with tab completion? I liked @Mikel's answer that mentioned using Ctrl+Alt+e to expand all ...
13
votes
1answer
256 views

Is there a difference between prepending a name-value-pair to a command and using env in bash?

Let's say I invoke A=B command and env A=B command in bash. Is there any situation where there might be a difference between both invokations?
0
votes
2answers
75 views

LD_LIBRARY_PATH always blank after sudo

I get shared library errors whenever I seem to install software manually. Upon executing echo $LD_LIBRARY_PATH it shows up as.. nothing. I've tried adding /usr/local/lib to a .conf file in ...
-4
votes
3answers
55 views

Data Types in UNIX [closed]

I have 2 questions. Q#1: data types & variables I have just begun reading UNIX and came across variable definitions. As per the site I'm referring UNIX variables are defined directly with a ...
0
votes
1answer
225 views

Bash script class path issue with java

Content of /opt/scripts/jvm/jvm.script.sh #!/bin/bash JAVA_HOME='/java' PATH="$PATH:/$JAVA_HOME/bin" java -cp ./classes:./lib com.mystuff.bar.foo.myclass & Content of /etc/init.d/init.script.sh ...
0
votes
2answers
112 views

Percent signs and environment variable in a shell script

While troubleshooting an issue, I came across these entries given below in one of the shell scripts used by our application. This was written by someone who no longer works in the company and I am ...
1
vote
2answers
104 views

where is LD_LIBRARY_PATH? how do I set the LD_LIBRARY_PATH env variable?

where is LD_LIBRARY_PATH? how do I set the LD_LIBRARY_PATH env variable?
1
vote
1answer
120 views

Run an X11 program under Cygwin

How do I set the appropriate DISPLAY environment variable? I try to launch idle in cygwin using the following command: idle ...and I get a display error: _tkinter.TclError: no display name and ...
2
votes
1answer
102 views

Preserve environment variables using systemd?

Do systemd unit files support preserving existing environment variables? (Something similar to sudo -E?) Not referring to Environment= or EnvironmentFile= here. It would be be useful if systemd ...
2
votes
4answers
112 views

Change prompt when starting a terminal from bash script (but don't affect all terminals)

I have two terminals installed, gnome-terminal and xfce4-terminal. I would like to have only the xfce terminal showing a simple > as prompt when I start it. The gnome-terminal prompt should remain ...
0
votes
0answers
12 views

Loading linux environment variables [duplicate]

I have a set of environment variables and i would like to load it automatically on each startup. As of now i am doing the following: In /etc/environment export FLEETCTL_TUNNEL=10.77.189.179 In ...
1
vote
3answers
115 views

How long do the contents of the .bash_history file last?

How can I modify the contents of my bash_history file? What values or variables control how long the history lasts? Are there any other things I can change to provide finer control of my BASH ...
1
vote
1answer
25 views

several virtual profiles for the same user

Many times there are several "identities" which one user uses: for work, open-source, academia etc., all require different ssh keys, editor configurations, git configs etc. I was wondering if there ...
2
votes
2answers
221 views

Meaning of \ before environment variable

In ksh on an old Solaris box I used: export PS1="$PWD $" to set the prompt to the current directory. It works great until you cd elsewhere, then you see that it's not evaluating PWD each time. I ...
1
vote
2answers
86 views

how to use http proxy in terminal

I have to use a http proxy to access Internet. Now I'm using firefox with the http proxy to access Internet. But on terminal, I can' access Internet. So are there ways to use http proxy on terminal ...
1
vote
1answer
147 views

Why is variable assignment preceding command ignored? [duplicate]

The bash 4.1 manpage states (emphasis added)... Simple Commands A simple command is a sequence of optional variable assignments followed by blank-separated words and redirections, and ...
4
votes
4answers
70 views

How to run a script as if it's running at boot?

I have a script running at boot time, however it's giving me errors I see in the log file. When I run it manually, it runs fine - probably the environment is changed. Is there a way to run such a ...