Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation instructions completely broken for Linux #13

Open
salim-b opened this issue Jun 20, 2020 · 7 comments
Open

Installation instructions completely broken for Linux #13

salim-b opened this issue Jun 20, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@salim-b
Copy link
Contributor

salim-b commented Jun 20, 2020

To summarise the current situation:

Apart from the above issues, I like your work very much! I've manually copied the last version of index.htm in the repo and the current version of darkstudio.css to /usr/lib/rstudio/www/ and it works fine! 👍🏽

To resolve the problems mentioned above, I'd recommend to have a look at the rscodeio theme. It seems it's enough to run RStudio with root privileges to be able to install the theme (although your darkstudio::activate() function still didn't work that way when I tried it; IIRC because it tries to copy a file to a folder which doesn't exist; rscodeio's (de)activate_menu_theme functions seem to do a better job in this regard).

And anyway, I think it would make a lot of sense to join forces with the developer(s) of rscodeio since the two packages basically share the same goal: Copying some files to RStudio's installation directory with as little user interaction as possible 😉.

@rileytwo
Copy link
Owner

Hey @salim-b! I'm sorry about the Linux installation method being broken... I don't have a way to test for Linux, and I figured if anything was wrong, someone would raise an issue and I'd work with them to make the necessary adjustments.

I looked for documentation about the default installation path for Linux but didn't find anything concrete. Do you have a source for /usr/lib/rstudio being the default installation path for Debian-based distros? If not, I'll just take your word on it and update the package accordingly.

Regarding rscodeio, much of the inspiration for the finer details of darkstudio came from that package. For awhile I didn't bother with scrollbars, buttons, etc. because I couldn't find a way to theme those elements consistently and stably(sp?), but anthonynorth's code made it look trivial. It's nice work.

I'll admit that the installation and de/activation is not so great. This is my first "real"(ish) R package, and was put together quickly in an attempt to get something working. Most of my attention so far has been focused on the activation and making that process simple and smooth, but I do intend to make some changes to the deactivation function and making that more reliable.

And yes, that would make sense. I've thought about reaching out but just haven't gotten around to it yet 😅 .

@salim-b
Copy link
Contributor Author

salim-b commented Jun 26, 2020

(...) and I figured if anything was wrong, someone would raise an issue and I'd work with them to make the necessary adjustments. (...)

Sure, here we go... 😄

Do you have a source for /usr/lib/rstudio being the default installation path for Debian-based distros?

I don't know about any documentation about this from RStudio's side, but you can easily determine that path on any Debian-based distro by running dpkg -c on the downloaded DEB file. The command lists all the files in the package:

$ dpkg -c rstudio-1.3.959-amd64.deb 
drwxr-xr-x root/root         0 2020-05-18 21:18 ./
drwxr-xr-x root/root         0 2020-05-18 21:17 ./usr/
drwxr-xr-x root/root         0 2020-05-18 21:17 ./usr/lib/
drwxr-xr-x root/root         0 2020-05-18 21:17 ./usr/lib/rstudio/
-rw-r--r-- root/root     35057 2020-05-18 20:37 ./usr/lib/rstudio/COPYING
-rw-r--r-- root/root      6124 2020-05-18 20:37 ./usr/lib/rstudio/INSTALL
-rw-r--r-- root/root    177648 2020-05-18 20:37 ./usr/lib/rstudio/NOTICE
drwxr-xr-x root/root         0 2020-05-18 21:17 ./usr/lib/rstudio/R/
...

For the RPM packages (Fedora, RHEL, SUSE Linux) it's the same path, I've just checked the RPM packages of the same RStudio release.

And yes, that would make sense. I've thought about reaching out but just haven't gotten around to it yet 😅 .

Cool! The rscodeio theme seems to only work with the shipped rscodeio editor theme (at least in current RStudio versions), so there's still room for improvement...

And your package definitively has a more catchy name. 😜

@rileytwo
Copy link
Owner

Working on this now.

Can you run ls -lah /usr/lib/rstudio/ for me? Can you also provide the full path to the index.htm file on your machine? On macOS and Windows, the file is in a folder named www; /Applications/RStudio.app/Contents/Resources/www/index.htm and C:\\Program Files\\RStudio\\www\\index.htm, respectively. I assume Linux is setup similarly, but I'm not positive.

PS: The name actually came from a Redditor who said that I missed the chance to name it darkstudio. Originally the project didn't really have a name, and was just "RStudio-Customizations" (which goes to show how creative I am).

@rileytwo rileytwo pinned this issue Jun 27, 2020
@rileytwo rileytwo added the bug Something isn't working label Jun 27, 2020
@salim-b
Copy link
Contributor Author

salim-b commented Jun 29, 2020

Can you run ls -lah /usr/lib/rstudio/ for me?

$ ls -lah /usr/lib/rstudio/
total 304K
drwxr-xr-x  11 root root 4.0K Jun 29 23:49 .
drwxr-xr-x 148 root root  12K Jun 26 20:05 ..
drwxr-xr-x   4 root root 4.0K Jun 29 23:49 bin
-rw-r--r--   1 root root  35K Jun 27 00:02 COPYING
-rw-r--r--   1 root root 6.0K Jun 27 00:02 INSTALL
drwxr-xr-x   2 root root 4.0K Jun 29 23:49 lib
drwxr-xr-x   2 root root 4.0K Jun 29 23:49 libexec
-rw-r--r--   1 root root 188K Jun 27 00:02 NOTICE
drwxr-xr-x   9 root root 4.0K Mai 16 15:01 plugins
drwxr-xr-x   3 root root 4.0K Jun 29 23:49 R
-rw-r--r--   1 root root 2.1K Jun 27 00:02 README.md
drwxr-xr-x  18 root root 4.0K Jun 29 23:49 resources
-rw-r--r--   1 root root 4.1K Jun 27 00:02 rstudio.png
-rw-r--r--   1 root root  495 Jun 27 00:47 SOURCE
drwxr-xr-x   3 root root 4.0K Jun 29 23:49 translations
-rw-r--r--   1 root root    9 Jun 27 00:03 VERSION
drwxr-xr-x  10 root root 4.0K Jun 29 23:49 www
drwxr-xr-x   2 root root 4.0K Jun 29 23:49 www-symbolmaps

Can you also provide the full path to the index.htm file on your machine? On macOS and Windows, the file is in a folder named www;

It's the same on Linux. Full path:

/usr/lib/rstudio/www/index.htm

@pablillocea
Copy link

Over two years later, the problem persists. I was wondering if there has been (or if there is any chance there will be) any development on this front.

rileytwo added a commit that referenced this issue Nov 25, 2022
@rileytwo
Copy link
Owner

rileytwo commented Nov 25, 2022

@pablillocea I just updated the Linux paths in index.R.

# RR: `lib`, not `local`, for Linux common distros. #13`

Can you try to reinstall the package and let me know if you run into any issues?

@pablillocea
Copy link

Thanks for the reply!

I uninstalled the packaged, installed it again, run the command and same error: Error in dirname(path) : a character vector argument expected.

I'm on Arch and Fedora. Neither worked. At least the Arch package I know it's based on the apt version, so if you based it of off Ubuntu/Debian, then it should have worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants