[R] Tunnelling X for R graphics

Adam D. I. Kramer adik at ilovebacon.org
Sun Feb 1 00:16:21 CET 2009

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?

Adam Kramer

More information about the R-help mailing list