Adding Xpra as an addin in RSTudio server

add-ins
addins

#1

Hi everyone,

Is that possible to open kdiff3 (http://kdiff3.sourceforge.net/) app inside RStudio pro. Normally we can open the kdiff3 app from a terminal with graphical support (like xpra ). We have installed kdiff3 in our server and tried to call it from the terminal inside RStudio pro but an error occurs. Now we’re trying to add “xpra” as an add-in in RStudio server. I need suggestion is it possible or not...?

note: if you wonder what is xpra check this link ( https://xpra.org/ )


#2

I have to admit, most X11 stuff is pretty far over my head, and I suspect usage through RStudio Server Pro is going to get a bit brittle/fragile!

In any case, the general pattern would be to start a X11 server locally (on your desktop). Then, the DISPLAY environment variable on the server would need to point at the desktop's host. Since you are starting kdiff3 in the terminal, you would probably want to set the DISPLAY variable in the terminal where you are starting that process.

I'm very curious to hear about your success / experience digging into this! Please do report back and let us know how it is going!

I have no idea what an add-in would look like in RStudio or if it would even be possible (needing the client-side / local component). Always fun to see how far these types of things can be stretched, though!


#3

Hi,

Thanks for showing interest in my topic, Let me go straight forward with my requirement. I want to add a web link to Rstudio add-in. Is that possible..? again thanks for the support.
:smile:


#4

Interesting, so do you just mean you want to put a URL in an addin and, when clicked, open that in a new browser window? Or are you looking for something else?


#5

Exactly..! i need to put an URL in addin. so i can put xpra URL, and open whatever service i want with xpra..


#6

I unfortunately do not have a simple example, but RStudio Add-ins allow using either arbitrary R code or an arbitrary Shiny application. As a result, putting a URL into the add-in should be pretty straightforward. You could even open the page in RStudio's browser pane with rstudioapi::viewer().

There is a very helpful overview and tutorial here: https://rstudio.github.io/rstudioaddins/


#7

Hi Cole,

Happy news, I have managed to add a web URL as an add-in. Now I can open whatever on xpra server. In short, we can add URL as an add-in. If you are interested in how I made this let me know I'll share with you. :grin:


#8

Thanks for the update! That is very interesting - I would definitely love to see it. I'm sure others may find it valuable as well, if it is possible to share in the public forum. Well done!


#9

Hi,
We have a function called browseURL("http://your-URL.com"), with this function can open literally any URL,
next step is to add this function as a add-in. Adding a function as an add-in is possible with addins.dcf file.
The instructions how to add the addins.dcf file. is in the link you provided. ( https://rstudio.github.io/rstudioaddins/ ) .