[R] Start and Restart R over SSH
Benilton Carvalho
bcarvalh at jhsph.edu
Mon Feb 19 16:14:41 CET 2007
Hi Nils,
if the server you're using is *NIX, this is what you can do:
%%%% example
ssh user at server
screen
R
<< do what you need in R>>
<< close the terminal without quitting R >>
ssh user at server
screen -r
<< continue working in R >>
%%%%%% end example
the "problem" is if you need X... it works until you quit the
terminal, but "screen -r" doesn't reconnect the X11.
b
On Feb 19, 2007, at 9:40 AM, Douglas Bates wrote:
> On 2/19/07, Nils Höller <mail at nhoeller.de> wrote:
>> Hi,
>>
>> I have some big calculations in R to be done.
>> Since I can use R on a server with ssh, i was wondering if I can
>> reopen
>> a R Shell after exiting ssh.
>>
>> I don't want to use the batch mode and nohup doesn't work.
>>
>> I want to use something like
>> ssh user at server
>> R
>> ---do something in R and start calculation ---
>> close ssh but let R remain on the server, doing the calculation
>>
>> ssh user at server
>> open the existing R Shell / Process
>>
>> Has anyone done something similiar?
>> Can you help me or suggest an other solution ?
>
> I don't think it is possible to reattach to a process started in one
> ssh session from another ssh session. However, you can put a session
> into the background with the -f flag to ssh. You haven't told us what
> operating system you are starting the ssh connection on and what
> system will run the R process. If I had an X server running on the
> local system and the remote system provided X clients like xterm I
> would do this by
>
> ssh -X -f user at server xterm
>
> This should spring up an autonomous xterm window on the local machine
> after which you can run R in it.
>
> I hope this helps.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list