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

Connect to and run R on another host #66

Closed
torbjorn opened this issue Oct 29, 2013 · 6 comments
Closed

Connect to and run R on another host #66

torbjorn opened this issue Oct 29, 2013 · 6 comments

Comments

@torbjorn
Copy link

Would it be possible, and implementable, to connect to an R session on another host, perhaps using ssh, perhaps with tramp.

X-forward will probably be tricky, but personally I'd be happy to run R with DISPLAY=:1 in for example vnc on that other host and just connect with a vnc viewer to see graphics.

@vspinu
Copy link
Member

vspinu commented Oct 29, 2013

I am not aware of a direct method. People are using screen. I never used
it myself but this is how (I think) it works. Start emacs shell, connect
to remote host with ssh, run screen then run R. You can disconnect the
session and connect again later. There must be instructions on the web.

Please if you find anything useful please post here. I will add it to
the ESS documentation.

Torbjørn Lindahl on Tue, 29 Oct 2013 02:47:22 -0700 wrote:

Would it be possible, and implementable, to connect to an R session on another
host, perhaps using ssh, perhaps with tramp.

X-forward will probably be tricky, but personally I'd be happy to run R with
DISPLAY=:1 in for example vnc on that other host and just connect with a vnc
viewer to see graphics.


Reply to this email directly or view it on GitHub.

@DarwinAwardWinner
Copy link
Contributor

You can't connect to an existing R session on another host, but you can start one by selecting a remote TRAMP directory as the starting directory. Make sure to disable tracebug and developer modes, since they don't know how to pass data to remote R processes.

@DarwinAwardWinner
Copy link
Contributor

As for graphics, if you set up your ~/.ssh/config to always forward X11 (see below), then graphics will just work (very slowly, of course).

To enable X11 forwarding for all hosts, add the following in your ~/.ssh/config:

Host *
ForwardX11 yes

You can also put in a specific host name instead of *.

@vspinu
Copy link
Member

vspinu commented Nov 19, 2013

Good point. Thanks. I am adding this to ESS manual. For this to work you need to have x server installed and R to be compiled with X support, and what else? I guess most machines comply with that requirement. amazon ubuntu servers definitely do.

I will try to add screen support by 14.03.

@DarwinAwardWinner
Copy link
Contributor

I'm not exactly sure of all the requirements to do remote graphics. I had the X11 forwarding set up long before I was using ESS, so I just tried it and it worked. But I can say that I use R remotely through ESS and TRAMP quite often.

@torbjorn
Copy link
Author

I tend to use vnc when I work like this, it makes your work session less
lagging.

Sys.setenv( DISPLAY=":1" ) # on remote R, if I ran vncserver on display :1
, and then plot as normal and connect to it with a vnc viewer.

T:

On Tue, Nov 19, 2013 at 8:44 AM, Ryan Thompson notifications@github.comwrote:

I'm not exactly sure of all the requirements to do remote graphics. I had
the X11 forwarding set up long before I was using ESS, so I just tried it
and it worked.


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-28771415
.

mvh
Torbjørn Lindahl

@vspinu vspinu closed this as completed Mar 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants