Pete Forman <[EMAIL PROTECTED]> writes:

> PuTTY/plink and Tramp do not fit together exactly.  PuTTY's config has
> one default setting and then named sessions.  I had TERM = xterm in my
> default since that is what I needed most often when setting a new
> target for PuTTY.  plink uses that too.  If you try to save a session
> for plink with TERM = dumb you must also set a host and username and
> invoke it with different syntax.  In order to plink to different hosts
> a choice has to made whether to save a named session for each host or
> to change the default for PuTTY/plink.  I opted for the latter; now I
> need to remember to set TERM for future PuTTY sessions.

Plink does not allow to overwrite all options via the command line,
indeed. But the following seems to work:

plink -t -l user host TERM=dumb /bin/sh

The patch below introduces a new method "plinkx". This shall work also
with your "xterm-configured" sessions.

Could you, please, report whether it works for you? I'll commit it
then to CVS.

> What I meant was calling the methods something like "plink+bash"
> where plink is the local program called and bash is the shell on the
> remote side.  However I retracted the idea because the shell is only
> one of the remote features, there are a bunch of others cached in
> the connection history that have to be determined too.

One possibility could be to let the user edit the connection
properties interactively. Something like `gnus-server-edit-server' in
Gnus' *Server* buffer.

The problem might be that Tramp trust those values blindly. In case
there is something wrong, there might be errors nobody can catch.

I'll play a little bit with the code in order to see whether it can be
implemented simply. But it will take some time; I'll be offline
starting end of next week, because I must go for vacations. Order from
my wife :-)

> That said, there is still scope for Tramp to reconnect directly to a
> compliant shell without first going through the user's default shell.
> There are only small gains to be had: a little bit quicker, and avoid
> problems with some crufty prompts.

I've tried this approach some months ago, I don't remember why I gave
up. Maybe I find some comments about the reason; I'll let you know.

Best regards, Michael.

*** /tmp/tramp.el.~1~	Thu Apr 19 14:43:52 2007
--- /tmp/tramp.el	Thu Apr 19 14:43:52 2007
***************
***************
***************
*** 564,569 ****
--- 564,590 ----
  	     (tramp-copy-keep-date       nil)
  	     (tramp-password-end-of-line "xy") ;see docstring for "xy"
  	     (tramp-default-port         22))
+     ("plinkx"
+              (tramp-login-program        "plink")
+ 	     (tramp-login-args           (("%h") ("-l" "%u") ("-P" "%p")
+ 					  ("-ssh") ("-t")
+ 					  ("TERM=dumb /bin/sh")))
+ 	     (tramp-remote-sh            "/bin/sh")
+ 	     (tramp-copy-program         nil)
+ 	     (tramp-copy-args            nil)
+ 	     (tramp-copy-keep-date       nil)
+ 	     (tramp-password-end-of-line "xy") ;see docstring for "xy"
+ 	     (tramp-default-port         22))
      ("pscp"  (tramp-login-program        "plink")
  	     (tramp-login-args           (("%h") ("-l" "%u") ("-P" "%p")
  					  ("-ssh")))
_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to