Skip to main content

Questions tagged [environment-variables]

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

0 votes
0 answers
22 views

Where to get current http_proxy setting

I have an Ubuntu (22.04) machine, where the proxy is set from GUI. I have a job running in crontab. How can I access the actual proxy settings from the cron job? In normal shell, there is an env ...
pihentagy's user avatar
  • 101
0 votes
1 answer
46 views

Why isn't ~/.config/environment.d/*.conf taking effect?

I created the file ~/.config/environment.d/30-electron-ozone-wayland.conf with these contents: ELECTRON_OZONE_PLATFORM_HINT=auto This should set the environment variable ELECTRON_OZONE_PLATFORM_HINT ...
Flimm's user avatar
  • 42.5k
1 vote
1 answer
78 views

How to permanently set an environment variable avaialble to a snap app?

Is there a way to permanently set environment variables for a particular snap app, or for all snap apps? I want to start my snap app with a particular environment variable without having to start it ...
Stefano's user avatar
  • 119
2 votes
1 answer
681 views

Where do UBUNTU_CODENAME and / or VERSION_CODENAME come from?

In these directions for installing the Docker Engine https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository, an example script is provided and beneath it the comment "If you ...
glaucon's user avatar
  • 233
0 votes
0 answers
333 views

I get java.awt.HeadlessException: No X11 DISPLAY variable was set. on Ubuntu server

Hi im running a server with Ubuntu 24.04 LTS , i'm running several minecraft servers on it and now when i try to install a new one i get this error, java -jar forge-1.20.1-47.2.20-installer.jar Host: ...
Slanigt's user avatar
  • 11
3 votes
1 answer
353 views

How to manually set system wide proxy used by gnome-control-center in Ubuntu 22

How do I manually from terminal set the value of proxy server read by gnome-control-center? It doesn't use the http_proxy environmental variable and I notice apps such as Browsers uses value in the ...
Mab's user avatar
  • 133
0 votes
2 answers
38 views

Which scripts modify the path envirorment variable?

Which scripts modify the path environment variable? What methods can I use to determine which scripts modify the path environment variable?
Lead Vaxeral's user avatar
2 votes
1 answer
452 views

Environment variable LOGNAME or USER does not correspond to effective user id

I'm running an Ubuntu 20.04.6 LTS server. The server hosts some Virtualbox virtual machines that I backup with a bash script on a daily basis. That works quite fine. The bash script also sends some ...
Matth's user avatar
  • 41
-1 votes
2 answers
102 views

I in linux system I geting many same exported path variable

In my ubuntu system I getting same env variable many times This is the output of echo $PATH | tr ':' '\n' | less command in zsh shell /opt/some/bin <<< /Users/pritam/Developer/system_script /...
Pritam's user avatar
  • 1
1 vote
2 answers
196 views

Concatenate string after grabbing environment variable

I'm trying to concatenate a string with a variable which is in .env file. My .env is this: API_URL=http://localhost:3030 NODE_ENV=development And here is my code: [ ! -f .env ] || export $(grep -v '^#...
sundowatch's user avatar
1 vote
0 answers
112 views

What should I use in instead of ~/.pam_environment (deprecated)?

I used to put user-specific settings like LANGUAGE and PAPERSIZE in ~/.pam_environment, but the manual and the warning emitted on login tells me: Due to problematic security this functionality is ...
anx's user avatar
  • 2,378
0 votes
1 answer
72 views

Trivial pursuit : bash environment variables

I know this works: FNAME="$(basename $LD_PRELOAD)" FNAME="${FNAME%.*}" Can this be expressed in a single line? These are two unsuccessful attempts, thus far: ${$(basename ...
John-L_.'s user avatar
0 votes
0 answers
143 views

Environment variable not set in profile.d script

I created a script /etc/profile.d/mkl_restriction.sh which contains the following line: export MKL_NUM_THREADS=1 When I log in (via ssh if that matters), the variable is not set, but if I run source /...
Kevlar's user avatar
  • 101
2 votes
1 answer
538 views

non-login shell sources $HOME/[.local/]bin to $PATH and I can't find why

OS: Ubuntu Desktop 22.04 I am initially logged in as user carl. I open a shell and echo $0, I get the confirmation that I am in a non-login shell. ("bash", no dash) But when I then echo $...
nocarea's user avatar
  • 23
1 vote
1 answer
344 views

What are the implications of using PROMPT_COMMAND like this?

I would like to insert the return code of the last command in reverse red color and inside brackets ([]) plus a colon (:) just before the bash (PS1) prompt. But, only if the return code is non-zero, i....
FedKad's user avatar
  • 11.4k

15 30 50 per page
1
2 3 4 5
69