Re: Problem with tramp/scp on NT Emacs

2000-06-14 Thread Tom Roche

Daniel Pittman <[EMAIL PROTECTED]> 6/14/00 9:15:28 AM >>>
> Preferably a link to a binary on the net somewhere as well.

There are source and binaries are at

ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/

Dunno if there's newer stuff.

> Alternately, supply me with text (or even rough, point form notes)
> and I will write the prose. I just don't have an NT box to test this
> stuff on myself. :/

Actually, if someone's got a known-to-play-nice-with-TRAMP server into
which I could guest, I'd also be delighted to test the instructions.

TIA, [EMAIL PROTECTED] 




Re: Problem with tramp/scp on NT Emacs

2000-06-14 Thread Daniel Pittman

On Wed, 14 Jun 2000, Kai Großjohann <[EMAIL PROTECTED]>
wrote:

> Joe Stoy <[EMAIL PROTECTED]> writes:
> 
>> [...]  I don't want to go completely public until at least one 
>> other person has got it to work -- so I'll correspond privately with 
>> Glenn.
> 
> Thanks, Joe.  I think it would be quite useful to get Tramp working
> with NT Emacs.
> 
> When you have something that works, do you think it would be good to
> add it to a contrib directory in tramp.tar.gz and include a
> description what needs to be done in the info file?  Or is there a
> chance that your fix goes into the main NT ssh distribution?

Including a patch, plus notes in the info would be good, I think.
Preferably a link to a binary on the net somewhere as well.

Alternately, supply me with text (or even rough, point form notes) and I
will write the prose. I just don't have an NT box to test this stuff on
myself. :/

Daniel

-- 
We watched with envy on television as American solders gave out packets of
Marlboro cigarettes to Iraqi prisoners of war. May of us have to work an
entire shift underground to afford one packet of Marlboros. I want to
surrender to the Americans.
-- Sergei Yevshin, a coal miner on strike in the Ukraine




Re: Problem with tramp/scp on NT Emacs

2000-06-14 Thread Kai Großjohann

Joe Stoy <[EMAIL PROTECTED]> writes:

> [...]  I don't want to go completely public until at least one 
> other person has got it to work -- so I'll correspond privately with 
> Glenn.

Thanks, Joe.  I think it would be quite useful to get Tramp working
with NT Emacs.

When you have something that works, do you think it would be good to
add it to a contrib directory in tramp.tar.gz and include a
description what needs to be done in the info file?  Or is there a
chance that your fix goes into the main NT ssh distribution?

kai
-- 
I like BOTH kinds of music.




Re: Problem with tramp/scp on NT Emacs

2000-06-14 Thread Daniel Pittman

On 14 Jun 2000, Glenn Proctor <[EMAIL PROTECTED]> wrote:

> Daniel Pittman <[EMAIL PROTECTED]> writes:
> 
>> On 14 Jun 2000, Glenn Proctor <[EMAIL PROTECTED]> wrote:
>> 
>> > Daniel Pittman <[EMAIL PROTECTED]> writes:

[...]

>> That is not a good thing, I believe. Try giving the '-t' argument to
>> ssh, which may help. If not, there was a hack floating around on the
>> list that would let you get a terminal on the remote system, you
>> could check the archives.
> 
> I had already tried the -t argument with no success. I have discovered
> that I *can* use scp (but not ssh) from within an emacs shell buffer.

Joe Stoy has a version that does work, and has agreed to work with you
privately on this one. Unfortunately, you *do* need to be able to log in
to an interactive shell on the remote system for TRAMP to work - a
working scp on it's own is not enough

>> Hrm. It looks like Emacs tries to run the child ssh process, which
>> fails. Can you try running
>> 
>> '(start-process "ssh-test" (current-buffer) "/ssh/ssh" "bacon" "-l"
>> "glennp")'
> 
> This gives me a similar backtrace to before.

Gah. That's not very good. This looks like a bug with 'start-process.'

Can you send me the output of 'M-x describe-function' for
'start-process'. I want to know if there are different arguments needed
for that version of Emacs.

> Is there anything in that needs to be set up at the remote end?

The backtrack is not while talking to the remote side, it's in the local
Emacs, which fails to create the child ssh process. :/

Daniel

-- 
Machina Improba! Vel Mihi Ede Potum Vel Mihi Redde Nummos Meos!




Re: Problem with tramp/scp on NT Emacs

2000-06-14 Thread Joe Stoy


> > Hmm - when I try this I get "Pseudo-terminal will not be allocated
> > because stdin is not a terminal." and it never returns to the shell
> > prompt. :-(

Yes: the standard versions of ssh do this on NT.  I have a version 
which does work in ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/ (two 
directories for the executables, depending on which cygwin1.dll you 
have around).

I use this all the time from (and also to, though that's a trifle more 
complicated) NT machines.  Tom Roche was also trying to use it, though 
I think so far without success, possibly because his server is a little
atypical.  I don't want to go completely public until at least one 
other person has got it to work -- so I'll correspond privately with 
Glenn.

joe stoy




Re: Problem with tramp/scp on NT Emacs

2000-06-14 Thread Glenn Proctor

Daniel Pittman <[EMAIL PROTECTED]> writes:

> On 14 Jun 2000, Glenn Proctor <[EMAIL PROTECTED]> wrote:
> 
> > Daniel Pittman <[EMAIL PROTECTED]> writes:
> > 
> >> Can you run ssh as an Emacs subprocess and get an interactive
> >> shell on the remote system? If not, TRAMP will not work quite
> >> right, I fear.
> > 
> > Hmm - when I try this I get "Pseudo-terminal will not be allocated
> > because stdin is not a terminal." and it never returns to the
> > shell prompt. :-(
> 
> That is not a good thing, I believe. Try giving the '-t' argument to
> ssh, which may help. If not, there was a hack floating around on the
> list that would let you get a terminal on the remote system, you
> could check the archives.

I had already tried the -t argument with no success. I have discovered
that I *can* use scp (but not ssh) from within an emacs shell buffer.

> Hrm. It looks like Emacs tries to run the child ssh process, which
> fails. Can you try running
> 
> '(start-process "ssh-test" (current-buffer) "/ssh/ssh" "bacon" "-l" "glennp")'

This gives me a similar backtrace to before.

Is there anything in that needs to be set up at the remote end?

Glenn.






Re: Problem with tramp/scp on NT Emacs

2000-06-14 Thread Daniel Pittman

On 14 Jun 2000, Glenn Proctor <[EMAIL PROTECTED]> wrote:

> Daniel Pittman <[EMAIL PROTECTED]> writes:
> 
>> Can you run ssh as an Emacs subprocess and get an interactive shell
>> on the remote system? If not, TRAMP will not work quite right, I
>> fear.
> 
> Hmm - when I try this I get "Pseudo-terminal will not be allocated
> because stdin is not a terminal." and it never returns to the shell
> prompt. :-(

That is not a good thing, I believe. Try giving the '-t' argument to
ssh, which may help. If not, there was a hack floating around on the
list that would let you get a terminal on the remote system, you could
check the archives.

[...]

> I set tramp-debug-buffer to t, but no *debug tramp...* buffer was
> generated. So it's not even getting as far as a remote call.

Gah. Not good. :/

>> > 2. I get a "Spawning child process: invalid argument" error
>> 
>> If you can reproduce this with the debug value set, then send both
>> the '*debug tramp/...*' and '*tramp/...*' buffers to the list, that
>> would be helpful.
> 
> This occurs when trying /r@scp:user@host:file. There is no debug
> buffer (even with the tramp-debug-buffer variable set) but I've
> attached the backtrace below.

[...]

> To clarify: if I use /r@scp:hostname:filename I get the "hang"
> described above. If I use /r:hostname:filename I get the "instant
> return" instead. If I use /r@scp:user@host:filename I get the error
> shown below.

Hrm. It looks like Emacs tries to run the child ssh process, which
fails. Can you try running

'(start-process "ssh-test" (current-buffer) "/ssh/ssh" "bacon" "-l" "glennp")'

Do that in the *scratch* buffer, and use 'C-j' to run it. See what that
says

Daniel

-- 
A good poet is someone who manages, in a lifetime of standing out in
thunderstorms, to be struck by lightning five or six times; a dozen or two
dozen times and he is great.
-- Randall Jarrell




Re: Problem with tramp/scp on NT Emacs

2000-06-14 Thread Glenn Proctor

Daniel Pittman <[EMAIL PROTECTED]> writes:

> Can you run ssh as an Emacs subprocess and get an interactive shell
> on the remote system? If not, TRAMP will not work quite right, I
> fear.

Hmm - when I try this I get "Pseudo-terminal will not be allocated
because stdin is not a terminal." and it never returns to the shell
prompt. :-(

> > When trying to edit a remote file, I get one of the following three
> > symptoms:
> > 1. The buffer is opened immediately and is empty; I assume that there
> >is no remote stuff going on at all.
> 
> That seems likely. The way to check is to do '(setq
> tramp-debug-buffer t)' in your .emacs, then look for a '*debug
> tramp/ ... *' buffer. If there is one, something remote was tried...

I set tramp-debug-buffer to t, but no *debug tramp...* buffer was
generated. So it's not even getting as far as a remote call.

> > 2. I get a "Spawning child process: invalid argument" error
> 
> If you can reproduce this with the debug value set, then send both
> the '*debug tramp/...*' and '*tramp/...*' buffers to the list, that
> would be helpful.

This occurs when trying /r@scp:user@host:file. There is no debug
buffer (even with the tramp-debug-buffer variable set) but I've
attached the backtrace below.

> > 3. (Most common) Emacs takes 100% CPU, indefinitely, and has to be
> >interruped with C-g.
> 
> Have you waited, er, about two minutes with it in this state? If so,
> did it come back out of it in the end?

Just waited 10 minutes and it didn't come back :-(

To clarify: if I use /r@scp:hostname:filename I get the "hang"
described above. If I use /r:hostname:filename I get the "instant
return" instead. If I use /r@scp:user@host:filename I get the error
shown below.

Thanks - maybe we're getting somewhere.

Glenn.

--

Backtrace from C-xf /r@scp:user@host:file

Signaling: (file-error "Spawning child process" "invalid argument")
  start-process("*tramp/scp glennp@bacon*" # 
"/ssh/ssh" "bacon" "-l" "glennp")
  apply(start-process "*tramp/scp glennp@bacon*" # 
"/ssh/ssh" "bacon" "-l" "glennp" nil)
  (let* ((default-directory ...) (coding-system-for-read ...) (p ...) (found nil)) 
(process-kill-without-query p) (tramp-message 9 "Waiting 60s for shell or passwd 
prompt from %s" host) (setq found (tramp-wait-for-regexp p 60 ...)) (unless found 
(pop-to-buffer ...) (kill-process p) (error "Couldn't find remote shell or passwd 
prompt")) (when (match-string 1) (when ... ... ... ...) (tramp-message 9 "Sending 
password...") (tramp-enter-password p ...) (tramp-message 9 "Sent password, waiting 
60s for remote shell prompt") (setq found ...)) (unless found (pop-to-buffer ...) 
(kill-process p) (error "Couldn't find remote shell prompt")) (when (match-string 1) 
(pop-to-buffer ...) (kill-process p) (error "Login failed: %s" ...)) (tramp-message 7 
"Initializing remote shell") (tramp-open-connection-setup-interactive-shell p 
multi-method method user host) (tramp-post-connection multi-method method user host))
  (progn (when multi-method (error "Cannot multi-connect using rsh connection 
method")) (tramp-pre-connection multi-method method user host) (tramp-message 7 
"Opening connection for %s@%s using %s..." user host method) (let* (... ... ... ...) 
(process-kill-without-query p) (tramp-message 9 "Waiting 60s for shell or passwd 
prompt from %s" host) (setq found ...) (unless found ... ... ...) (when ... ... ... 
... ... ...) (unless found ... ... ...) (when ... ... ... ...) (tramp-message 7 
"Initializing remote shell") (tramp-open-connection-setup-interactive-shell p 
multi-method method user host) (tramp-post-connection multi-method method user host)))
  (unwind-protect (progn (when multi-method ...) (tramp-pre-connection multi-method 
method user host) (tramp-message 7 "Opening connection for %s@%s using %s..." user 
host method) (let* ... ... ... ... ... ... ... ... ... ... ...)) (set-match-data 
save-match-data-internal))
  (let ((save-match-data-internal ...)) (unwind-protect (progn ... ... ... ...) 
(set-match-data save-match-data-internal)))
  (save-match-data (when multi-method (error "Cannot multi-connect using rsh 
connection method")) (tramp-pre-connection multi-method method user host) 
(tramp-message 7 "Opening connection for %s@%s using %s..." user host method) (let* 
(... ... ... ...) (process-kill-without-query p) (tramp-message 9 "Waiting 60s for 
shell or passwd prompt from %s" host) (setq found ...) (unless found ... ... ...) 
(when ... ... ... ... ... ...) (unless found ... ... ...) (when ... ... ... ...) 
(tramp-message 7 "Initializing remote shell") 
(tramp-open-connection-setup-interactive-shell p multi-method method user host) 
(tramp-post-connection multi-method method user host)))
  tramp-open-connection-rsh(nil "scp" "glennp" "bacon")
  funcall(tramp-open-connection-rsh nil "scp" "glennp" "bacon")
  (if (and p (processp p) (memq ... ...)) nil (when (and p ...) (delete-process p)) 
(funcall

Re: Problem with tramp/scp on NT Emacs

2000-06-14 Thread Daniel Pittman

On 14 Jun 2000, Glenn Proctor <[EMAIL PROTECTED]> wrote:

> I am struggling with trying to use tramp to edit files remotely via
> scp under NT Emacs. The remote system is Unix (Solaris 2.7).
> I have scp, ssh, ssh-agent etc all installed and working correctly.
> I have loaded ange-ftp and tramp, and set tramp-default-method to scp.

Can you run ssh as an Emacs subprocess and get an interactive shell on
the remote system? If not, TRAMP will not work quite right, I fear.

> When trying to edit a remote file, I get one of the following three
> symptoms:
> 1. The buffer is opened immediately and is empty; I assume that there
>is no remote stuff going on at all.

That seems likely. The way to check is to do '(setq tramp-debug-buffer t)'
in your .emacs, then look for a '*debug tramp/ ... *' buffer. If there
is one, something remote was tried...

> 2. I get a "Spawning child process: invalid argument" error

If you can reproduce this with the debug value set, then send both the
'*debug tramp/...*' and '*tramp/...*' buffers to the list, that would be
helpful.

> 3. (Most common) Emacs takes 100% CPU, indefinitely, and has to be
>interruped with C-g.

Have you waited, er, about two minutes with it in this state? If so, did
it come back out of it in the end?

> Is there anything I'm obviously doing wrong? 

Not from this description.

> I'd really, really like to be able to do this! The multi-hop stuff
> especially would solve a lot of my problems, but I think I'd better
> concentrate on getting single-hop stuff to work first!

Yup.

Daniel

-- 
I'm a barbie girl / in the barbie world 
life in plastic / it's fantastic
you can brush my hair / undress me everywhere
imagination, life is your creation
-- Aqua, _Barbie Girl_