[R] Tunnelling X for R graphics

Dylan Beaudette dylan.beaudette at gmail.com
Sun Feb 1 00:32:55 CET 2009


Try starting your R session after starting a 'screen' session. Like this:

$> screen
$> R
# do stuff, when taking a break do CTRL-A D to disconnect
# use as normal

See the man page for screen, it is basically a terminal multiplexer
that can gracefully accommodate connection failures. If you get
disconnected, re-connect, and then re-attach the screen process:
$> screen -r

and you should be ok.

Cheers,

Dylan


On 1/31/09, Adam D. I. Kramer <adik at ilovebacon.org> wrote:
> Dear colleagues,
>
>  	I run R on a few different machines, and view graphs and the like by
> tunnelling X through SSH to my local machine. This is useful for me because
> my local machine can't easily handle some of the data sets I work with.
>
>  	However, when an ssh connection dies, the tunnelled X session also
> dies, which breaks R's device connection, generating this error:
>
>> Error: X11 fatal IO error: please save work and shut down R
>
> ...that's kinda scary, so I quit(save="yes") and then run R again.
>
>  	The problem, and maybe I'm just whining here, is that because the
> data sets are large this takes several minutes where I'm basically just
> sitting around.  This happens once every other day as the VPN software I'm
> using "times out" after about 24 hours and thus the ssh session dies.
>
>  	I can't really guess at why a broken X session would corrupt a
> running session of R so severely that it would need to be completely
> restarted.  Can anyone explain this to me?  Or perhaps (hopefully) someone
> has enough knowledge of the X11 device to be able to tell me that I can
> ignore this message, and just use dev.off() and then X11("localhost:10") to
> open a new working X11 connection?
>
> Cordially,
> Adam Kramer
>
> ______________________________________________
> R-help at r-project.org 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