A set of dynamic variables that can affect the running processes.
2
votes
3answers
58 views
How to export variable for use with sudo?
On Slackware, using sbopkg permits one to build a package from source. Repos is not big as Debian, but it's nice.
Some software can use environment variables,
for example on the VICE c64 emulator, if ...
0
votes
1answer
44 views
How to correctly deal with locally built binaries
I tend to build binaries from sources.
My usual setup is the following
$HOME/build -> this gets the sources
$HOME/programs -> this is where the build happen, so where the binaries are
Once ...
0
votes
1answer
30 views
Why does the PATH variable include invalid directory paths in Fedora 25?
I am using fedora 25, my system in up to date to current date. Then type the command :
$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/blackswan/....
1
vote
0answers
23 views
What is the standard approach for shared home directories for a user across multiple machines?
This is kind of a two-part question. In the case where there are multiple machines for which users get a single home directory - i.e. sshing into any of the machines, a user will find the same files ...
2
votes
2answers
134 views
Why does 'manpath' work and 'echo $MANPATH' does not?
I was just wondering why echo $MANPATH does not work (on my system (Debian Jessie x86_64 GNU/Linux 3.16.0-4-amd64)). The manpath command alone works well:
user@host:~$ manpath
/usr/local/man:/usr/...
3
votes
0answers
29 views
Raise 128KiB limit on environment variables in Linux
Linux seems to have a default limit of 128KiB (131072) on the length of any single environment variable -- any attempt to set an envvar longer than this and then run any program will result in an '...
1
vote
1answer
19 views
How can a script tell if Platform LSF is available in an environment?
We have some shell scripts that presently utilize Platform LSF to manage job execution.
These scripts will eventually be migrated to an environment that uses a different job scheduler.
During the ...
0
votes
1answer
62 views
How can I use ifuse command in a bash script? [duplicate]
When I enter this command in a terminal window, it works as expected:
ifuse "/home/sadi/mnt"
But it is ineffective when used in a bash script run via a .desktop file.
What can I do to use it like ...
0
votes
1answer
52 views
How to access environment variables from UNIX services dynamically?
I have a command-line program that is periodically run by services (either as a cronjob or by systemd) and it heavily depends on environment variables which are not static (that is, they might change) ...
1
vote
2answers
17 views
Variables configured in bashrc still been prompted to be exported
I've the this bash file that I need to export two variables SDK_PATH and BIN_PATH so to not worry exporting them anymore I added them in the ~/.bashrc file but when I run the bash it prompts me that I ...
21
votes
4answers
1k views
What is this Bash syntax: someVariable=someValue command
One of my coworkers has provided me with a Bash syntax that I am unfamiliar with. My Google foo has failed me on figuring out what it does and why/when I should use it.
The command that he sent me ...
0
votes
1answer
40 views
Why are Environment Variables Not Set Gnome
I am using zsh within Terminator. I also use Gnome. When I open up Terminator I found that my $PATH variable was set incorrectly. Checking the box to have zsh run as a login shell corrects the issue. ...
1
vote
1answer
31 views
Why doesn't sudo -E keep my $HOME environment variable?
On my Red Hat machine, when I run the command echo $HOME with my normal user account, I get /home/snrub. When I run the command sudo vim foo.txt and inside vim I type echo $HOME I get /root returned. ...
1
vote
1answer
27 views
python one liner + compare numbers
please advice what is wrong with my syntax ( I use it in my bash script )
export CALC=3.4373
python -c 'print CALC > 2.2'
Traceback (most recent call last):
File "<string>", line 1, in ?
...
0
votes
1answer
47 views
How can I make a custom shell?
I want to have a custom shell in my IDE (like having multiple .profile files). It is only configurable to a single execution, and is currently set to /bin/bash. I want to setup the environment ...
15
votes
3answers
1k views
Why is echo $SHELL always showing /bin/bash? [duplicate]
There is not much to explain here. Just want to know why echo $SHELL always gives the output /bin/bash even though I switch to other shells. What do I have to do to make sure the $SHELL gives the ...
7
votes
2answers
960 views
Why is my environment full of ␀s?
I have a process whose environment is the following:
root@a-vm:/proc/1363# hexdump -C environ
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
0000016c
I've never ...
0
votes
2answers
36 views
Evaluate command stored in Environment variable [duplicate]
A bash script I have limited or no ability to modify is using an environment variable like:
"${SERVER_ADDRESS}"
The actual SERVER_ADDRESS value can only be determined dynamically at runtime so I ...
0
votes
1answer
45 views
How to set environment variable in supervisord using output from a file
What is the good way to set environment variable in supervisord using output from a file?
I need like:
[program:prog1]
command=prog1 -param1 -param2
environment=PASSWORD=`cat .password`
I can use an ...
2
votes
0answers
83 views
/etc/environment doesn't apply to all users on Debian Jessie [closed]
I've just installed Debian 8.6. I want to set http proxy environment variables for all users, so I edited /etc/environment following the guide on Debian's wiki. However, after rebooting, only root ...
-1
votes
1answer
70 views
What are the environment variables by default?
When starting a bash shell process, what are the default environment variables, except those specified in the startup file?
Is it correct that some bash or sh builtin variables (listed in https://www....
0
votes
1answer
15 views
Problems with triggers permission
I was formatting the /var and /home partitions to remove encryption, but for that I backed up all of its contents to restore later. But when I started the system after the process, I realized that the ...
1
vote
1answer
27 views
In which init level /etc/profile or /etc/environment files are read?
TL:DR: In which init level /etc/profile or /etc/environment files are read?
I want to create a service (/etc/init.d/myservice) starting a shell script located at /opt/myservice/myservice.sh. However ...
0
votes
1answer
31 views
How can I see all files which are sourced for an environment variable?
For example, I would like to see all files that are setting $PATH. For some terminals, this could be trivial, but I'm troubleshooting my terminal and having a hard time finding every file where this ...
0
votes
2answers
34 views
printenv exits with error code 1 for non-existent env name
I am on LinuxMint (have tried CentOS too) and have been trying to use the printenv command for a environment variable which may or may not exist. So I want it to print the value of that name if it is ...
1
vote
1answer
43 views
Broken symlink /usr/bin/env?
On my Ubuntu, when I write some script (or using for example Composer) it returns me this error:
-bash: /usr/local/bin/composer: /usr/bin/env: bad interpreter: No such file or directory
This is an ...
1
vote
1answer
49 views
How to edit the environment variable $LD_LIBRARY_PATH?
I want to add the Intel MKL library path to the environment variable
$LD_LIBRARY_PATH. I added the following script in the ~/.bashrc file:
MKL=/home/nby/install_software/intel/composerxe/mkl # this ...
1
vote
1answer
39 views
Linux http_proxy env vars and Firefox websocket connection
The question: is there an env var like http_proxy that will cause Firefox to make WebSocket connections through my proxy when "Use system proxy settings" is selected?
I'm running Linux and ...
0
votes
1answer
36 views
Can I set add something to PATH, system-wide for all users, which has LOWEST precedence?
I can put this in /etc/environment and all users will have it:
PATH=/opt/my/bin
As I understand it, /etc/environment sets initial environment variables, then .profile, .bashrc and similar happen ...
0
votes
1answer
38 views
sh commands in .somefile
I am learning about the sh command and was the following instructions, and would like to understand what it does and its effects.
//.devrun.sh
CLUSTER_DISCOVERY_URL=mongodb://localhost/service-...
1
vote
1answer
30 views
How to modify the shell environment seen by apps initiated via desktop?
Suppose that some random program Foo
modifies its behavior according to the values of environment variables; and
can be started by clicking on some Foo icon available through a graphical desktop.
...
0
votes
0answers
39 views
SSH SendEnv and command=“script” overwrites EnvVariable
I've got the following problem: I try to push/set a EnvVariable via
ssh -o SendEnv=APITOKEN host
on the remote host is the following setup:
this line in /etc/ssh/sshd_config:
AcceptEnv LANG LC_* ...
0
votes
1answer
48 views
How do I store bash env vars in array then access/modify?
I want to store environment variables in a bash array, and then use them in cases where I perform the same operation on all of them (unset, export an so on). For example, if I want to print all env ...
1
vote
0answers
41 views
Arch Linux with Mate ignores exports in ~/.bash_profile and ~/.profile
I use Arch Linux and need to add environment variables on login. I have Plasma, Cinnamon and Mate installed. For some reason the environment variables in ~/.profile and ~/.bash_profile are not set ...
3
votes
3answers
65 views
get Cron to run in the same environment as I get with ssh login
I've a script that runs fine when I ssh to my ubuntu EC2 instance and run it (as the user ubuntu)
I want this to happen when the server boots, so I added it to cron as:
@reboot sleep 10 && /...
2
votes
1answer
32 views
Recommended Way To Associate Command With Environment?
Sometimes I find myself using software (which I don't have the permissions or patience to re-compile) which searches through my PATH looking for its dependencies at runtime, but these dependencies are ...
1
vote
1answer
60 views
Set environment variable for all services running under systemd
I am currently working on a deployment tool that will be configuring environment variables across CentOS7 machines. As it stands, my tool is aware of what variables need to be configured, but is not ...
0
votes
1answer
104 views
Check if Environment Variable exists for an user with su
I'm on it since days, I need to check for an user $1 if an Environnement Variable $2 exists.
I tried some cases :
$ [[ -v a ]] && echo "a ok" || echo "a no"
a no
$ [[ -v $HOME ]] &&...
0
votes
1answer
38 views
su -l root -c “echo $HOME” prints my user home
this is my first post,
I've some questions about su - [user] -c [command]
I've made some searches, I found this thread and this other one who are related to my question.
I'm trying to set an ...
0
votes
1answer
86 views
Can't use latest youtube-dl outside the install folder
I recently installed youtube-dl from github: https://github.com/rg3/youtube-dl
It works if I run it inside the install folder, like this:
$ cd /home/max/software/youtube-dl
$ bin/youtube-dl <url&...
0
votes
0answers
19 views
Is there a plugin or tool for multiple “profiles” in ZSH?
I use oh-my-zsh for all of my console goodness. Depending on what I'm working on, there are certain environment variables that I'm often overwriting either manually or through scripts to make my work ...
0
votes
0answers
23 views
custom init.d script works using sh -x <script> stop but fails when called directly or with service.. why?
I have a custom service and wrote a simple init.d script, serverE. (pasted below) All the service does is start up on a defined port and listen for connections.
The problem is when I run either "...
0
votes
1answer
83 views
/etc/login.defs: ENV_PATH & ENV_SUPATH vs PATH
In /etc/login.defs what are ENV_PATH and ENV_SUPATH used for?
From /etc/login.defs:
# REQUIRED The default PATH settings, for superuser and normal users.
#
# (they are minimal, add the ...
7
votes
1answer
349 views
Set environment variables for gnome on wayland and bash on virtual terminals (or ssh)
Gnome 3.22 uses wayland by default. Gnome on wayland does not read ~/.profile (or ~/.bash_profile or /etc/profile). See https://bugzilla.gnome.org/show_bug.cgi?id=736660.
I have my initialization ...
0
votes
0answers
38 views
Env Variable different from user to root
I'm trying to correctly install qutip, but python is giving me a very hard time. I have kubuntu.
I have installed python 2.7.12, with kubuntu there already was python 3 but this is not giving me ...
0
votes
0answers
10 views
how might it be possible to have different environment variables, depending on which directory my ssh client is in? [duplicate]
A colleague told me that he'd heard this was possible. How can I have different environment variables, based upon the current directory that my ssh client is in?
For example, if I am in in /home/...
1
vote
1answer
32 views
setenv path precedence
I'v got to include the path of a same software but two different version installed in two different location, since I have no edit permission of these file and there are some other softwares in these ...
0
votes
2answers
56 views
How to ask systemd service to reload its environment variables on runtime
Question
My C++ application runs as a systemd service. I need to configure it using environment variables, and be able to reload the value of the variables during runtime without restarting the ...
0
votes
0answers
22 views
Use Environment Variables of User in Target Server during SSH
I am trying to write a script in server1 which will be executed using user1 to execute some commands in server2 with user2
So in server1 if I try to execute the below command using user1, I am not ...
1
vote
1answer
155 views
Setting up environment variables with .sh file [duplicate]
I have created env.sh file the contents of which are below
#!/bin/sh
export M2_HOME=/vagrant/tools/maven
export PATH=$PATH:$M2_HOME/bin
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_65
export ANT_HOME=/usr/...