[R] 2nd R Console

(Ted Harding) ted.harding at nessie.mcc.ac.uk
Mon Jul 30 20:27:54 CEST 2007

On 28-Jul-07 08:19:10, Michael Janis wrote:
> Hi,
> I was reading a thread: [R] "2nd R console" and had a similar
> question regarding having more than one R console open at a time. 
> However, my question differs from that of the thread:
> Is it possible, or is there a wrapper that will allow one, to open
> an arbitrary number of R consoles which access the same R session
> (all objects in that session, etc.).  This would be R on linux
> accessed through a shell - kind of like using GNU screen multi-user
> such that people could work collaboratively on a given session.
> The problem with screen is that all commands are interleaved in
> the same terminal, which is confusing and does not allow access
> to the command prompt at the same time, rather it would be sequential.
> I know there will be "why" questions but it is useful in an
> academic environment.  Basically we have a memory machine for large
> genomic analysis - and we could set that up as an Rserver, but this
> placing R into a multi-user engine is better suited for our immediate
> needs.  Does anybody have thoughts on this?

You could have a look at XMX (X-protocol Multiplexer). This is now
rather old, and I think it has not been further developed for many


Basically, you would start XMX from one machine (A) networked
to others (B,C,...), all running X-windows. in the startup, you
designate which machines are to share the session, and what rights
they will have.

On machine A, and all designated machines B, C, ... , appears
a window. This in fact acts like a screen emulator, with its
own X session inside it. The A user then starts up a program
(say R) in this window, and what A sees is mirrored on the other

If A has granted input privileges to the other machines, then
users of B, C, ... can do things themselves, and the effects of
their actions are mirrored to all the other machines.

Thus, for instance, it would be possible for different users to
take turns at entering commands into the R session, and so on,
from their own machines. This is a much better way of arranging
things, than having all the people queue up to take turns at
sitting in the one and only chair!

It is certainly useful in a classroom situation, and even in
a one-to-one tutorial. For instance, I've used it in the past
to teach programming and system management, sitting more or
less beside the other person but at different machines. We
would both, for instance, be editing the same program file,
and either could initiate a program run with the current file.
(Of course, what's technically called a "race condition" can
develop here ... ). I've even envisaged the scenario where two
people, one in England and one in the US, could simultaneously
be editing a joint paper (you'd also need an independent
communication channel as well, but that's no problem using a
"chat" program).

The one constraint with XMX (at least in the past, I'm not
sure to what extent it may have been relaxed) which can limit
its use is that it depends on fairly close compatibility
between the X resources of all the different machines. It's
best of they're identical (same screen resolution e.g. 1024x768,
same colour depths on all screens, ... ). Otherwise it's liable
to not establish the necessary connections, and only some
machines can join in.

However, in a computing lab environment, it may well be that
all machines are compatible.

Suck it and see!

Hoping this is useful,

E-Mail: (Ted Harding) <ted.harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 30-Jul-07                                       Time: 19:27:48
------------------------------ XFMail ------------------------------

More information about the R-help mailing list