Quantcast
Channel: Active questions tagged desktop-environment - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 118

Why RStudio is not picking up environment variables defined in $HOME/.bashrc

$
0
0

I use Arch Linux.

I use SSDM as display manager, but I have disabled it with:

sudo systemctl disable sddm

I have put code in /etc/profile, $HOME/.bash_profile and $HOME/.bashrc to echo when those files are sourced.

My $HOME/.bash_profile is sourcing $HOME/.bashrc (it came like that, I just added the code to echo when this happens):

if [[ -f ~/.bashrc ]]; then    echo "$HOME/.bash_profile is sourcing $HOME/.bashrc"    . ~/.bashrcfi

I am exporting the following variable in my $HOME/.bashrc:

export R_LIBS_USER='MY_VALUE'

I boot my PC.

It shows a prompt (in a TUI/command line) that asks for username and then password.

I put them in and press enter.

/etc/profile is source.$HOME/.bash_profile is source.The latter sources $HOME/.bashrc.This means that R_LIBS_USER is being exported.

I'm redirected to a prompt.

I do:

sudo systemctl start ssdm

Since SSDM is a child of that shell, it should inherit R_LIBS_USER.

SSDM opens and I start a Wayland KDE session.

Since this session is a child of SSDM, it should inherit R_LIBS_USER.

I open RStudio from KDE.

But R_LIBS_USER is still at the default value, not the one I have defined in $HOME/.bashrc.

I show the value of the variable in R with:

Sys.getenv("R_LIBS_USER")

Where is my reasoning failing?


Viewing all articles
Browse latest Browse all 118

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>