Questions tagged [environment-variables]

A set of dynamic variables that can affect the running processes behavior and access to resources.

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

How to add .env file

I run Ubuntu terminal via windows (installed it via windows insider program) I joined this company as intern and they have a website that they are working on. I was given certain steps to follow, so I ...
0
votes
0answers
12 views

Systemctl - Get environment variable in EnvironmentFile

I'm trying to use gunicorn to provide a Django Application in my server. This application connects with an Oracle database, which demands some environment variables to function properly. I wrote the ...
0
votes
1answer
19 views

After set up environment variables my pyspark fail in ubuntu

I installed pyspark from anaconda like $ conda install pyspark after that in my jupyter notebook it works fine, but in the tutorial https://mortada.net/3-easy-steps-to-set-up-pyspark.html is ...
0
votes
1answer
58 views

Unable to run git command (with ~/.bashrc modified)

I'm using powershell in Windows to clone a repository to an on-premise Ubuntu GPU environment (specifically, NVIDIA-DGX). After successfully ssh, I followed instructions and added the following codes ...
0
votes
1answer
31 views

Bash source + npm script function not exported but variable is

Can someone explain the difference in output when running the following on mac vs linux. test.sh #!/bin/bash testFunc(){ echo "test function"; } export -f testFunc; export testVar=&...
1
vote
1answer
44 views

How to continuosly update an ENV variable (eg PS1) inside a script that runs in the background?

The task is simple. I want to add a countdown timer to the prompt inside a bash script that is defined as an alias function in my .bashrc to make it run in the background when I need (eg "...
0
votes
0answers
23 views

What system exports the PATH environment variable?

I'm trying to track down this bug I just noticed on PythonAnywhere where the PATH environment variable isn't marked for export when running ~/.profile, and I'd like to know what system is normally ...
0
votes
1answer
73 views

How to make an environment variable available for a python program using os.environ module?

I'm just new in this site and new to all the GNU/Linux environment, I'm trying to access to an environment variable from a python program that I wrote in PyCharm, I created it but I the the variable ...
0
votes
1answer
220 views

How to run an executable from any directory in terminal by setting path?

The executable file name is julia. This executable is located at /home/siva/juliapro/julia/bin. I have set the path to this directory, but still, if I enter julia in the terminal, it says command ...
0
votes
0answers
20 views

Using Set terminal - See code in one of the variables. What is it?

When I type set on terminal I see the following. there is code running to a few pages. Wondering what this is and how to get rid of it. XDG_SESSION_TYPE=x11 XMODIFIERS=@im=ibus _=go ...
0
votes
1answer
89 views

How do I know which environment variable file is overwriting my `/etc/profile.d/jdk13.sh`?

I'm trying to install java-13 on Ubuntu 18.04 following this tutorial. I've installed java-11 before which is preventing these commands taking effect sudo mv jdk-13 /opt/ sudo tee /etc/profile.d/...
0
votes
2answers
49 views

What is the Minimum Setup Needed for Setting-up XDG Directories ($XDG_RUNTIME_DIR etc.)?

I'm in a setup (20.04) that is basically headless (a solaris zone, but we could probably consider it analogous to any server sort of setup), and as such, I don't have any graphical environment ...
0
votes
1answer
55 views

How to make a notification system inside a script

I have a (for me atleast) quite complicated question. See below: #! /bin/bash notify=false a=0 while ((a <= 50)) do echo $a a=$(echo "$a+1" | bc) sleep 3s done When I run ...
1
vote
1answer
95 views

How to use bash $variable inside cat <<EOF > Test.html

I am faceing an issue when I want to use variable inside cat <<EOF > Test.html , for example cat <<EOF > Test.html <!DOCTYPE html> <head> <meta charset="utf-8&...
0
votes
0answers
127 views

Apache not starting after switching to PHP 8

on Ubuntu 16 I have installed a new PHP 8.x version, now I have PHP7.0, PHP7.4, and PHP8. After installation PHP8 I changed the PHP version by using. 1) sudo a2dismod php(current_version) 2) sudo ...
0
votes
0answers
65 views

display variable missing

I'm using the windows ubuntu terminal on my computer and I'm trying to run an executable that normally will pop up on an interactive screen. Unfortunately, I've encountered an error =X= Error 65544: ...
1
vote
1answer
64 views

What is the keyboard layout environment variable? [duplicate]

I want a script to run when I press a keyboard shortcut, but only if I’m using a specific keyboard layout (I have 4 installed). I figured the easiest way to do this was with the keyboard layout ...
1
vote
1answer
33 views

A path set in /etc/profile/ doesn't appear on other users' environment

I have the following PATH variable in /etc/profile. The last line should allow me to use the conda command for any user. # /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and ...
3
votes
0answers
242 views

Create debian package with relative install path

I am creating a debian package with a minimal layout (for a hypothetical package called "skate"). Here's the directory structure: ... ├── LICENSE ├── packaging │   └── debian │   └── ...
0
votes
0answers
28 views

system wide environment variable in all shell and login cases

i would like to update the path to all users (system-wide), regardless whether the user performed a login and whether the shell is interactive one - i would like it to hold for all cases. i was ...
0
votes
0answers
48 views

set environment PATH

I recently installed Hitech picc-lite-c 9.81 compiler on my ubuntu 20.04 lts and also i set environment PATH in ~/.profile file as below, # if running bash if [ -n "$BASH_VERSION" ]; then ...
1
vote
3answers
65 views

Make if statement true when variable matches one of the strings in a list

I have a command that will output the following (curl -sSL $location | grep -o "title\=\".*\"\ agent" | grep -o "\".*\"" | grep -o "[a-zA-Z0-9].*[a-zA-Z0-9]...
0
votes
0answers
73 views

Changing variables (outside of while-do loop) with sed (inside while-do loop)

I have a question. See the following: path="/library/metadata/2695/children" location="http://192.168.2.15:32400$path?X-Plex-Token=[[plex token]]" option="4" Inside ...
0
votes
1answer
79 views

how to run firefox as a different user?

how do I determine whether this is starting firefox literally as a different user: nicholas@mordor:~$ nicholas@mordor:~$ xhost + access control disabled, clients can connect from any host nicholas@...
0
votes
1answer
108 views

Where do I find llvm for compiling Qt documentation

Note: To build qdoc and Qt documentation in future you should set LLVM_INSTALL_DIR environment >variable pointing to directory where LLVM is installed (it should be top level directory, the >...
2
votes
1answer
237 views

Using xargs and variables

Hey I have a question. This is the command that I'm using (at the place of echo $file is a different command. I simplified it): find /home/cas/plex-media/series/ -type f -name "*" ! -name &...
1
vote
1answer
126 views

How to correctly set environment variable (which may not exist)

I want to set an environment variable LD_LIBRARY_PATH which may or may not exist (it does not seem to exist currently, but I'm not sure if it will at some point). I have successfully managed to set my ...
0
votes
1answer
59 views

Overwrote $PATH [duplicate]

I am new to linux and I was trying to set up path of JAVA_HOME but I accidentally wrote export PATH=/usr/lib/jvm/java-11-openjdk-amd64 which I think overwrote $PATH. I am quite sure I have messed up ...
0
votes
0answers
18 views

Can't login to Ubuntu 18.04

Suddenly i edit the /etc/environmemt variable. after that when i restart my ubuntu then i can't login. when i enter my pasaword and hit enter then it back me to login page. then i press Ctrl + Alt + ...
-1
votes
2answers
729 views

How is “No such file or directory” getting added to my PATH variable?

Today I noticed that my path has an entry No such file or directory at the end, which causing other problems. My path looks like this: /home/geneorama/gems/bin:/home/geneorama/anaconda3/bin:/home/...
0
votes
1answer
68 views

Linux Environment Variables in sudo

I have an AWS ec2 instance running and have hosted a DJango based web app on it. But the problem is I cannot access the environment variables in sudo mode. So while my DJango app's settings file tries ...
1
vote
0answers
91 views

Start intellij from anywhere

I have recently installed Ubuntu and I'm a bit confused. I have downloaded VSCode and I can simply start it from my terminal using code. I downloaded intellij and tried idea and intellij but none of ...
0
votes
0answers
271 views

Add intellij to environment variables

I have recently installed Ubuntu on my system. I downloaded Intellij and CLion using Ubuntu Software. In order to open it from terminal I used the command export PATH=$PATH:./clion.sh this command ...
0
votes
0answers
63 views

I hava a loop login because of problems with PATH environment

I can't login because of the loop. So I press Ctrl+Alt+F3, login and it shows: Command 'lesspipe' is available in the following places * /bin/lesspipe * /usr/bin/lesspipe The command could not be ...
1
vote
0answers
105 views

Where do I define LD_LIBRARY_PATH so that Apache can see it?

I'm using Ubuntu 18.04. I have defined this in my /etc/profile file export LD_LIBRARY_PATH=/usr/local/lib/ I'm trying to figure out where I define the above so that Apache can see it. Currently, ...
0
votes
0answers
35 views

Changing user in Docker container changes bash settings

I'm experiencing this weird behavior: I have a docker image: FROM ubuntu:latest ... RUN useradd -m develop USER develop When I run the container: docker run -it my_image I get a terminal with all ...
0
votes
0answers
27 views

Why values added to /etc/environment not visible

I added an environment variable to /etc/environment. When I: ~$ printenv I don't see it there. Why is that?
1
vote
1answer
60 views

Pass a variable in awk command

spke="myvaribale" var="cidr" val=$azure_spoke2_vnet_cidr clp="azure_vnets" I am placing these variable in this command : I dont want to write this myvaribale in ...
0
votes
1answer
91 views

Make environment variables available for all script and programming language

I've some variables used by GO, Node, and PHP applications on the same server. I'm trying to put all the variables into the system and make them available for all applications. but I tried to put the ...
1
vote
1answer
59 views

Changing environment variables for a specific program Ubuntu 20.04, Gurps GCS using Java [duplicate]

I'm using a program to make GURPS characters (this is a game basically like D&D, with a lot more flexibility) created and run over here: https://gurpscharactersheet.com/ It's made in Java, and ...
0
votes
0answers
137 views

Change temp file location of QGIS in Ubuntu

on a windows machine u can easily change the location where QGIS stores its temp files (see here: https://gis.stackexchange.com/questions/156129/how-can-i-change-the-folder-location-for-qgis-temporary-...
0
votes
0answers
24 views

Are there two or more environment files on Ubuntu Server 18.04.5 LTS?

Hi: I am trying to install OpenJDK on my Ubuntu Server 18.04.5 LTS. The problem is I need to modify my $PATH variable to contain the OpenJDK path instead of the oracle java. java -version gives me ...
1
vote
0answers
519 views

Unable to set/reset IFS

I have Ubuntu 16.04.6 (Edit: Now updated to 16.04.7), with bash 4.3.48(1)-release (x86_64-pc-linux-gnu). I am not able to set/reset my IFS variable. I have tried to set is using the literal CTRL+V ...
0
votes
0answers
17 views

Set a file as “root”-user but using “user”-user's enviroment variables, program, alias etc

The question is a bit difficult to phrase but.. I am fairly new to Linux (running ubuntu 20.04), and I have script which requires "root" to run (it is in /etc/network/if-up.d). The problem ...
0
votes
1answer
44 views

Problem with setting a environment variable

I want to add Intellij Idea to be able to use ./idea.sh outside of my bin directory. I edited my .bashrc to add export PATH=$PATH:/home/xenia/idea-IE-202.7319.78/bin at the bottom of my file. Then, I ...
0
votes
1answer
65 views

bash: Declare local variable in the for expression

This function: function prova { for (( i=1; i<=5; i++ )); do echo test; done return $? } Returns: test test test test test This other instead: function prova { for (( local i=1; i<=...
1
vote
0answers
141 views

Python sees LD_LIBRARY_PATH only when executing as root (Ubuntu 20.04)

I am facing a tricky problem with LD_LIBRARY_PATH in python3.8 on Ubuntu 20.04.1. When I execute with my user the following lines: user@host>export LD_LIBRARY_PATH=/usr/lib user@host>echo $...
1
vote
1answer
76 views

How do gsettings interact and/or conflict with exported enviroment variables? (Ubuntu 20.04)

I am behind a corporate fire wall and have been trying to set up my proxy settings by using export in a shell script located in /etc/profile.d/proxy.sh (see, e.g., How to set system-wide proxy ...
1
vote
0answers
186 views

How to reset PYTHONPATH to earlier value

I had been tinkering with PYTHONPATH for some work and wrote the following in my .zshrc file: export PYTHONPATH="someDirectories:aFewMoreDirectories" I then sourced the .zshrc file and then ...
0
votes
1answer
325 views

Java Installation in Ubuntu 20.4 [duplicate]

This is my first time of using Ubuntu. I am trying to install java jdk-15 in my lap.I applied following steps. sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-15/bin/java 1 ...

1
2 3 4 5
19