Tom Roche Thu, 12 Jan 2012 11:56:25 -0500>>> * I have access to the cluster [where I want to run R] configured >>> [in .ssh/config] such that I can `ssh t` from commandline.>>> 1 I can open an R file on the cluster with >>> `C-x C-f /t:/home/me/onlyOrigDN2.r` >>> from my laptop, and note the following>>> *Messages* >>> > Tramp: Opening connection for t using scpc...done >>> > Tramp: Encoding remote file /scpc:t:/home/me/onlyOrigDN2.r [...] >>> > Tramp: Decoding remote file /scpc:t:/home/me/onlyOrigDN2.r [...] >>> > Wrote /tmp/tramp.62007lZ.r >>> > Tramp: Decoding remote file /scpc:t:/home/me/onlyOrigDN2.r [...] >>> > Tramp: Inserting local temp file `/tmp/tramp.62007lZ.r'...done >>> ...>>> If I do `C-h m` in the resulting buffer, I get>>> > Enabled minor modes: [lots ..., then] >>> > ESS[S] mode defined in `ess-mode.el': >>> > Major mode for editing ESS source.>>> 2 From the resulting buffer, if I run `M-x R`, I get the following >>> prompt and default response in the minibuffer:>>> > ESS [S(R): R (newest)] starting data directory? /scpc:t:/home/me/>>> If I accept that (i.e., hit Enter) I get>>> *Messages* >>> > Type C-h m for help on ESS version 5.14 >>> > Cannot read history file /scpc:t:/home/me/.Rhistory >>> > Tramp: Opening connection for t using scpc... >>> > >>> > Opening connection for t using scpc... \ >>> > Tramp: Opening connection for t using scpc...done >>> > trying to (re)start process R for language S ...>>> followed by the same minibuffer prompt and default response (but >>> no error message or buffer=*ESS-errors*).Rodney Sparapani Thu, 12 Jan 2012 12:09:18 -0600 (rearranged)>> This may be no solace, but it just works for me out of the box.It's comforting in that it validates my belief that this *should* work. (And also that some ESS docs, e.g., http://ess.r-project.org/Manual/ess.html#ESS-processes-on-Remote-Computers need updating. I mean, tramp's been part of GNU emacs since ... 21? 22?)>> I just remotely tramp a file. Then, in that buffer do a M-x R >> For me, that opens a remote R session; no ssh.el required.When you do `M-x R`, what prompt and default response do you get? I'm thinking I need to play with tramp method ...>> The one exception is that graphics don't pop openRodney Sparapani Thu, 12 Jan 2012 14:16:27 -0600> The graphics issue seems to be related to the fact that (for me) > while using tramp, the DISPLAY variable is unset. This is not really > an ESS issue per se,Dunno: it could be an ESS issue or a tramp issue. Worth looking into ... after I get the base functionality working :-)
Tom Roche Thu, 12 Jan 2012 11:56:25 -0500>>> * I have access to the cluster [where I want to run R] configured >>> [in my linux laptop's .ssh/config] such that I can `ssh t` from >>> commandline.Note also that I'm using keychain http://www.cyberciti.biz/faq/ssh-passwordless-login-with-keychain-for-scripts/ such that no password/passphrase is required. Rodney Sparapani Thu, 12 Jan 2012 12:09:18 -0600 (rearranged)>> This may be no solace, but it just works for me out of the box.Tom Roche Thu, 12 Jan 2012 16:27:00 -0500> [That] validates my belief that [remoting ESS/R with tramp rather > than ssh.el] *should* work. (And also that some ESS docs, e.g.,> http://ess.r-project.org/Manual/ess.html#ESS-processes-on-Remote-Computers> need updating. I mean, [tramp has] been part of GNU emacs since ... > 21? 22?)>> I just remotely tramp a file. Then, in that buffer do a M-x R >> For me, that opens a remote R session; no ssh.el required.> When you do `M-x R`, what prompt and default response do you get?I'd very much like to know what works because ...> I'm thinking I need to play with tramp method ...... I get the same results with tramp method=ssh as with (the default) tramp method=scpc: + Opening an R file on the cluster succeeds. - Starting R from the resulting tramp buffer fails with either of two messages in buffer=*Messages*> Cannot read history file /scpc:t:/home/me/.Rhistory > Cannot read history file /ssh:t:/home/me/.Rhistoryand the same/invariant message in buffer=*R* *R*> env: R: No such file or directory > > Process R exited abnormally with code 127 at Thu Jan 12 18:00:14 2012(more on this @ end). I also tried bypassing my .ssh/config alias, and explicitly opening C-x C-f /scpc:me at fq.server.name:/home/me/onlyOrigDN2.r but `M-x R` then fails with *Messages*> Cannot read history file /scpc:me at fq.server.name:/home/me/.RhistoryWhich gave me the brilliant idea to check whether the file me at fq.server.name:/home/me/.Rhistory existed--and it didn't !-) So I * `C-x C-c` my local emacs * ran `ssh t` in a gnome-terminal * ran `R` on the cluster * ran `q()` from the R session * verified I had ~/.Rhistory * restarted local emacs * `C-x C-f /t:/home/me/onlyOrigDN2.r` * `M-x R` Opening the file still works, and starting R still fails, but now somewhat differently: I get a loop of *Messages*> Opening connection for t using scpc... \ > Tramp: Opening connection for t using scpc...done > Tramp: Encoding region using function `base64-encode-region'...done > Tramp: Decoding region into remote file /scpc:t:/home/me/.Rhistory...done > trying to (re)start process R for language S ... > Type C-h m for help on ESS version 5.14 > Tramp: Encoding remote file /scpc:t:/home/me/.Rhistory...done > Tramp: Decoding remote file /scpc:t:/home/me/.Rhistory with function base64-decode-region... > Wrote /tmp/tramp.4087Mwl > Tramp: Decoding remote file /scpc:t:/home/me/.Rhistory with function base64-decode-region...done > Tramp: Inserting local temp file `/tmp/tramp.4087Mwl'...done > Tramp: Opening connection for t using scpc...at which point I get the same ESS prompt and default response in the minibuffer (or I quit with `C-g`). Arrggghhhh! So definitely ESS or tramp has some error-handling issues, but I'm also guessing I might have a configuration problem, too. I note above that I get *R*> env: R: No such file or directory > > Process R exited abnormally with code 127 at Thu Jan 12 18:00:14 2012each time I try/fail to start R remotely. But local:~ $ ssh t ... remote:~ $ which R /usr/local/R-2.14.0/bin/R remote:~ $ $(which R) --version R version 2.14.0 (2011-10-31) ... remote:~ $ /usr/bin/env R --version R version 2.14.0 (2011-10-31) looks fine to me. I'm wondering, what might make tramp unable to start R other than R being unavailable (which is plainly not the case)? Permissions? but remote:~ $ ls -alh $(which R) -rwxr-xr-x 1 admin staff 8.6K Nov 23 16:06 /usr/local/R-2.14.0/bin/R looks good to me. Your assistance is appreciated, Tom Roche <Tom_Roche at pobox.com>
-Tom Roche Thu, 12 Jan 2012 11:56:25 -0500>>>> - Starting R from the resulting tramp buffer fails with either of two > messages in buffer=*Messages*...> > Cannot read history file /scpc:t:/home/me/.RhistoryThis is normal. Not a problem.> I'm > also guessing I might have a configuration problem, too....>I get> *R* > > env: R: No such file or directory > > > > Process R exited abnormally with code 127 at Thu Jan 12 18:00:14 2012> each time I try/fail to start R remotely. But> local:~ $ ssh t > ... > remote:~ $ which R > /usr/local/R-2.14.0/bin/R > remote:~ $ $(which R) --version > R version 2.14.0 (2011-10-31)When I move R and Rscript out of my path, as expected, I also have problems. If I use tramp to connect to remote, open a shell there with M-x eshell, and type 'env' , my path is the path on local. Before starting Emacs, try adding /usr/local/R-2.14.0/bin to your local path, e.g.: export PATH= $PATH:/usr/local/R-2.14.0/bin
Tom, what happens with: (Emacs) M-x ssh t (you should have the remote shell buffer now) R (once R is started) M-x ess-remote r ? Claudia -- Claudia Beleites Spectroscopy/Imaging Institute of Photonic Technology Albert-Einstein-Str. 9 07745 Jena Germany email: claudia.beleites at ipht-jena.de phone: +49 3641 206-133 fax: +49 2641 206-399