Questions tagged [environment-variables]
A set of dynamic variables that can affect the running processes behavior and access to resources.
1,002
questions
1
vote
0
answers
48
views
Error: no DISPLAY environment variable specified on WSL
Good morning
I run Ubuntu using the Windows Subsystem for Linux on a Win11 equipped laptop, I've recently tried to install firefox and open it through the CLI but, whenever i give the firefox command ...
3
votes
1
answer
157
views
"sudo command" not working, but after sudo su when I enter command is working [duplicate]
My Ubuntu version is Ubuntu 22.04.2 LTS. I have one user (ahmet) and it is member of sudo. I download intellij idea and I want to use its mvn lib for everyone. I edited /etc/bash.bashrc as in this ...
-1
votes
0
answers
43
views
set variables into PATH in nano .bashrc
It's for a satellite tracking software called STVID. I don't know how to put variables into path while using export in front. It's on Ubuntu.
export ST_DATADIR=$HOME/sattools
export ST_TLEDIR=$HOME/...
0
votes
1
answer
42
views
What overwrites an alias created by a file in /etc/profile.d? (environment variables)
I executed the following command to create an alias file in CentOS 7.9:
echo 'alias ll="ls -alhF --color=auto"' > /etc/profile.d/alias-ll.sh
Then once I restarted the shell, "type ...
1
vote
0
answers
33
views
Is there a way to dynamically set global environment variables for all users, daemons, and background processes?
I have been trying to reach out to an external data source and dynamically assign the payload contents to environment variables on each startup. I've gotten this half working by running a script in /...
0
votes
0
answers
65
views
Setting global environment variables dynamically on startup
I have an Ubuntu 18.04 vm which executes a script via /etc/profile.d. The script reaches out to an external data source (azure, in this case), pulls down some json, and converts it into environment ...
2
votes
1
answer
118
views
Firebase private key file as environment variable
I'm very new to Ubuntu and developing a project based on firebase firestore database. Trying to run services on ubuntu server 22.04. I can connect firestore database (in windows I can do this by using ...
0
votes
0
answers
84
views
Set LD_LIBRARY_PATH for with symlinks
As per the Ubuntu documentation - the only way to permanently set LD_LIBRARY_PATH is by adding a conf file to /etc/ld.so.conf.d/
If I manually run export LD_LIBRARY_PATH=~/nextcloudapp/squashfs-root/...
1
vote
1
answer
147
views
Symlink on /usr/local/bin/ not working
Can someone explain why this is not working??? I don't get it.
$ echo $PATH
/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
As you can see, I have /usr/local/bin in there.
Then the ...
1
vote
1
answer
129
views
Using files in /etc/environment.d
I am trying to setup a brand new installation of Ubuntu 22.10. I need to make some environment variables globally available. I have read in the Man pages that the correct way to do this is to provide ...
1
vote
1
answer
152
views
Cannot use ibus on applications
I'm trying to install ibus. I changed my environment variable XMODIFIERS to ibus, then I log out and login, the variable still the old one, its doesn't change. I tried unset it and export it again but ...
0
votes
2
answers
76
views
Opening gnome-terminal and running a command that uses environmental variables from .bashrc
I am making a .sh file that would be run by Right click -> Run as program by non-power-users. It should open a terminal window and run a docker run command, that uses some environmental variables.
...
0
votes
0
answers
55
views
DISPLAY and GNOME_SETUP_DISPLAY
I am on Ubuntu 22.04.2, under wayland (xwayland)
I echoed DISPLAY and GNOME_SETUP_DISPLAY, but the values differs.
$DISPLAY=:0
$GNOME_SETUPDISPLAY=:2
I would like to know why mismatches
Why?
And what ...
0
votes
1
answer
70
views
KUbuntu 22.04.1, where are these locale variables set?
First time using KUbuntu (22.04.1 LTS); used to use Mate & LUbuntu before.
This is the rxvt-unicode that I'm used to:
This is the new rxvt-unicode in Ubuntu 22.04.1 that I'm having:
Found the ...
1
vote
0
answers
47
views
I dont understand how to use JAVA_HOME
The scenario is 1 system user that is running multiple java services that require different java versions... yes it is a Minecraft server... minecraft 1.17+ requires a different version so I need to ...
0
votes
0
answers
136
views
How to set PATH, HOME, JAVA_HOME variables correctly for working with maven after Java-JDK installations?
I visited the webpage at https://help.ubuntu.com/community/EnvironmentVariables and find out about setting environment variables and local user variables and have got a pretty clear picture. But I am ...
0
votes
0
answers
77
views
Ubuntu service file not finding module from environment
My Linux service runs a script that produces an error that a module is not found.
However, when I run the script from the terminal with the python environment activated the script works fine.
I run ...
0
votes
0
answers
61
views
How do I "Add the installation prefix of "Tolua++" to CMAKE_PREFIX_PATH"?
I'm trying to create a .deb for a game from its tarball.
(https://github.com/Wargus/stratagus)
I believe I've installed its dependencies, but one I'm suspicious of is tolua++, which is a sort of an ...
0
votes
1
answer
547
views
$PATH - No such file or directory (but all files and directories exist)
I am running Ubuntu 22.04 LTS and at first when I was attempting to use a script that would do the following:
. ~/.bashrc
conda activate {env}
I would receive an error that conda init needs to be ...
0
votes
0
answers
97
views
adding permanent custom environment path variable
i am trying to create a permanent path variable following this tutorial:
https://youtu.be/JLjF75b-vMI?t=126 everything worked fine and i was able to cd to my newly added variable's directory, however ...
1
vote
0
answers
78
views
how to fix wrong ram usage in system monitor with environment variables
when I add environment variables to a program's .desktop shortcut, the program appears to only use around 100-250 kb ram when its using 1-3 gb ram.
this problem appears in the applications tab in ...
1
vote
1
answer
61
views
What does ":" do when used in export env variable?
I am just trying to following this post.
I have replaced "/some/directory/" by "/usr/lib/x86_64_linux-gnu/", resulting in
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/...
2
votes
1
answer
135
views
Processing files in a directory with variables
This script will be run on Ubuntu 22.04.1 LTS
I am new to Ubuntu and scripting, but I have written code and o/s scripts in other o/s (mostly VMS) and C (many years ago). I know Linux often puts ...
0
votes
0
answers
102
views
not a valid identifier while exporting path
I have two Cuda installations namely 11.8 and 12, and would like to switch between them without manually editing the .bashrc file and sourcing it again.
For that I have come up with the following ...
0
votes
1
answer
108
views
Symmetric private key generation using ESAPI API TPM
I was going through the ESAPI APIs , I have hosted the TPM simulator on my Ubuntu 22.04 desktop and trying to generate the symmetric private key from one C program and another C program using the same ...
0
votes
1
answer
42
views
How to store long commands in environment variables in Linux?
I want to simply run the long command below.
docker ps -a --format "table {{.Image}}\t{{.Ports}}"
export view='docker ps -a --format "table {{.Image}}\t{{.Ports}}"'
test
echo $...
0
votes
1
answer
239
views
Unable to view the contents of the /etc/environment file
Unable to see the contents of my '/etc/environment' file. I have tried using Vi and vim but still unable to see the contents .
I wanted to add some commands in /environment file to $PATH for which I ...
0
votes
0
answers
61
views
Is there a way to set PS4 globally?
I'm testing an elaborate build system which executes a bunch of scripts as the root user with xtrace on (set -x). I do get the debug output that starts with one or more +s, but I would also like to ...
2
votes
0
answers
633
views
Environment variable SSH_AUTH_SOCK isn't set
Situation:
For public key authentication i use Keepass2 with plugin KeeAgent.
All is right configured in Keepass2/KeeAgent and the key-pair is generated and the pub-key is copied to the server.
...
0
votes
0
answers
344
views
java --version gives error(cannot execute binary file: Exec format error)
I have added JAVA_HOME variable and it gives correct value when I echo it!I also did config java command and chose option auto mode which has high priority. I also set export PATH=$JAVA_HOME/bin:$PATH ...
0
votes
0
answers
126
views
xrandr Unable to Access Attached Displays from Shell (SSH)
I hope you are smarter than I am. I have an entertainment system running Kodi and I have posted similar questions on the kodi forums without finding any useful answers there. I ask again here because ...
0
votes
1
answer
60
views
How to add defined environment variable to a .service file
I'm installing Tomcat and one of the last steps requires to define a .service file for it.
In that file I must define a line with
Environment="JAVA_HOME=path_to_java"
I already have a ...
0
votes
1
answer
38
views
$PATH is different for startup programs
I have a .sh file with echo $PATH. When opening a terminal, the PATH is how it is supposed to be, it includes all the additions in .bashrc.
I open the startup menu and set this script to run on ...
3
votes
1
answer
653
views
Command 'Go' not found after installing on WSL with Ubuntu 20.04. Go is in $PATH
I've been struggling with this (seemingly) straightforward installation. If I run echo $PATH I get the following as part of the output /usr/local/go/bin:/usr/local/go-1.19.2/bin. What's even more ...
0
votes
1
answer
78
views
I need some help and clarify with Python Environment that should communicate with a scripted installer of an SDK
Ubuntu 22.04 (like all other previous versions), comes out with Python already installed by default, in fact if I open the Terminal and type:
cris@cris:~$ python3 -V
Python 3.10.6
So, Phyton is there ...
-1
votes
2
answers
234
views
How to remove a directory's path from the enviroment variable PATH permanently?
I just removed the miniconda3's folder from home/username/, now i want to remove its path from my $PATH variable permanently.
As you can see below, it's the first one:
/home/username/miniconda3/bin:/...
0
votes
0
answers
17
views
Verbosity value used by other bash files
Have set the file opcon.bash where the variable verbos is either undefined or defined to a value of 1 as in the following example. I then source another file console.bash to make it possible to print ...
0
votes
2
answers
367
views
Setting a variable whose value can be used in other console terminal sessions
I would like to set a variable whose value can be retained when instantiating another terminal session. What can I use?
0
votes
1
answer
166
views
Ubuntu Studio 22.04 LTS : How can I modify KDE desktop launchers and use my environment variable
Bonjour, I'm relatively new to linux and have some problems.
A) Cannot modify KDE Plasma launchers.
Though I can launch from a terminal session, the modifications I write to the launchers through ...
0
votes
2
answers
462
views
Where do the special Environment Variable of HOSTNAME and HOSTTYPE stem from?
System
I have an Ubuntu-20.04 LTS Live Server image on a hardware device
Requirements
I wish to set the hostname of a container exactly the same as that of the hostname of the hardware device
Upon ...
0
votes
0
answers
128
views
Installing Oracle Developer Studio on Ubuntu, but Java installation was not found on this computer
I am on Ubuntu 22.03.1. I want to use Oracle Developer Studio as Fortran IDE.
I downloaded
OracleDeveloperStudio12.6-linux-x86-rpm.tar.bz2 from here, unzipped it, and trying to execute it's ...
0
votes
1
answer
2k
views
Ubuntu 22.04 no_proxy seems to be ignored
Proxy has been configured using both the System Settings UI for Network Proxy and the environment variables http_proxy, https_proxy and no_proxy (and also the uppercase versions).
The environment ...
0
votes
0
answers
46
views
need to setup environment variables for php code
cloud --- AWS,
server -- ubuntu,
Webserver --apache2,
servers -- UAT and PROD,
In my Organisation we are using source code has Php,And the code consists all api urls ,passwords ,security credentials(...
0
votes
0
answers
77
views
How to Compile and Run [package] with Cflags Program on Ubuntu Linux
dear community!
I am going to install ringserver.
instruction tells: after downloading and installing (using 'make' command on terminal) "Compiler options can be tuned by setting the CFLAGS ...
2
votes
0
answers
756
views
Passing local environment variables via SSH not working
Running Ubuntu 22 on both local and remote.
I'm trying to pass some environment variables from my local to the remote during ssh; the end goal is being able to define GIT_AUTHOR_NAME as per http://...
0
votes
0
answers
62
views
How to find the environment variable for a file?
I am using the custom package manager spack to manage the packages on my system, including gcc.
I have created the exact same spack installation setup on two computers and want to run a software that ...
0
votes
1
answer
208
views
What action do I need to take, if any, regarding these Flatpak errors?
I am using Ubuntu 20.04 and just ran a Flatpak update (vers 1.12.7). There were two errors. The first one (re: Freedesktop SDK 19.08 runtime) has shown up randomly lately, but the second one is new. ...
-2
votes
3
answers
324
views
Use of hidden file in system path
In 20.04 I used .bashrc to include a hidden folder in my system path:
/home/robert/.local/...
Since upgrading to 22.04, it appears that the system no longer searches this folder. Has this changed in ...
2
votes
2
answers
1k
views
Cannot set JAVA_HOME after installing opendjk with snap
I installed openjdk with sudo snap install openjdk, and
I want to set JAVA_HOME to enable my java related commands in terminal, but it is not working.
I tried the following:
creating a script ...
1
vote
1
answer
251
views
What kind of shell is a gnome-terminal started by a desktop file?
I am testing running Ubuntu 22.04. I don't understand why when opening a gnome-terminal using a .desktop file $HOME/.bashrc is not read although when running the same command in an open terminal it ...