Subject: mailing-list for TeXmacs Users
List archive
From : Michael Lachmann <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] session on a remote host
- Date: Wed, 18 Nov 2009 01:09:49 +0100
On 16 Nov 2009, at 16:37, Joris van der Hoeven wrote:
In principle, when launching ssh with the right flags plug-ins launched
over a pipe behave *exactly* the same way as on your local machine.
One important thing is that you *must* set up the necessary keys
in your personal .ssh so that log-in does *not* require a password.
I see.. so you are saying that one should figure the exact flags/ configurations one needs to have ssh allocate a pseudo-terminal when you call something like
ssh host /usr/bin/R
instead of doing
ssh host
which launches a shell, in which you have to then run R.
And then, if you want a series of remote hosts, you need to do
ssh host1 ssh host2 R
again with some flags, if possible.
Wow! It works! And I spent all day on the train getting tm_r to work "well" without allocating a pseudoterminal. At least I cleaned up the code a bit in the process...
The flags for ssh are -t -t
So, to log in remotely, you have to use
ssh -t -t host -l user path_to_R
or
ssh -t -t host1 -l user1 ssh -t -t host2 -l user2 path_to_R
(which is what I just tried, and it worked!)
And you think the best is to require the user to set up everything so that no username/password is needed to log to the hosts, and the command is always R, or should the user just set things up so that no password is needed, but she can still specify host/username combinations and command to run?
Michael
On 16 Nov 2009, at 16:37, Joris van der Hoeven wrote:
Hi Michael,
I did some experiments with remote sessions in the past.
If you have the courage, please refigure out how to do the above
(I forgot in the meantime), and give a more precise procedure.
We might then consider a Remote session menu in which a remote host,
or even a sequence of remote hosts could be specified,
which could be used as a wrapper for any plug-in.
Best wishes, --Joris
On Fri, Nov 06, 2009 at 04:25:21PM +0100, Michael Lachmann wrote:
Hi,
There is a hidden feature of the R session that allows a user to log
to a remote host to execute the R session there. I use it quite a lot,
because my local machine is sometimes not strong enough, so I can ssh
to another machine, and run R there.
The way it works, though in the current version it seems a bit broken,
is that you set two environment variables:
TEXMACS_CMD and TEXMACS_SEND
TEXMACS_CMD you set to a command to execute instead of R. For example /bin/tcsh
TEXMACS_SEND you set to a string to send to that command, instead of
the load library command, for example "".
Then you have a shell prompt, you ssh to the remote machine, and then
run R. You still have to load the TeXmacs library on the remote
machine, so you should install it there. And, it is important that you
can log in without a password prompt, because that is not handled.
Quite a complicated procedure...
It has to be a bit flexible, because sometimes you'll have to log to a
gateway and then from there log to the computer you want, or some
such.
Anyway, it would probably be good if one could tell TeXmacs from
within the program which type of session you want - R or shell.
Possibly other session types also benefit from accessing a remote
server.
The question is how to do that best? One could easily have two
different session types - R and R/shell, one starts R, the other
starts a shell, but is ready to interpret R... But I don't think that
is a really good way to handle things.
A fairly good way would be to be able to switch the type of the
session from within a session. So you start a shell session, log to
the remote machine, and then launch R, and switch to an R session.
(But currently it seems that the shell session does not handle ssh
very wel...)
A related question is this: when I run an R session in a buffer, and
then another R session in another buffer, the buffers share the R
seesion - only one instance of R is launched. Sometimes it is useful
to have a second instance. Currently the only way to achieve that is
to launch TeXmacs again, I think.
Michael
- [TeXmacs] session on a remote host, Michael Lachmann, 11/06/2009
- Re: [TeXmacs] session on a remote host, Joris van der Hoeven, 11/16/2009
- Re: [TeXmacs] session on a remote host, Michael Lachmann, 11/18/2009
- Re: [TeXmacs] session on a remote host, Joris van der Hoeven, 11/16/2009
Archive powered by MHonArc 2.6.19.