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
15 views

RubyMine doesn't recognize user created environment variables

TLDR: Basically RubyMine does not recognize any user created environment variable when launched from a desktop entry, but when launched from console (using $ mine) it can recognize all the environment ...
3
votes
2answers
141 views

How to set environment variable in .NET systemd service?

I have virtual machine of Linux with Ubuntu 18. When I am running this command sudo systemctl start myservice.service Getting error ● myservice.service - dummyservice in .NET Loaded: loaded (/lib/...
0
votes
1answer
14 views

Where to change PATH in Kubuntu?

What is the correct location to add to my PATH so that it is used across all applications? Currently, my PATH is set in my .zshrc file. However, this prevents GVIM from seeing that path, and prevents ...
0
votes
0answers
25 views

environment variable PATH changes inside script command

I usually tend to keep a log of certain sessions using the useful script command. But, I observed that behaviour seems to change upon using it. To be precise, before using script, the location of ...
0
votes
0answers
27 views

update-alternatives error alternative path doesn't exist

I have seen many questions and answers regarding this problem, but I haven't make it out. When I tried to install another jdk whose version is 1.7.0_71 and use the command like update-alternatives --...
0
votes
0answers
40 views

Passing a variable from one function to another in bash script

Iam new to linux and trying to pass a variable from one function to another in a same bash script. Below is my code: #!/bin/bash -x FILES=$(mktemp) FILESIZE=$(mktemp) command_to_get_files(){ aws ...
1
vote
0answers
31 views

Need to set currency from environment file

Should I use doller sign for currency in all site from env? Is it good practice to use it from env?
3
votes
2answers
84 views

Should I be using a different strategy than “SetEnv” for setting apache environment vars on 18.04?

I'm using Ubuntu 18.04, apache 2 and Python 3.6. In my Python project settings file, I have DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': os.environ['...
0
votes
0answers
27 views

Failure when starting up Jira

I'm hoping you all might be able to help me out here. I have an instance of Jira 7.4.2 running on Ubuntu 18.04, I'm running into an issue where the services are not fully starting up. I've adjusted my ...
0
votes
0answers
59 views

Maven can't read my JAVA_HOME correctly

I just installed maven in my Ubuntu machine (I already installed openjdk11 in my system) and set my JAVA_HOME variable correctly. Maven can't find the JDK of my installation. I am getting this error ...
0
votes
1answer
136 views

Multiple EnvironmentFile(s) for systemd service file

I'm using Celery alongside Django, and because I'm running into This Problem (Gunicorn not having access to OS environment variables) I've had to set EnvironmentFile=/etc/environment within my ...
1
vote
1answer
95 views

Set global environment variables from a custom file

I am trying to execute a file containing environment variables so that whenever I log in, those variables are immediately accessible. The $PATH variable is defined in /etc/environment so underneath ...
0
votes
2answers
42 views

Obtain an environment variable over the network from another computer

I have a myuserid@remotemachine on my network to which I have access via public/private key ssh (ie, doesn't prompt for password, logs me straight in). Is there a way, from Python (or bash, or any ...
0
votes
1answer
28 views

Using environment variables with Node.js

I am trying to prepare my app for production on a ubuntu running nginx. I have been using the dotenv npm package during development, but need a more stable and secure method for production. I have ...
0
votes
1answer
65 views

I have to add add PATH to /etc/environment but it breaks my machine - why?

I'm trying to work with tensorflow on Ubuntu 18.04 using Deep Learning AMI from Amazon which has all CUDA verions installed. However, it's not so easy to make tensorflow 1.X work with GPU because some ...
0
votes
0answers
69 views

how to change /etc/environment from bash

So I messed up. I was experimenting with path environment, and I accidentally edited the /etc/environemnt and added PATH=$PATH:$JAVA_HOME/bin and now I stucked on login loop. I tried to fix my ...
0
votes
1answer
75 views

WSL Ubuntu 18.04 : where is $PATH modified at startup?

In summary, there are entries in my $PATH that i don't know where they are added. Help! My general question is: At which places is my $PATH variable modified when starting up a terminal? My specific ...
-1
votes
1answer
55 views

My System is failed to unlocked

I mistakenly change my variable path of my xubuntu 18.04, i have tried many options found in this platform but is not working for me. Please i need an urgent help Screenshotof my tty4 console
0
votes
1answer
24 views

how to suppress ld.so.preload error messages in gnome-terminal when I launch it

I built a 32 bit shared object and added its path to /etc/ld.so.preload to preload it system wide. It works well and all the applications in my system use it. But whenever I launch gnome-terminal I ...
0
votes
1answer
96 views

Java JNI call FindClass fails from a C++ program

I am trying to follow this tutorial which calls a Java class from a C++ program. A Java virtual machine is instantiated but the call to FindClass fails. The code sample is directly from the tutorial: ...
1
vote
1answer
59 views

How to link a c++ program to jvm (java virtual machine)?

I am trying to follow this tutorial which creates a JVM from a c++ program. The program compiles but when it runs it fails with error while loading shared libraries: libjvm.so: cannot open shared ...
0
votes
0answers
56 views

How to add to /etc/environment?

I use a mac at work, which has /etc/paths to add paths, with the syntax: /usr/foo /usr/bar Using wsl with ubuntu-18.04-ls, I wanted to add "/home/linuxbrew/.linuxbrew/bin" to etc/environment, ...
0
votes
1answer
20 views

why is my output not correct while dividing by a variable in awk?

I wrote a little watch script to watch the load avarage on a Linux server (just for learning purposes and because watch uptime isn't giving the output I want). It works great, but to have the load ...
0
votes
0answers
24 views

$ hdfs envvars is giving error

I've installed Hadoop and default openjdk and set the path succesfully. Running the command: $ hdfs envvars is giving the error: "Could not find or load main class envvars. Caused by: java.lang....
0
votes
1answer
71 views

What does the variable $SHELL do, entered without any command?

I know that $SHELL is an environment-variable, which refers to the current default-shell. echo $SHELL prints the path to stdout. Here the use of it for keeping the terminal window open: How to run a ...
0
votes
1answer
46 views

System wide variables not accessible by System V init scripts

I have a script in /etc/init.d/ called foo.sh that runs six (JAVA) Spring Boot jars. All of the jars require environmental variables to run. This script was added to rc.d via update-rc.d foo.sh ...
2
votes
1answer
93 views

Add an editor to a list of terminal system editors

When you use vipw or crontab or just type select-editor you are presented with the list of the editors installed on the system. How do I add my custom editor to that list?
0
votes
0answers
609 views

how to run or re-load /etc/profile.d/ scripts?

From within the GUI, I'm seeing this result: My problem is exactly that this does not happen in the terminal run under the graphical user interface; neither in Ubuntu 16.04.3 or 18.04. – Thomas ...
0
votes
1answer
184 views

tlmgr not found when run as root

I have installed TeXLive and added /usr/local/texlive/2019/bin/x86_64-linux to my $PATH through /etc/environment, so I should be able to run tlmgr from the terminal. I am able to do that as non-root ...
0
votes
0answers
54 views

add bash script to /etc/profile.d/ to load variables?

As a follow-on to a bash question on setting environment variables, I see: /etc/profile.d/*.sh Files with the .sh extension in the /etc/profile.d directory get executed whenever a bash login shell ...
0
votes
0answers
31 views

how to make environment variables persist?

For this bash script: #!/bin/sh export AccessToken=678 export AccessTokenSecret=wxy export ApiKey=abc export ApiSecret=123 How can I then ensure that printenv run at a later point in time will show ...
2
votes
2answers
213 views

how to use setenv to set an environment variable?

I've tried a few variations on setenv usage, including: thufir@dur:~/powershell/helloPSTwitterAPI$ thufir@dur:~/powershell/helloPSTwitterAPI$ setenv ApiKey="57647625454354365" Command 'setenv' not ...
2
votes
1answer
120 views

How to set environment variables from within powershell?

How do I make foo an environment variable accessible through printenv on bash? PS /home/thufir/powershell/helloPSTwitterAPI> PS /home/thufir/powershell/helloPSTwitterAPI> $env:foo = 'x' * 333 +...
1
vote
1answer
265 views

how to pass a python variable into a bash script?

Can we pass a python variable into the bash environment, without invoking python environment in bash script
2
votes
1answer
167 views

Bash SH - Set a new var name including in that name another var

I just need to create an incremental var name inside a loop. The variable must use "in the var name the number of the cycle". Example inside a loop: # on Cycle=1 MyVar$Cycle=Exec$Cycle # (equal to ...
1
vote
0answers
57 views

After removing sddm and lubuntu-desktop, my desktop environment is missing some environment variables

After removing sddm and lubuntu-desktop, and using startx to spin up a graphical interface with my window manager of choice (cwm), ~/.local/bin is not on the PATH anymore. I googled around and it ...
0
votes
0answers
74 views

Issue setting symbolic link for Julia Lang

I am running Ubuntu 18.04.3 LTS. I guess my question is a general question about symbolic links with a specific set up. However, I am new to Ubuntu and maybe I am wrong and my issue lies somewhere ...
0
votes
1answer
42 views

UnicodeEncodeError when attempting to create a RAID-1 Ubuntu Server

I'm attempting to create a home NAS(Plex) using Ubuntu. I have two 8tb Seagate Ironwolf drives I'll be using in RAID-1 for the storage portion and I've also got a random 500gb drive that'll be used ...
0
votes
0answers
89 views

(environment-modules) Setting up modulefile for Intel compilers

I am trying to install openmpi (not from apt) into my system. I want to use intel compilers (fortran, c and c++) for the compilation. When ./configure my openmpi folder, without module load intel, ...
1
vote
4answers
96 views

BASH variables aren't loading properly on startup

I rarely post a question because I tend to get obsessed with trying to figure things out on my own, but today I am really stuck.... and I've had a long week and my brain is dead... anyways, I am ...
0
votes
0answers
17 views

Using other mpirun environment variable [duplicate]

I'm running some code in Ubuntu and I have alredy installed every required package, my question is: How can I ask to my program to use the new MPI I have alredy installed echo $PATH /usr/local/sbin:/...
0
votes
1answer
102 views

Setting up custom modulefiles in environment-modules on ubuntu 18.04 LTS

Using environment-modules, I am trying to set up custom environment modules for installation of a software by using intel compiler and openmpi. I am not familiar with the method of creating a custom ...
0
votes
1answer
78 views

Set path environment variable in Ubuntu [duplicate]

By mistake, I changed the path environment variable in Ubuntu. Now when I turned my pc on, the login screen is coming and after entering my password and pressing enter, the screen goes away for a ...
0
votes
1answer
141 views

Ubuntu 18.04.3: Set the environment for bash script that runs through Gnome Startup Application

On Ubuntu 18.04.3 GUI, I am using GNOME Startup Application to start my bashscript because @reboot for cron doesn't work for me (cron - crontab's @reboot only works for root? - Unix & Linux Stack ...
0
votes
1answer
178 views

How to permanently change a PATH variable in Debian [closed]

I'm trying to change the directory that is accessed when I call blender in my terminal. This is currently where it is: ...$ which blender /usr/bin/blender And I'd like to instead use the version ...
6
votes
4answers
360 views

Alias for all users

I created a this file: /etc/profile.d/pycharm_alias.sh startPyCharm() {... } alias py=startPyCharm I rebooted the PC, but then the alias is not available: ===> alias ...empty If I login to ...
3
votes
1answer
455 views

CLion doesn't pick up environment variables sourced in bashrc

Long Story (This is X) TLDR / The Problem (This is Y) Now, if running sh /opt/clion/bin/clion.sh from the Ubuntu terminal, CLion does pick up the environment variables sourced in the ~/.bashrc file, ...
0
votes
0answers
34 views

Editing etc/profile.d/foo.sh

Edited my etc/profile.d/foo.sh with the following PXR_PLUGINPATH_NAME = "/usr/redshift/redshift4solaris/18.0.287:&" but on boot I get an error message saying PXR_PLUGINPATH_NAME command not ...
0
votes
2answers
93 views

Allow All Users to Import Python Script

We have a JupyterHub server and it spawns Jupyter notebooks to users. I wrote a Python script and I want all users to be allowed to import it to their notebooks. There is a PYTHONPATH environment ...
1
vote
1answer
139 views

Can't append to PATH in ~./bashrc using $Home

I just want to add a path in ~/.bashrc as: export PATH="$Home/gg/gamit/bin:$Home/gg/kf/bin:$Home/gg/com:$PATH" But when I am using echo $PATH is showing it as: /gg/gamit/bin:/gg/kf/bin:/gg/com:/...

1
2 3 4 5
18