What about R in endless


#4

I’m trying to make RStudio flatpak based on those pull request on https://github.com/cho2/com.rstudio.RStudio, but i got an error when run flatpak-builder.

trying again and no space left on device

You should try another method to install R like @wjt suggest on https://community.endlessos.com/t/r-package-install-method/5826/2


Installing R and R studio
#5

I’ve pushed an updated version of the manifest here: https://github.com/Alexander-Wilms/flathub/tree/rstudio

The development version of RStudio now uses Qt WebEngine, which is already contained in the Sdk, that might fix your memory-related issue. If that doesn’t help, I can upload the .flatpak bundle somewhere.

EDIT:
Flatpak: https://drive.google.com/open?id=1zbS8qOxikEnvS_RfaF22kHsnAYSSRhJO
sha256: fa536aadd981b579bffc9ad33dd48413cd1dcad5496137368aaa419bf56d2e19


Installing R and R studio
#6

thanks a lot for providing the flatpak, I’ll give it a try.


#7

just a curious question: Is the basic R Installation as mentioned here http://web.cs.ucla.edu/~gulzar/rstudio/index.html required before I can use RStudio or is it included in the flatpak?


#8

I don’t know much about R, so all I can say is that I’m building R without any special options an some of the packages listed in the RStudio GUI are already ticked. Also, I installed readxl and that seemed to work fine.


#9

thanks. I am also a R-newbie and a newbie to endless/flatpack etc.

I did a flatpak install --bundle RStudio.flatpak and after some prompts for my password it finished installation. Since I did not have a RStudio in my path, I experimented a bit and finally arrived at the following command for starting RStudio: flatpak run com.rstudio.RStudio

As far as I can see, RStudio works as I would expect it, although I get some error messages in the terminal window, where I started it

Gtk-Message: Failed to load module “canberra-gtk-module”
Gtk-Message: Failed to load module “canberra-gtk-module”
libGL error: failed to open drm device: No such file or directory
libGL error: failed to load driver: i965
Qt: Session management error: None of the authentication protocols specified are supported
[3:3:0308/194148.773589:INFO:zygote_host_impl_linux.cc(107)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
[3:36:0308/204558.970170:ERROR:address_tracker_linux.cc(174)] Could not bind NETLINK socket: Address already in use
libpng warning: iCCP: known incorrect sRGB profile
[3:43:0308/204645.154241:ERROR:object_proxy.cc(573)] Failed to call method: org.gnome.SessionManager.Inhibit: object_path= /org/gnome/SessionManager: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
[3:43:0308/204645.154296:ERROR:power_save_blocker_x11.cc(338)] No response to Inhibit() request!
[3:43:0308/204700.490889:ERROR:object_proxy.cc(573)] Failed to call method: org.gnome.SessionManager.Uninhibit: object_path= /org/gnome/SessionManager: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
[3:43:0308/204700.490945:ERROR:power_save_blocker_x11.cc(410)] No response to Uninhibit() request!
[3:43:0308/204732.339166:ERROR:object_proxy.cc(573)] Failed to call method: org.gnome.SessionManager.Inhibit: object_path= /org/gnome/SessionManager: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
[3:43:0308/204732.339244:ERROR:power_save_blocker_x11.cc(338)] No response to Inhibit() request!
[3:43:0308/204752.332256:ERROR:object_proxy.cc(573)] Failed to call method: org.gnome.SessionManager.Uninhibit: object_path= /org/gnome/SessionManager: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
[3:43:0308/204752.332545:ERROR:power_save_blocker_x11.cc(410)] No response to Uninhibit() request!
[3:43:0308/204822.785046:ERROR:object_proxy.cc(573)] Failed to call method: org.gnome.SessionManager.Inhibit: object_path= /org/gnome/SessionManager: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
[3:43:0308/204822.785120:ERROR:power_save_blocker_x11.cc(338)] No response to Inhibit() request!
[3:43:0308/204842.761663:ERROR:object_proxy.cc(573)] Failed to call method: org.gnome.SessionManager.Uninhibit: object_path= /org/gnome/SessionManager: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown

Can I ignore these messages savely?
Is there something I can include in the way I call RStudio (flatpak run com.rstudio.RStudio) to avoid the DBus.Error messages?


#10

I’ve added some fixes to the manifest. In the meantime, you can use

flatpak run --talk-name=org.gnome.SessionManager --device=dri com.rstudio.RStudio


#11

thanks, when I call RStudio (from your flatpack at Google drive) with these parameters it looks much better.


#12

thanks, but I still do not really know, how I can use the manifest.


#13

Like this:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub io.qt.qtwebkit.BaseApp
flatpak install flathub org.kde.Sdk 5.10
flatpak install flathub org.kde.Platform 5.10
flatpak install flathub org.freedesktop.Sdk.Extension.gfortran-62
flatpak install flathub org.freedesktop.Sdk.Extension.openjdk9
flatpak-builder --force-clean --ccache --repo=rstudio-repo rstudio-build com.rstudio.RStudio.json
flatpak remote-add --no-gpg-verify rstudio-repo rstudio-repo
flatpak install rstudio-repo com.rstudio.RStudio
flatpak run com.rstudio.RStudio

#14

thanks, do I need a dedicated build system for it or can this be done on Endless?


#15

You only need to have the flatpak and flatpak-builder packages installed.


#16

I’m slightly puzzled: I had to sudo the five flatpak install and the flatpak-builder commands. Is this correct?


#17

flatpak-builder doesn’t need root access. All the other commands should work with the --user flag.


#18

Just curious: In my understanding such a manifest should allow flathub to build a RStudio flatpak automagically.

Does anybody know how to trigger that?

GNU Octave made it apparently, are there any reasons why this does not work out for RStudio in a similar manner?


#19

In the meantime I asked flathub admins about automated build of RStudio at fathub and got the answer that this should be triggered by Alexander-Wilms with a pull request, see below, so dear Alexander, please go ahead.

Nick Richards wrote:

Hi Bernhard,
Someone needs to propose it! Alexander briefly pushed it and then closed the PR, so you’d have to ask him.
https://github.com/flathub/flathub/pull/209
Obviously we’d prefer it if the upstream developers were involved. However, you can absolutely download that manifest and build the flatpak yourself on your local machine.


#20

Since it is now four months later and nothing has happened, I start a new try to follow Nick Richards suggestion to get that manifest and build the R-Studio flatpak myself. I’d like to summarize what I did to successfully start the build of a flatpak for R-Studio, although I did not yet install and test it. The build system I am using is a recently installed Q4OS 64bit (Debian based distro with trinity desktop) on an obsolete Athlon 64 dualcore system equipped with a SSD. Q4OS comes default without developer tools installed, so I had to get these first (make, gcc,autotools-dev, default-jdk, openssh-server, and maybe some more which I do not remember). Then I had to enable the stretch-backports repo in aptitude, otherwise flatpak and flatpak-builder would be installed in outdated versions, which do not understand the yaml manifests provided by Alexander Wilms.
sudo apt-get -t stretch-backports install flatpak-builder
gets them in more recent versions (1.0.1 instead of 0.8.9). Then we need
sudo flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo
and (which I found out by trial and error when building RStudio) we have to create and install yet another flathub recipe beforehand, which is also provided by Alexander Wilms, texlive
git clone https://github.com/Alexander-Wilms/flathub.git
but there is no manifest for texlive since the different manifests are in seperate branches of that repo, so we have to
git checkout texlive
to get the manifest, create a working directory
mkdir texlive
and can build and install it:
flatpak-builder --install-deps-from=flathub --install --force-clean texlive \ org.freedesktop.Sdk.Extension.texlive
then we can switch branches to rstudio
git checkout rstudio
flatpak-builder --install-deps-from=flathub --install --force-clean \
--repo=../my-flathub R-Studio com.rstudio.RStudio.yaml
This is still running and I hope it will finish soon so I can check if it works, but in the moment I am confident.

Update after three weeks:
It somehow finished, but did not install itself, due to the fact that I forced a shutdown through the at demon some 8 hours after leaving the system. When I came back last Monday, I restarted the build process, which got through, asking twice for the root password during installation of the flatpak.

RStudio starts up without any problems.

Yet another update: I successfully created a single file bundle with the following command:
flatppak build-bundle my-flathub rstudio.flatpak com rstudio.RStudio
and this bundle installs and starts under endless.

You can download that bundle for a limited time from ftp://ftp.lrz.de/transfer/flathub/rstudio.flatpak and you are welcome to test it.


Installing R and R studio
App center does not list application installed from command line
#21

RStudio flatpak runs at least on two quite different platforms (EndlessOS and Q4OS), see some test results at R Studio Community using R4DS as tutorial.


#22

for instructions to add an icon for R-Studio, see my other post and the solution provided by LeandroStanger.


closed #23