Open emstruong opened 11 months ago
Related to #7, the Arch Wiki, and Posit, the solution I found was to copy the rstudio.desktop
file from /usr/share/applications/rstudio.desktop
to ~/.local/share/applications/rstudio.desktop
.
Then I modified the exec line to be like so
Exec=env RSTUDIO_WHICH_R=/home/boomer/.asdf/shims/R /usr/lib/rstudio/rstudio %F
where boomer is the username.
Then update your .desktop
files by running this in shell update-desktop-database ~/.local/share/applications -v
.
I haven't tested whether this respects the R version in particular directories/projects, but it works well enough for me.
Presumably, it might be also helpful to mimic #7 by setting R_HOME_DIR=$HOME/.asdf/installs/R/<version>/lib/R
as an environment variable, but I don't know if one can set multiple environment variables in the rstudio.desktop
file.
In my testing, adjusting ~/.profile
the way Posit recommends didn't help
Related to #7, the Arch Wiki, and Posit, the solution I found was to copy the
rstudio.desktop
file from/usr/share/applications/rstudio.desktop
to~/.local/share/applications/rstudio.desktop
.Then I modified the exec line to be like so
Exec=env RSTUDIO_WHICH_R=/home/boomer/.asdf/shims/R /usr/lib/rstudio/rstudio %F
where boomer is the username.
Then update your
.desktop
files by running this in shellupdate-desktop-database ~/.local/share/applications -v
.I haven't tested whether this respects the R version in particular directories/projects, but it works well enough for me.
Presumably, it might be also helpful to mimic #7 by setting
R_HOME_DIR=$HOME/.asdf/installs/R/<version>/lib/R
as an environment variable, but I don't know if one can set multiple environment variables in therstudio.desktop
file.In my testing, adjusting
~/.profile
the way Posit recommends didn't help
So far, I haven't been able to get R-Studio to run with the local version of R. If you start from the root of a R Studio Project directory, asdf loads the version of R listed in the .tool-versions
file of that directory. Furthermore, it doesn't seem to appropriately change versions of R when projects are changed using that same instance of R Studio.
I imagine a fix would involve a change in R Studio's codebase in how it opens projects, but I'm not sure.
Provide environment information
To Reproduce
1) Install R Studio 2) Install R 4.3.1 using asdf and set r 4.3.1 as global 3) Try to open R studio through the desktop icon
Describe the Bug
R Studio doesn't start-up, presumably because it doesn't detect a version of R. Yet when R Studio is run in the terminal, it presumably detects that it should use the version of R based on asdf and runs
Expected Behaviour
R Studio should start using the version of R listed as global by asdf.