Minor cleanup.
[bpt/emacs.git] / man / tramp.texi
CommitLineData
fb7933a3
KG
1\input texinfo @c -*-texinfo-*-
2@c %**start of header
6344cbf1 3@setfilename ../info/tramp
fb7933a3
KG
4@settitle TRAMP User Manual
5@setchapternewpage odd
6@c %**end of header
7
8@c This is *so* much nicer :)
9@footnotestyle end
10
fb7933a3
KG
11
12@c Entries for @command{install-info} to use
92eeeafc 13@dircategory Emacs
fb7933a3
KG
14@direntry
15* TRAMP: (tramp). Transparent Remote Access, Multiple Protocol
16 Emacs remote file access via rsh and rcp.
17@end direntry
18
19@c Macro to make formatting of the tramp program name consistent.
20@macro tramp
21@sc{tramp}
22@end macro
23
24@c Copying permissions, et al
92eeeafc 25@copying
fb7933a3
KG
26This file documents @tramp{}, a remote file editing package for Emacs and
27XEmacs.
28
f37fc5a7
KG
29Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software
30Foundation, Inc.
92eeeafc
KG
31
32@quotation
33Permission is granted to copy, distribute and/or modify this document
34under the terms of the GNU Free Documentation License, Version 1.1 or
35any later version published by the Free Software Foundation; with no
36Invariant Sections, with the Front-Cover texts being ``A GNU
37Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
38license is included in the section entitled ``GNU Free Documentation
39License'' in the Emacs manual.
40
41(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
42this GNU Manual, like GNU software. Copies published by the Free
43Software Foundation raise funds for GNU development.''
44
45This document is part of a collection distributed under the GNU Free
46Documentation License. If you want to distribute this document
47separately from the collection, you can do so by adding a copy of the
48license to the document, as described in section 6 of the license.
49@end quotation
50@end copying
51
fb7933a3
KG
52
53@tex
54
55@titlepage
56@title @tramp{} User Manual
fb7933a3
KG
57
58@author by Daniel Pittman
59@author based on documentation by Kai Gro@ss{}johann
60@page
61
fb7933a3
KG
62@end titlepage
63@page
64
65@end tex
66
67@ifnottex
92eeeafc 68@node Top, Overview, (dir), (dir)
fb7933a3
KG
69@top @tramp{} User Manual
70
71@tramp{} stands for `Transparent Remote (file) Access, Multiple
72Protocol'. This package provides remote file editing, similar to
92eeeafc 73@cite{Ange-FTP} and @cite{EFS}.
fb7933a3 74
92eeeafc 75The difference is that Ange-FTP uses FTP to transfer files between the
fb7933a3
KG
76local and the remote host, whereas @tramp{} uses a combination of
77@command{rsh} and @command{rcp} or other work-alike programs, such as
78@command{ssh}/@command{scp}.
79
fb7933a3
KG
80You can find the latest version of this document on the web at
81@uref{http://www.freesoftware.fsf.org/tramp/}.
82
83@ifhtml
84This manual is also available as a @uref{tramp_ja.html, Japanese
85translation}.
86
87The latest release of @tramp{} is available for
88@uref{http://savannah.gnu.org/download/tramp/,
89download}, or you may see @ref{Obtaining @tramp{}} for more details,
90including the CVS server details.
91
92@tramp{} also has a @uref{https://savannah.gnu.org/projects/tramp/,
93Savannah Project Page}.
94@end ifhtml
95
96There is a mailing list for @tramp{}, available at
97@email{tramp-devel@@mail.freesoftware.fsf.org}, and archived at
98@uref{http://www.mail-archive.com/emacs-rcp@@ls6.cs.uni-dortmund.de/} as
99well as the usual Savannah archives.
100
101@end ifnottex
102
103@menu
fb7933a3
KG
104* Overview:: What @tramp{} can and cannot do.
105
106For the end user:
107* Obtaining @tramp{}:: How to obtain @tramp{}.
108* History:: History of @tramp{}
109* Installation:: Installing @tramp{} with your (X)Emacs.
110* Configuration:: Configuring @tramp{} for use.
111* Usage:: An overview of the operation of @tramp{}.
112* Bug Reports:: Reporting Bugs and Problems
113* Frequently Asked Questions:: Questions and answers from the mailing list.
114
115For the developer:
116* Version Control:: The inner workings of remote version control.
117* Files directories and paths:: How file names, directories and paths are mangled and managed.
118* Issues::
119
120@detailmenu
121 --- The Detailed Node Listing ---
122
123Configuring @tramp{} for use
124
125* Connection types:: Types of connections made to remote machines.
126* Inline methods:: Inline methods.
127* External transfer methods:: External transfer methods.
128* Multi-hop Methods:: Connecting to a remote host using multiple hops.
129* Default Method:: Selecting a default method.
130* Customizing Methods:: Using Non-Standard Methods.
131* Remote Programs:: How @tramp{} finds and uses programs on the remote machine.
132* Remote shell setup::
133
134Using @tramp
135
136* Filename Syntax:: @tramp{} filename conventions.
137* Multi-hop filename syntax:: Multi-hop filename conventions
138* Dired:: Dired and filename completion.
139
140The inner workings of remote version control
141
142* Version Controlled Files:: Determining if a file is under version control.
143* Remote Commands:: Executing the version control commands on the remote machine.
144* Changed workfiles:: Detecting if the working file has changed.
145* Checking out files:: Bringing the workfile out of the repository.
146* Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere
147
148Things related to Version Control that don't fit elsewhere
149
150* Remote File Ownership:: How VC determines who owns a workfile.
151* Back-end Versions:: How VC determines what release your RCS is.
152
153How file names, directories and paths are mangled and managed.
154
155* Path deconstruction:: Breaking a path into its components.
156
157@end detailmenu
158@end menu
159
fb7933a3
KG
160
161@node Overview
162@chapter An overview of @tramp
92eeeafc 163@cindex overview
fb7933a3 164
92eeeafc
KG
165After the installation of @tramp{} into your Emacs, you will be able
166to access files on remote machines as though they were local. Access
167to the remote file system for editing files, version control, and
fb7933a3
KG
168@command{dired} are transparently enabled.
169
170Your access to the remote machine can be with the @command{rsh},
171@command{rlogin}, @command{telnet} programs or with any similar
92eeeafc 172connection method. This connection must pass ASCII successfully to be
fb7933a3
KG
173usable but need not be 8-bit clean.
174
175The package provides support for @command{ssh} connections out of the
92eeeafc
KG
176box, one of the more common uses of the package. This allows
177relatively secure access to machines, especially if @command{ftp}
178access is disabled.
fb7933a3 179
92eeeafc
KG
180The majority of activity carried out by @tramp{} requires only that
181the remote login is possible and is carried out at the terminal. In
182order to access remote files @tramp{} needs to transfer their content
183to the local machine temporarily.
fb7933a3 184
92eeeafc
KG
185@tramp{} can transfer files between the machines in a variety of ways.
186The details are easy to select, depending on your needs and the
187machines in question.
fb7933a3 188
92eeeafc
KG
189The fastest transfer methods (for large files) rely on a remote file
190transfer package such as @command{rcp}, @command{scp} or
191@command{rsync}. The use of these methods is only possible if the
192file copy command does not ask for a password for the remote machine.
fb7933a3
KG
193
194If the remote copy methods are not suitable for you, @tramp{} also
92eeeafc
KG
195supports the use of encoded transfers directly through the shell.
196This requires that the @command{mimencode} or @command{uuencode} tools
197are available on the remote machine. These methods are generally
198faster for small files.
fb7933a3 199
92eeeafc
KG
200Within these limitations, @tramp{} is quite powerful. It is worth
201noting that, as of the time of writing, it is far from a polished
202end-user product. For a while yet you should expect to run into rough
203edges and problems with the code now and then.
fb7933a3
KG
204
205It is finished enough that the developers use it for day to day work but
206the installation and setup can be a little difficult to master, as can
207the terminology.
208
209@tramp{} is still under active development and any problems you encounter,
210trivial or major, should be reported to the @tramp{} developers.
211@xref{Bug Reports}.
212
213
214@subsubheading Behind the scenes
92eeeafc 215@cindex behind the scenes
e28e4d20
KG
216@cindex details of operation
217@cindex how it works
fb7933a3
KG
218
219This section tries to explain what goes on behind the scenes when you
220access a remote file through @tramp{}.
221
222Suppose you type @kbd{C-x C-f} and enter part of an @tramp{} file name,
223then hit @kbd{@key{TAB}} for completion. Suppose further that this is
224the first time that @tramp{} is invoked for the host in question. Here's
225what happens:
226
227@itemize
228@item
92eeeafc
KG
229@tramp{} discovers that it needs a connection to the host. So it
230invokes @samp{telnet @var{host}} or @samp{rsh @var{host} -l
231@var{user}} or a similar tool to connect to the remote host.
232Communication with this process happens through an Emacs buffer, that
233is, the output from the remote end goes into a buffer.
fb7933a3
KG
234
235@item
236The remote host may prompt for a login name (for @command{telnet}). The
237login name is given in the file name, so @tramp{} sends the login name and
238a newline.
239
240@item
241The remote host may prompt for a password or pass phrase (for
242@command{rsh} or for @command{telnet} after sending the login name).
243@tramp{} displays the prompt in the minibuffer, asking you for the
244password or pass phrase.
245
246You enter the password or pass phrase. @tramp{} sends it to the remote
247host, followed by a newline.
248
249@item
250@tramp{} now waits for the shell prompt or for a message that the login
251failed.
252
253If @tramp{} sees neither of them after a certain period of time (a minute,
254say), then it issues an error message saying that it couldn't find the
255remote shell prompt and shows you what the remote host has sent.
256
257If @tramp{} sees a `login failed' message, it tells you so, aborts the
258login attempt and allows you to try again.
259
260@item
261Suppose that the login was successful and @tramp{} sees the shell prompt
262from the remote host. Now @tramp{} invokes @command{/bin/sh} because
263Bourne shells and C shells have different command
264syntaxes.@footnote{Invoking @command{/bin/sh} will fail if your login
92eeeafc 265shell doesn't recognize @samp{exec /bin/sh} as a valid command.
fb7933a3
KG
266Maybe you use the Scheme shell @command{scsh}@dots{}}
267
268After the Bourne shell has come up, @tramp{} sends a few commands to
269ensure a good working environment. It turns off echoing, it sets the
270shell prompt, and a few other things.
271
272@item
273Now the remote shell is up and it good working order. Remember, what
274was supposed to happen is that @tramp{} tries to find out what files exist
275on the remote host so that it can do filename completion.
276
277So, @tramp{} basically issues @command{cd} and @command{ls} commands and
278also sometimes @command{echo} with globbing. Another command that is
279often used is @command{test} to find out whether a file is writable or a
280directory or the like. The output of each command is parsed for the
281necessary operation.
282
283@item
284Suppose you are finished with filename completion, have entered @kbd{C-x
285C-f}, a full file name and hit @kbd{@key{RET}}. Now comes the time to
286transfer the file contents from the remote host to the local host so
287that you can edit them.
288
289See above for an explanation of how @tramp{} transfers the file contents.
290
92eeeafc 291For inline transfers, @tramp{} issues a command like @samp{mimencode -b
fb7933a3
KG
292/path/to/remote/file}, waits until the output has accumulated in the
293buffer that's used for communication, then decodes that output to
294produce the file contents.
295
92eeeafc 296For out-of-band transfers, @tramp{} issues a command like @samp{rcp
fb7933a3
KG
297user@@host:/path/to/remote/file /tmp/tramp.4711} and then reads the local
298temporary file @file{/tmp/tramp.4711} into a buffer and deletes the
299temporary file.
300
301@item
302You now edit the buffer contents, blithely unaware of what has happened
303behind the scenes. (Unless you have read this section, that is.) When
304you are finished, you type @kbd{C-x C-s} to save the buffer.
305
306@item
307Again, @tramp{} transfers the file contents to the remote host either
308inline or out-of-band. This is the reverse of what happens when reading
309the file.
310
311@end itemize
312
313I hope this has provided you with a basic overview of what happens
314behind the scenes when you open a file with @tramp{}.
315
316
317@c For the end user
318@node Obtaining @tramp{}
319@chapter Obtaining @tramp{}.
92eeeafc 320@cindex obtaining Tramp
fb7933a3
KG
321
322@tramp{} is freely available on the Internet and the latest release may be
323downloaded from
324@uref{ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/tramp.tar.gz}. This
325release includes the full documentation and code for @tramp{}, suitable
92eeeafc
KG
326for installation. But Emacs (21.4 or later) includes @tramp{}
327already, and there is a @tramp{} package for XEmacs, as well. So
328maybe it is easier to just use those. But if you want the bleeding
329edge, read on@dots{...}
fb7933a3 330
92eeeafc 331For the especially brave, @tramp{} is available from CVS. The CVS version
fb7933a3
KG
332is the latest version of the code and may contain incomplete features or
333new issues. Use these versions at your own risk.
334
335Instructions for obtaining the latest development version of @tramp{}
336from CVS can be found by going to the Savannah project page at
337@uref{http://savannah.gnu.org/projects/tramp/} and then clicking on the
338CVS link in the navigation bar at the top. Or follow the example
339session below:
340
341@example
342] @strong{cd ~/lisp}
343] @strong{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/tramp login}
344
345(Logging in to anoncvs@@subversions.gnu.org)
346CVS password: @strong{(just hit RET here)}
347@dots{}
348
349] @strong{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/tramp co tramp}
350@end example
351
352You should now have a directory @file{~/lisp/tramp} containing the latest
353version of @tramp{}. You can fetch the latest updates from the repository
354by issuing the command:
355
356@example
357] @strong{cd ~/lisp/tramp}
358] @strong{cvs update -d}
359@end example
360
361
362@node History
363@chapter History of @tramp{}
92eeeafc
KG
364@cindex history
365@cindex development history
fb7933a3
KG
366
367Development was started end of November 1998. The package was called
92eeeafc
KG
368@file{rssh.el}, back then. It only provided one method to access a
369file, using @command{ssh} to log in to a remote host and using
370@command{scp} to transfer the file contents. After a while, the name
371was changed to @file{rcp.el}, and now it's @tramp{}. Along the way,
372many more methods for getting a remote shell and for transferring the
373file contents were added. Support for VC was added.
fb7933a3 374
92eeeafc
KG
375The most recent addition of major features were the multi-hop methods
376added in April 2000 and the unification of @tramp{} and Ange-FTP
377filenames in July 2002.
fb7933a3
KG
378
379
380@node Installation
381@chapter Installing @tramp{} into Emacs or XEmacs
92eeeafc 382@cindex installation
fb7933a3 383
92eeeafc
KG
384If you use the version that comes with your Emacs or the XEmacs
385package, the following information is not necessary. Installing
386@tramp{} into your Emacs or XEmacs is a relatively easy process, at
387least compared to rebuilding your machine from scratch. ;)
fb7933a3
KG
388
389Seriously though, the installation should be a fairly simple matter.
390
391The easiest way to proceed is as follows:
392
393@itemize
394@item
395Choose a directory, say @file{~/emacs/}. Change into that directory and
396unpack the tarball. This will give you a directory
397@file{~/emacs/tramp/} which contains subdirectories @file{lisp} for the
398Lisp code and @file{texi} for the documentation.
399
400@item
401Optionally byte-compile all files in the Lisp directory,
402@file{~/emacs/tramp/lisp/}, by issuing a command like the following from
403the top level directory @file{~/emacs/tramp/}:
404@example
405make EMACS=emacs all # for Emacs users
406make EMACS=xemacs all # for XEmacs users
407@end example
408
409@item
410NOTE:
411@example
412If you run into problems running the example @command{make}
413commands, don't dispare. You can still byte compile the
414@file{*.el} files by opening emacs in @command{dired}
415(@command{C-x d}) mode, at @file{~/tramp/lisp}. Mark the lisp
92eeeafc 416files with @kbd{m}, then press @kbd{B} to byte compile
fb7933a3
KG
417your selections.
418
419Something similar can be done to create the info manual.
420Just cd to @file{~/emacs/tramp/texi} and load the @file{tramp.texi}
92eeeafc 421file in emacs. Then press @kbd{M-x makeinfo-buffer <RET>}
fb7933a3
KG
422to generate @file{tramp.info}.
423@end example
424
425@item
426Tell Emacs about the new Lisp directory and the @tramp{} package
427with the following lines in @file{~/.emacs}:
428@lisp
429(add-to-list 'load-path "~/emacs/tramp/lisp/")
430(require 'tramp)
431@end lisp
432
433@item
434To be able to read the Info documentation, create a file
435@file{~/emacs/tramp/texi/dir} using for example the
436@command{install-info} command, and add the directory to the search
437path for Info.
438
439@item
440NOTE:
441@example
442On systems using `gnu' @command{install-info}, the
443@command{install-info} syntax is very direct and simple. One can
444cd to @file{~/emacs/tramp/texi} and type:
92eeeafc 445 @kbd{install-info tramp.info dir}
fb7933a3
KG
446and a @file{dir} file will be created with the @tramp{}
447entry. The info reader will know how to interpret it, but must
448be told where to find it (see below). If you want anything fancier
92eeeafc 449you'll need to look through @kbd{man install-info}.
fb7933a3
KG
450
451Debian gnu/linux doesn't default to `gnu' @command{install-info} and
452uses its own version. This version does not create a @file{dir} file
453for you from scratch. You must provide a skeleton dir file it
454recognizes. One can be found in a default install at
455@file{/usr/info/dir}. Copy the top of this file down to the first
456occurrence of `* Menu' including that line plus one more blank line,
457to your working directory @file{texi/dir}, or use the sample provided
458in the @file{texi} directroy of this distribution. See
459@file{texi/dir_sample}
460
461Once a @file{dir} file is in place, this command will make the entry.
462 install-info --infodir=. tramp.info
463If you want it in a specific category
92eeeafc 464 (see @kbd{man install-info} for further details)
fb7933a3
KG
465@end example
466
467If the environment variable @env{INFOPATH} is set, add the directory
468@file{~/emacs/tramp/texi/} to it. Else, add the directory to
469@code{Info-default-directory-list}, as follows:
470@lisp
471(add-to-list 'Info-default-directory-list "~/emacs/tramp/texi/")
472@end lisp
473XEmacs 21 users should use @code{Info-directory-list} rather than
474@code{Info-default-directory-list}.
475
476@end itemize
477
478
92eeeafc 479For XEmacs users, the package @file{fsf-compat} must be installed.
fb7933a3
KG
480For details on package installation, see @ref{Packages, , ,xemacs}.
481@ifhtml
482(If the previous link doesn't work, try the XEmacs documentation at
483@uref{http://www.xemacs.org/Documentation/packageGuide.html,the XEmacs
484site}.)
485@end ifhtml
486
487@node Configuration
488@chapter Configuring @tramp{} for use
92eeeafc 489@cindex configuration
fb7933a3 490
92eeeafc 491@cindex default configuration
fb7933a3 492@tramp{} is (normally) fully functional when it is initially
92eeeafc
KG
493installed. It is initially configured to use the @command{sh} program
494to connect to the remote host and to use base-64 encoding (on the
495remote host, via @command{mimencode}, and on the local host via the
496built-in support for base-64 encoding in Emacs).
fb7933a3
KG
497
498On some hosts, there are problems with opening a connection. These are
499related to the behavior of the remote shell. See @xref{Remote shell
500setup}, for details on this.
501
92eeeafc
KG
502If you do not wish to use these commands to connect to the remote
503host, you should change the default connection and transfer method
504that @tramp uses. There are several different methods that @tramp{}
505can use to connect to remote machines and transfer files
506(@pxref{Connection types}).
fb7933a3
KG
507
508
509@menu
510* Connection types:: Types of connections made to remote machines.
511* Inline methods:: Inline methods.
512* External transfer methods:: External transfer methods.
513* Multi-hop Methods:: Connecting to a remote host using multiple hops.
514* Default Method:: Selecting a default method.
515* Customizing Methods:: Using Non-Standard Methods.
516* Remote Programs:: How @tramp{} finds and uses programs on the remote machine.
517* Remote shell setup:: Remote shell setup hints.
518* Windows setup hints:: Issues with Cygwin ssh.
519@end menu
520
521
522@node Connection types
523@section Types of connections made to remote machines.
92eeeafc 524@cindex connection types, overview
fb7933a3
KG
525
526There are two basic types of transfer methods, each with its own
92eeeafc 527advantages and limitations. Both types of connection make use of a
fb7933a3
KG
528remote shell access program such as @command{rsh}, @command{ssh} or
529@command{telnet} to connect to the remote machine.
530
531This connection is used to perform many of the operations that @tramp
532requires to make the remote file system transparently accessible from
533the local machine. It is only when visiting files that the methods
534differ.
535
92eeeafc
KG
536@cindex inline methods
537@cindex external transfer methods
538@cindex external methods
539@cindex out-of-band methods
540@cindex methods, inline
541@cindex methods, external transfer
542@cindex methods, out-of-band
543Loading or saving a remote file requires that the content of the file
544be transfered between the two machines. The content of the file can be
545transfered over the same connection used to log in to the remote
546machine or the file can be transfered through another connection using
547a remote copy program such as @command{rcp}, @command{scp} or
548@command{rsync}. The former are called @dfn{inline methods}, the
549latter are called @dfn{out-of-band methods} or @dfn{external transfer
550methods} (@dfn{external methods} for short).
fb7933a3
KG
551
552The performance of the external transfer methods is generally better
92eeeafc
KG
553than that of the inline methods, at least for large files. This is
554caused by the need to encode and decode the data when transferring
555inline.
fb7933a3
KG
556
557The one exception to this rule are the @command{scp} based transfer
558methods. While these methods do see better performance when actually
559transferring files, the overhead of the cryptographic negotiation at
560startup may drown out the improvement in file transfer times.
561
562External transfer methods do require that the remote copy command is not
563interactive --- that is, the command does not prompt you for a password.
564If you cannot perform remote copies without a password, you will need to
565use an inline transfer method to work with @tramp{}.
566
92eeeafc
KG
567@cindex multi-hop methods
568@cindex methods, multi-hop
fb7933a3
KG
569A variant of the inline methods are the @dfn{multi-hop methods}.
570These methods allow you to connect a remote host using a number `hops',
571each of which connects to a different host. This is useful if you are
572in a secured network where you need to go through a bastion host to
573connect to the outside world.
574
575
576@node Inline methods
577@section Inline methods
92eeeafc
KG
578@cindex inline methods
579@cindex methods, inline
fb7933a3
KG
580
581The inline methods in @tramp{} are quite powerful and can work in
582situations where you cannot use an external transfer program to connect.
583Inline methods are the only methods that work when connecting to the
584remote machine via telnet. (There are also strange inline methods which
585allow you to transfer files between @emph{user identities} rather than
586hosts, see below.)
587
588These methods depend on the existence of a suitable encoding and
92eeeafc 589decoding command on remote machine. Locally, @tramp{} may be able to use
fb7933a3
KG
590features of Emacs to decode and encode the files or it may require
591access to external commands to perform that task.
592
92eeeafc
KG
593@cindex uuencode
594@tramp{} supports the use of @command{uuencode} to transfer files.
595This is @emph{not} recommended. The @command{uuencode} and
596@command{uudecode} commands are not well standardized and may not
597function correctly or at all on some machines, notably AIX and IRIX.
598These systems do not work with @command{uuencode} at all. (But do see
599the note about AIX in the documentation for @var{tramp-methods}.)
fb7933a3 600
92eeeafc
KG
601@cindex mimencode
602@cindex base-64 encoding
fb7933a3
KG
603In summary, if possible use the @command{mimencode} methods to transfer
604the data base64 encoded. This has the advantage of using a built-in
605command in every modern Emacs, improving performance.
606
92eeeafc 607@table @asis
fb7933a3 608@item @option{rm} --- @command{rsh} with @command{mimencode}
92eeeafc
KG
609@cindex method rm
610@cindex rm method
e28e4d20 611@cindex method using rsh (rm)
fb7933a3
KG
612
613Connect to the remote host with @command{rsh} and use base64 encoding to
614transfer files between the machines.
615
616This requires the @command{mimencode} command that is part of the
617@command{metamail} packages. This may not be installed on all remote
618machines.
619
620
621@item @option{sm} --- @command{ssh} with @command{mimencode}
92eeeafc
KG
622@cindex method sm
623@cindex sm method
e28e4d20
KG
624@cindex method using ssh (sm)
625@cindex ssh (with sm method)
626@cindex mimencode (with sm method)
627@cindex base-64 encoding (with sm method)
fb7933a3
KG
628
629Connect to the remote host with @command{ssh} and use base64 encoding to
630transfer files between the machines.
631
632This is identical to the previous option except that the @command{ssh}
633package is used, making the connection more secure.
634
635There are also two variants, @option{sm1} and @option{sm2} that use the
636@command{ssh1} and @command{ssh2} commands explicitly. If you don't know
637what these are, you do not need these options.
638
8e3a1104
KG
639All the methods based on @command{ssh} have an additional kludgy
640feature: you can specify a host name which looks like @file{host#42}
641(the real host name, then a hash sign, then a port number). This
642means to connect to the given host but to also pass @code{-p 42} as
643arguments to the @command{ssh} command.
644
fb7933a3
KG
645
646@item @option{tm} --- @command{telnet} with @command{mimencode}
92eeeafc
KG
647@cindex method tm
648@cindex tm method
e28e4d20
KG
649@cindex method using telnet (tm)
650@cindex telnet (with tm method)
651@cindex mimencode (with tm method)
652@cindex base-64 encoding (with tm method)
fb7933a3
KG
653
654Connect to the remote host with @command{telnet} and use base64 encoding
655to transfer files between the machines.
656
657This requires the @command{mimencode} command that is part of the
658@command{metamail} packages.
659
660
661@item @option{ru} --- @command{rsh} with @command{uuencode}
92eeeafc
KG
662@cindex method ru
663@cindex ru method
664@cindex method using rsh
e28e4d20
KG
665@cindex rsh (with ru method)
666@cindex uuencode (with ru method)
fb7933a3
KG
667
668Connect to the remote host with @command{rsh} and use the
669@command{uuencode} and @command{uudecode} commands to transfer files
670between the machines.
671
672
673@item @option{su} --- @command{ssh} with @command{uuencode}
92eeeafc
KG
674@cindex method su
675@cindex su method
e28e4d20
KG
676@cindex method using ssh (su)
677@cindex ssh (with su method)
678@cindex uuencode (with su method)
fb7933a3
KG
679
680Connect to the remote host with @command{ssh} and use the
681@command{uuencode} and @command{uudecode} commands to transfer files
682between the machines.
683
8e3a1104
KG
684As with the @command{ssh} and base64 option (@option{sm}) above, this
685provides the @option{su1} and @option{su2} methods to explicitly
686select an ssh version.
fb7933a3
KG
687
688Note that this method does not invoke the @command{su} program, see
689below for methods which use that.
690
92eeeafc 691This supports the @samp{-p} kludge.
8e3a1104 692
fb7933a3
KG
693
694@item @option{tu} --- @command{telnet} with @command{uuencode}
92eeeafc
KG
695@cindex tu method
696@cindex method tu
e28e4d20
KG
697@cindex method using telnet (tu)
698@cindex telnet (with tu method)
699@cindex uuencode (with tu method)
fb7933a3
KG
700
701Connect to the remote host with @command{telnet} and use the
702@command{uuencode} and @command{uudecode} commands to transfer files
703between the machines.
704
705
706@item @option{sum} --- @command{su} with @command{mimencode}
92eeeafc
KG
707@cindex method sum
708@cindex sum method
e28e4d20
KG
709@cindex method using su (sum)
710@cindex su (with sum method)
711@cindex mimencode (with sum method)
712@cindex base-64 encoding (with sum method)
fb7933a3
KG
713
714This method does not connect to a remote host at all, rather it uses the
715@command{su} program to allow you to edit files as another user. Uses
716base64 encoding to transfer the file contents.
717
718
719@item @option{suu} --- @command{su} with @command{uuencode}
92eeeafc
KG
720@cindex method suu
721@cindex suu method
e28e4d20
KG
722@cindex method using su (suu)
723@cindex su (with suu method)
724@cindex uuencode (with suu method)
fb7933a3
KG
725
726Like @option{sum}, this uses the @command{su} program to allow you to
727edit files on the local host as another user. Uses @command{uuencode}
728and @command{uudecode} to transfer the file contents.
729
730
731@item @option{sudm} --- @command{sudo} with @command{mimencode}
92eeeafc
KG
732@cindex method sudm
733@cindex sudm method
e28e4d20
KG
734@cindex method using sudo (sudm)
735@cindex sudo (with sudm method)
736@cindex mimencode (with sudm method)
737@cindex base-64 encoding (with sudm method)
fb7933a3
KG
738
739This is similar to the @option{sum} method, but it uses @command{sudo}
740rather than @command{su} to become a different user.
741
742Note that @command{sudo} must be configured to allow you to start a
743shell as the user. It would be nice if it was sufficient if
744@command{ls} and @command{mimencode} were allowed, but that is not easy
745to implement, so I haven't got around to it, yet.
746
747
748@item @option{sudu} --- @command{sudo} with @command{uuencode}
92eeeafc
KG
749@cindex method sudu
750@cindex sudu method
e28e4d20
KG
751@cindex method using sudo (sudu)
752@cindex sudo (with sudu method)
753@cindex uuencode (with sudu method)
fb7933a3
KG
754
755This is similar to the @option{suu} method, but it uses @command{sudo}
756rather than @command{su} to become a different user.
757
758
759@item @option{smx} --- @command{ssh} with @command{mimencode}
92eeeafc
KG
760@cindex method smx
761@cindex smx method
e28e4d20
KG
762@cindex method using ssh (smx)
763@cindex ssh (with smx method)
764@cindex mimencode (with smx method)
765@cindex base-64 encoding (with smx method)
766@cindex Cygwin (with smx method)
fb7933a3
KG
767
768As you expect, this is similar to @option{sm}, only a little
769different. Whereas @option{sm} opens a normal interactive shell on
92eeeafc
KG
770the remote host, this option uses @samp{ssh -t -t @var{host} -l
771@var{user} /bin/sh} tp open a connection. This is useful for users
772where the normal login shell is set up to ask them a number of
773questions when logging in. This procedure avoids these questions, and
774just gives @tramp{} a more-or-less `standard' login shell to work
775with.
fb7933a3 776
83fa16cf
KG
777Note that this procedure does not eliminate questions asked by
778@command{ssh} itself. For example, @command{ssh} might ask ``Are you
779sure you want to continue connecting?'' if the host key of the remote
780host is not known. Tramp does not know how to deal with such a
781question (yet), therefore you will need to make sure that you can log
782in without such questions.
783
fb7933a3
KG
784This is also useful for Windows users where @command{ssh}, when
785invoked from an Emacs buffer, tells them that it is not allocating a
786pseudo tty. When this happens, the login shell is wont to not print
92eeeafc
KG
787any shell prompt, which confuses @tramp{} mightily. For reasons
788unknown, some Windows ports for @command{ssh} (maybe the Cygwin one)
789require the doubled @samp{-t} option.
fb7933a3 790
92eeeafc 791This supports the @samp{-p} kludge.
8e3a1104 792
fb7933a3
KG
793
794@item @option{km} --- @command{krlogin} with @command{mimencode}
92eeeafc
KG
795@cindex method km
796@cindex km method
e28e4d20
KG
797@cindex krlogin (with km method)
798@cindex Kerberos (with km method)
799@cindex mimencode (with km method)
800@cindex base-64 encoding (with km method)
fb7933a3
KG
801
802This method is also similar to @option{sm}. It only uses the
803@command{krlogin -x} command to log in to the remote host.
804
805
806@item @option{plinku} --- @command{plink} with @command{uuencode}
92eeeafc
KG
807@cindex method plinku
808@cindex plinku method
e28e4d20
KG
809@cindex method using plink (plinku)
810@cindex plink (with plinku method)
811@cindex uuencode (with plinku method)
fb7933a3
KG
812
813This method is mostly interesting for Windows users using the PuTTY
92eeeafc 814implementation of SSH. It uses @samp{plink -ssh} to log in to the
fb7933a3
KG
815remote host.
816
817CCC: Do we have to connect to the remote host once from the command
818line to accept the SSH key? Maybe this can be made automatic?
819
92eeeafc 820CCC: Does @command{plink} support the @samp{-p} option? Tramp
8e3a1104
KG
821will support that, anyway.
822
fb7933a3 823@item @option{plinkm} --- @command{plink} with @command{mimencode}
92eeeafc
KG
824@cindex method plinkm
825@cindex plinkm method
e28e4d20
KG
826@cindex method using plink (plinkm)
827@cindex plink (with plinkm method)
828@cindex mimencode (with plinkm method)
829@cindex base-64 encoding (with plinkm method)
fb7933a3
KG
830
831Like @option{plinku}, but uses base64 encoding instead of uu encoding.
832
92eeeafc 833@end table
fb7933a3
KG
834
835
836
837@node External transfer methods
838@section External transfer methods
92eeeafc
KG
839@cindex methods, external transfer
840@cindex methods, out-of-band
841@cindex external transfer methods
842@cindex out-of-band methods
fb7933a3
KG
843
844The external transfer methods operate through multiple channels, using
845the remote shell connection for many actions while delegating file
846transfers to an external transfer utility.
847
848This saves the overhead of encoding and decoding that multiplexing the
849transfer through the one connection has with the inline methods.
850
851If you want to use an external transfer method you @emph{must} be able
852to execute the transfer utility to copy files to and from the remote
853machine without any interaction.
854
92eeeafc 855@cindex ssh-agent
fb7933a3
KG
856This means that you will need to use @command{ssh-agent} if you use the
857@command{scp} program for transfers, or maybe your version of
858@command{scp} accepts a password on the command line.@footnote{PuTTY's
859@command{pscp} allows you to specify the password on the command line.}
860If you use @command{rsync} via @command{ssh} then the same rule must
861apply to that connection.
862
863If you cannot get @command{scp} to run without asking for a password but
864would still like to use @command{ssh} to secure your connection, have a
865look at the @command{ssh} based inline methods.
866
867
92eeeafc 868@table @asis
fb7933a3 869@item @option{rcp} --- @command{rsh} and @command{rcp}
92eeeafc
KG
870@cindex method rcp
871@cindex rcp method
e28e4d20
KG
872@cindex rcp (with rcp method)
873@cindex rsh (with rcp method)
fb7933a3
KG
874
875This method uses the @command{rsh} and @command{rcp} commands to connect
876to the remote machine and transfer files. This is probably the fastest
877connection method available.
878
879
880@item @option{scp} --- @command{ssh} and @command{scp}
92eeeafc
KG
881@cindex method scp
882@cindex scp method
e28e4d20
KG
883@cindex scp (with scp method)
884@cindex ssh (with scp method)
fb7933a3
KG
885
886Using @command{ssh} to connect to the remote host and @command{scp} to
887transfer files between the machines is the best method for securely
888connecting to a remote machine and accessing files.
889
890The performance of this option is also quite good. It may be slower than
891the inline methods when you often open and close small files however.
892The cost of the cryptographic handshake at the start of an @command{scp}
893session can begin to absorb the advantage that the lack of encoding and
894decoding presents.
895
92eeeafc 896All the @command{ssh} based methods support the kludgy @samp{-p}
8e3a1104
KG
897feature where you can specify a port number to connect to in the host
898name. For example, the host name @file{host#42} tells Tramp to
92eeeafc 899specify @samp{-p 42} in the argument list for @command{ssh}.
8e3a1104 900
fb7933a3
KG
901
902@item @option{rsync} --- @command{ssh} and @command{rsync}
92eeeafc
KG
903@cindex method rsync
904@cindex rsync method
e28e4d20
KG
905@cindex rsync (with rsync method)
906@cindex ssh (with rsync method)
fb7933a3
KG
907
908Using the @command{ssh} command to connect securely to the remote
909machine and the @command{rsync} command to transfer files is almost
910identical to the @option{scp} method.
911
912While @command{rsync} performs much better than @command{scp} when
913transferring files that exist on both hosts, this advantage is lost if
914the file exists only on one side of the connection.
915
916The @command{rsync} based method may be considerably faster than the
917@command{rcp} based methods when writing to the remote system. Reading
918files to the local machine is no faster than with a direct copy.
919
92eeeafc 920This method supports the @samp{-p} hack.
8e3a1104 921
fb7933a3
KG
922
923@item @option{scpx} --- @command{ssh} and @command{scp}
92eeeafc
KG
924@cindex method scpx
925@cindex scpx method
e28e4d20
KG
926@cindex scp (with scpx method)
927@cindex ssh (with scpx method)
928@cindex Cygwin (with scpx method)
fb7933a3
KG
929
930As you expect, this is similar to @option{scp}, only a little
92eeeafc
KG
931different. Whereas @option{scp} opens a normal interactive shell on
932the remote host, this option uses @samp{ssh -t -t @var{host} -l
933@var{user} /bin/sh} to open a connection. This is useful for users
934where the normal login shell is set up to ask them a number of
935questions when logging in. This procedure avoids these questions, and
936just gives @tramp{} a more-or-less `standard' login shell to work
937with.
fb7933a3
KG
938
939This is also useful for Windows users where @command{ssh}, when
940invoked from an Emacs buffer, tells them that it is not allocating a
941pseudo tty. When this happens, the login shell is wont to not print
92eeeafc
KG
942any shell prompt, which confuses @tramp{} mightily. Maybe this
943applies to the Cygwin port of SSH.
fb7933a3 944
92eeeafc 945This method supports the @samp{-p} hack.
8e3a1104 946
fb7933a3
KG
947
948@item @option{pscp} --- @command{plink} and @command{pscp}
92eeeafc
KG
949@cindex method pscp
950@cindex pscp method
e28e4d20
KG
951@cindex pscp (with pscp method)
952@cindex plink (with pscp method)
953@cindex PuTTY (with pscp method)
fb7933a3
KG
954
955This method is similar to @option{scp}, but it uses the
956@command{plink} command to connect to the remote host, and it uses
957@command{pscp} for transferring the files. These programs are part
958of PuTTY, an SSH implementation for Windows.
959
92eeeafc 960CCC: Does @command{plink} support the @samp{-p} hack?
8e3a1104 961
fb7933a3
KG
962
963@item @option{fcp} --- @command{fsh} and @command{fcp}
92eeeafc
KG
964@cindex method fcp
965@cindex fcp method
e28e4d20
KG
966@cindex fsh (with fcp method)
967@cindex fcp (with fcp method)
fb7933a3
KG
968
969This method is similar to @option{scp}, but it uses the @command{fsh}
970command to connect to the remote host, and it uses @command{fcp} for
971transferring the files. @command{fsh/fcp} are a front-end for
972@command{ssh} which allow for reusing the same @command{ssh} session
973for submitting several commands. This avoids the startup overhead of
974@command{scp} (which has to establish a secure connection whenever it
975is called). Note, however, that you can also use one of the inline
976methods to achieve a similar effect.
977
92eeeafc
KG
978This method uses the command @samp{fsh @var{host} -l @var{user}
979/bin/sh -i} to establish the connection, it does not work to just say
980@command{fsh @var{host} -l @var{user}}.
fb7933a3 981
e28e4d20
KG
982@cindex method fsh
983@cindex fsh method
92eeeafc
KG
984There is no inline method using @command{fsh} as the multiplexing
985provided by the program is not very useful in our context. @tramp{}
986opens just one connection to the remote host and then keeps it open,
987anyway.
988
989@end table
fb7933a3
KG
990
991@node Multi-hop Methods
992@section Connecting to a remote host using multiple hops
92eeeafc
KG
993@cindex multi-hop methods
994@cindex methods, multi-hop
fb7933a3
KG
995
996Sometimes, the methods described before are not sufficient. Sometimes,
997it is not possible to connect to a remote host using a simple command.
998For example, if you are in a secured network, you might have to log in
999to a `bastion host' first before you can connect to the outside world.
1000Of course, the target host may also require a bastion host. The format
1001of multi-hop filenames is slightly different than the format of normal
1002@tramp{} methods.
1003
1004A multi-hop file name specifies a method, a number of hops, and a path
1005name on the remote system. The method specifies how the file is
1006transferred through the inline connection. The following two multi-hop
1007methods are available:
1008
92eeeafc 1009@table @asis
fb7933a3 1010@item @option{multi} --- base64 encoding with @command{mimencode}
92eeeafc
KG
1011@cindex method multi
1012@cindex multi method
e28e4d20
KG
1013@cindex mimencode (with multi method)
1014@cindex base-64 encoding (with multi method)
fb7933a3
KG
1015
1016The file is transferred through the connection in base64 encoding. Uses
1017the @command{mimencode} program for doing encoding and decoding, but
1018uses an Emacs internal implementation on the local host if available.
1019
1020@item @option{multiu} --- use commands @command{uuencode} and @command{uudecode}
92eeeafc
KG
1021@cindex method multiu
1022@cindex multiu method
e28e4d20 1023@cindex uuencode (with multiu method)
fb7933a3
KG
1024
1025The file is transferred through the connection in `uu' encoding. Uses
1026the @command{uuencode} and @command{uudecode} programs for encoding and
1027decoding, but uses a Lisp implementation for decoding on the local host
1028if available.
1029
92eeeafc 1030@end table
fb7933a3
KG
1031
1032Each hop consists of a @dfn{hop method} specification, a user name and a
1033host name. The following hop methods are (currently) available:
1034
92eeeafc
KG
1035@table @option
1036@item telnet
1037@cindex hop method telnet
1038@cindex telnet hop method
fb7933a3
KG
1039
1040Uses the well-known @command{telnet} program to connect to the host.
1041Whereas user name and host name are supplied in the file name, the
1042user is queried for the password.
1043
92eeeafc
KG
1044@item rsh
1045@cindex hop method rsh
1046@cindex rsh hop method
fb7933a3
KG
1047
1048This uses @command{rsh} to connect to the host. You do not need to
1049enter a password unless @command{rsh} explicitly asks for it.
1050
92eeeafc
KG
1051@item ssh
1052@cindex hop method ssh
1053@cindex ssh hop method
fb7933a3
KG
1054
1055This uses @command{ssh} to connect to the host. You might have to enter
1056a password or a pass phrase.
1057
92eeeafc
KG
1058@item su
1059@cindex hop method su
1060@cindex su hop method
fb7933a3
KG
1061
1062This method does not actually contact a different host, but it allows
1063you to become a different user on the host you're currently on. This
1064might be useful if you want to edit files as root, but the remote host
1065does not allow remote root logins. In this case you can use
1066@option{telnet}, @option{rsh} or @option{ssh} to connect to the
1067remote host as a non-root user, then use an @option{su} hop to become
1068root. But @option{su} need not be the last hop in a sequence, you could
1069also use it somewhere in the middle, if the need arises.
1070
1071Even though you @emph{must} specify both user and host with a
1072@option{su} hop, the host name is ignored and only the user name is
1073used.
1074
92eeeafc
KG
1075@item sudo
1076@cindex hop method sudo
1077@cindex sudo hop method
fb7933a3
KG
1078
1079This is similar to the @option{su} hop, except that it uses
1080@command{sudo} rather than @command{su} to become a different user.
1081
92eeeafc 1082@end table
fb7933a3 1083
92eeeafc
KG
1084Some people might wish to use port forwarding with @command{ssh} or
1085maybe they have to use a nonstandard port. This can be accomplished
1086by putting a stanza in @file{~/.ssh/config} for the account which
1087specifies a different port number for a certain host name. But it can
1088also be accomplished within Tramp, by adding a multi-hop method. For
1089example:
fb7933a3
KG
1090
1091@lisp
1092(add-to-list 'tramp-multi-connection-function-alist
1093 '("sshf" tramp-multi-connect-rlogin "ssh %h -l %u -p 4400%n"))
1094@end lisp
1095
1096Now you can use a @code{sshf} hop which connects to port 4400 instead of
1097the standard port.
1098
1099
1100@node Default Method
1101@section Selecting a default method
92eeeafc 1102@cindex default method
fb7933a3 1103
92eeeafc 1104@vindex tramp-default-method
fb7933a3
KG
1105When you select an appropriate transfer method for your typical usage
1106you should set the variable @var{tramp-default-method} to reflect that
92eeeafc 1107choice. This variable controls which method will be used when a method
fb7933a3
KG
1108is not specified in the @tramp{} file path. For example:
1109
1110@lisp
1111(setq tramp-default-method "scp")
1112@end lisp
1113
92eeeafc
KG
1114@vindex tramp-default-method-alist
1115You can also specify different methods for certain user/host
1116combinations, via the variable @var{tramp-default-method-alist}. For
1117example, the following two lines specify to use the @option{sm}
1118method for all user names matching @samp{john} and the @option{rsync}
1119method for all host names matching @samp{lily}. The third line
1120specifies to use the @option{sum} method for the user @samp{root} on
1121the machine @samp{localhost}.
1122
1123@lisp
1124(add-to-list 'tramp-default-method-alist '("" "john" "sm"))
1125(add-to-list 'tramp-default-method-alist '("lily" "" "rsync"))
1126(add-to-list 'tramp-default-method-alist
1127 '("\\`root\\'" "\\`localhost\\'" "sum"))
1128@end lisp
1129
1130@noindent
1131See the documentation for the variable
1132@var{tramp-default-method-alist} for more details.
1133
fb7933a3
KG
1134External transfer methods are normally preferable to inline transfer
1135methods, giving better performance. They may not be useful if you use
1136many remote machines where you cannot log in without a password.
1137
1138@xref{Inline methods}.
1139@xref{External transfer methods}.
1140@xref{Multi-hop Methods}.
1141
1142Another consideration with the selection of transfer methods is the
1143environment you will use them in and, especially when used over the
1144Internet, the security implications of your preferred method.
1145
1146The @command{rsh} and @command{telnet} methods send your password as
1147plain text as you log in to the remote machine, as well as transferring
1148the files in such a way that the content can easily be read from other
1149machines.
1150
1151If you need to connect to remote systems that are accessible from the
1152Internet, you should give serious thought to using @command{ssh} based
1153methods to connect. These provide a much higher level of security,
1154making it a non-trivial exercise for someone to obtain your password or
1155read the content of the files you are editing.
1156
1157@node Customizing Methods
1158@section Using Non-Standard Methods
92eeeafc
KG
1159@cindex customizing methods
1160@cindex using non-standard methods
1161@cindex create your own methods
fb7933a3
KG
1162
1163There is a variable @code{tramp-methods} which you can change if the
1164predefined methods don't seem right.
1165
1166For the time being, I'll refer you to the Lisp documentation of that
1167variable, accessible with @kbd{C-h v tramp-methods @key{RET}}.
1168
1169
1170@node Remote Programs
1171@section How @tramp{} finds and uses programs on the remote machine.
1172
1173@tramp{} depends on a number of programs on the remote host in order to
1174function, including @command{ls}, @command{test}, @command{find} and
1175@command{cat}.
1176
1177In addition to these required tools, there are various tools that may be
1178required based on the connection method. See @ref{Inline methods} and
1179@ref{External transfer methods} for details on these.
1180
1181Certain other tools, such as @command{perl} (or @command{perl5}) and
1182@command{grep} will be used if they can be found. When they are
1183available, they are used to improve the performance and accuracy of
1184remote file access.
1185
92eeeafc 1186@vindex tramp-remote-path
fb7933a3
KG
1187When @tramp{} connects to the remote machine, it searches for the
1188programs that it can use. The variable @var{tramp-remote-path} controls
1189the directories searched on the remote machine.
1190
1191By default, this is set to a reasonable set of defaults for most
1192machines. It is possible, however, that your local (or remote ;) system
1193administrator has put the tools you want in some obscure local
1194directory.
1195
1196In this case, you can still use them with @tramp{}. You simply need to
1197add code to your @file{.emacs} to add the directory to the remote path.
1198This will then be searched by @tramp{} when you connect and the software
1199found.
1200
1201To add a directory to the remote search path, you could use code such
1202as:
1203
1204@example
1205(require 'tramp) @i{; @tramp{} must be loaded before this}
1206 @i{; happens.}
1207
92eeeafc
KG
1208@i{; We have @command{perl} in "/usr/local/perl/bin"}
1209(add-to-list 'tramp-remote-path "/usr/local/perl/bin")
fb7933a3
KG
1210@end example
1211
1212@node Remote shell setup
1213@comment node-name, next, previous, up
1214@section Remote shell setup hints
92eeeafc 1215@cindex remote shell setup
e28e4d20
KG
1216@cindex @file{.profile} file
1217@cindex @file{.login} file
92eeeafc 1218@cindex shell init files
fb7933a3
KG
1219
1220As explained in the @ref{Overview} section, @tramp{} connects to the
1221remote host and talks to the shell it finds there. Of course, when you
1222log in, the shell executes its init files. Suppose your init file
1223requires you to enter the birthdate of your mother; clearly @tramp{}
1224does not know this and hence fails to log you in to that host.
1225
1226There are different possible strategies for pursuing this problem. One
1227strategy is to enable @tramp{} to deal with all possible situations.
1228This is a losing battle, since it is not possible to deal with
1229@emph{all} situations. The other strategy is to require you to set up
1230the remote host such that it behaves like @tramp{} expect. This might
1231be inconvenient because you have to invest a lot of effort into shell
1232setup before you can begin to use @tramp{}.
1233
1234The package, therefore, pursues a combined approach. It tries to figure
1235out some of the more common setups, and only requires you to avoid
1236really exotic stuff. For example, it looks through a list of
1237directories to find some programs on the remote host. And also, it
1238knows that it is not obvious how to check whether a file exist, and
1239therefore it tries different possibilities. (On some hosts and shells,
1240the command @code{test -e} does the trick, on some hosts the shell
1241builtin doesn't work but the program @code{/usr/bin/test -e} or
1242@code{/bin/test -e} works. And on still other hosts, @code{ls -d} is
1243the right way to do this.)
1244
1245Below you find a discussion of a few things that @tramp{} does not deal
1246with, and that you therefore have to set up correctly.
1247
92eeeafc
KG
1248@table @asis
1249@item @var{shell-prompt-pattern}
fb7933a3 1250@vindex shell-prompt-pattern
92eeeafc 1251
fb7933a3
KG
1252After logging in to the remote host, @tramp{} has to wait for the remote
1253shell startup to finish before it can send commands to the remote
1254shell. The strategy here is to wait for the shell prompt. In order to
1255recognize the shell prompt, the variable @code{shell-prompt-pattern} has
1256to be set correctly to recognize the shell prompt on the remote host.
1257
83fa16cf
KG
1258Note that Tramp requires the match for @code{shell-prompt-pattern} to
1259be at the end of the buffer. Many people have something like the
1260following as the value for the variable: @code{"^[^>$][>$] *"}. Now
1261suppose your shell prompt is @code{a <b> c $ }. In this case, Tramp
1262recognizes the @code{>} character as the end of the prompt, but it is
1263not at the end of the buffer.
1264
fb7933a3 1265@item @code{tset} and other questions
92eeeafc
KG
1266@cindex Unix command tset
1267@cindex tset Unix command
fb7933a3
KG
1268
1269Some people invoke the @code{tset} program from their shell startup
1270scripts which asks the user about the terminal type of the shell. Maybe
1271some shells ask other questions when they are started. @tramp{} does
1272not know how to answer these questions. (A facility for enabling
1273@tramp{} to answer these questions is planned for some future version,
1274but don't hold your breath.)
1275
1276Therefore, you should take care that the shell does not ask any
1277questions when invoked from @tramp{}. You can do this by checking the
1278@code{TERM} environment variable, it will be set to @code{dumb} when
1279connecting.
1280
1281@vindex tramp-terminal-type
1282The variable @code{tramp-terminal-type} can be used to change this value
1283@code{dumb}.
1284
92eeeafc 1285@end table
fb7933a3
KG
1286
1287
1288@node Windows setup hints
1289@section Issues with Cygwin ssh
e28e4d20 1290@cindex Cygwin, issues
fb7933a3
KG
1291
1292This section needs a lot of work! Please help.
1293
92eeeafc
KG
1294@cindex method smx with Cygwin
1295@cindex smx method with Cygwin
fb7933a3
KG
1296If you use the Cygwin installation of ssh (you have to explicitly select
1297it in the installer), then it should work out of the box to just select
1298@code{smx} as the connection method. You can find information about
1299setting up Cygwin in their FAQ at @uref{http://cygwin.com/faq/}.
1300
1301
1302@node Usage
1303@chapter Using @tramp
92eeeafc 1304@cindex using @tramp
fb7933a3
KG
1305
1306Once you have installed @tramp{} it will operate fairly transparently. You
1307will be able to access files on any remote machine that you can log in
1308to as though they were local.
1309
1310Files are specified to @tramp{} using a formalized syntax specifying the
92eeeafc
KG
1311details of the system to connect to. This is similar to the syntax used
1312by the @command{EFS} and @command{Ange-FTP} packages.
fb7933a3
KG
1313
1314
1315@menu
1316* Filename Syntax:: @tramp{} filename conventions.
1317* Multi-hop filename syntax:: Multi-hop filename conventions
1318* Dired:: Dired and filename completion.
1319@end menu
1320
1321
1322@node Filename Syntax
1323@section @tramp{} filename conventions
92eeeafc
KG
1324@cindex filename syntax
1325@cindex filename examples
fb7933a3 1326
f37fc5a7
KG
1327On Emacs, the Ange-FTP and Tramp filenames use a unified syntax. On
1328XEmacs, EFS and Tramp use different formats for the filenames.
1329Therefore, the following will describe the Emacs and XEmacs cases
1330separately.
fb7933a3 1331
f37fc5a7
KG
1332On Emacs, to access the file @var{path} on the remote machine
1333@var{machine} you would specify the filename
1334@file{/@var{machine}:@var{path}}. This will connect to @var{machine}
1335and transfer the file using the default method. @xref{Default
1336Method}. On XEmacs, use @file{/[@var{machine}]@var{path}}. (The
1337square brackets are part of the file name.)
1338
1339Some examples of @tramp{} filenames are shown below. In each case,
1340the Emacs-style filename is shown first, then the XEmacs-style
1341filename.
fb7933a3
KG
1342
1343@table @file
f37fc5a7
KG
1344@item /melancholia:.emacs
1345@itemx /[melancholia].emacs
fb7933a3
KG
1346Edit the file @file{.emacs} in your home directory on the machine
1347@code{melancholia}.
1348
f37fc5a7
KG
1349@item /melancholia.danann.net:.emacs
1350@itemx /[melancholia.danann.net].emacs
fb7933a3
KG
1351This edits the same file, using the fully qualified domain name of
1352the machine.
1353
f37fc5a7
KG
1354@item /melancholia:~/.emacs
1355@itemx /[melancholia]~/.emacs
fb7933a3
KG
1356This also edits the same file --- the @file{~} is expanded to your
1357home directory on the remote machine, just like it is locally.
1358
f37fc5a7
KG
1359@item /melancholia:~daniel/.emacs
1360@itemx /[melancholia]~daniel/.emacs
fb7933a3
KG
1361This edits the file @file{.emacs} in the home directory of the user
1362@code{daniel} on the machine @code{melancholia}. The @file{~<user>}
1363construct is expanded to the home directory of that user on the remote
1364machine.
1365
f37fc5a7
KG
1366@item /melancholia:/etc/squid.conf
1367@itemx /[melancholia]/etc/squid.conf
fb7933a3
KG
1368This edits the file @file{/etc/squid.conf} on the machine
1369@code{melancholia}.
1370
1371@end table
1372
fb7933a3
KG
1373Unless you specify a different name to use, @tramp{} will use the current
1374local user name as the remote user name to log in with. If you need to
1375log in as a different user, you can specify the user name as part of the
1376filename.
1377
f37fc5a7
KG
1378On Emacs, to log in to the remote machine as a specific user, you use
1379the syntax @file{/@var{user}@@@var{machine}:/path/to.file}. On
1380XEmacs, use @file{/[@var{user}@@@var{machine}]/path/to.file}. That
1381means that connecting to @code{melancholia} as @code{daniel} and
1382editing @file{.emacs} in your home directory you would specify
1383@file{/daniel@@melancholia:.emacs} on Emacs and
1384@file{/[daniel@@melancholia].emacs} on XEmacs.
fb7933a3
KG
1385
1386
1387It is also possible to specify other file transfer methods
f37fc5a7
KG
1388(@pxref{Default Method}) as part of the filename. On Emacs, this is
1389done by puttig the method before the user and host name, as in
1390@file{/@var{method}:} (note the trailing colon). On XEmacs, it is
1391done by replacing the initial @file{/[} with @file{/[<method>/}.
1392(Note the trailing slash!) The user, machine and file specification
1393remain the same.
fb7933a3 1394
f37fc5a7
KG
1395So, to connect to the machine @code{melancholia} as @code{daniel},
1396using the @option{su} method to transfer files, and edit @file{.emacs}
1397in my home directory I would specify the filename
1398@file{/su:daniel@@melancholia:.emacs} on Emacs and
1399@file{/[su/daniel@@melancholia].emacs} on XEmacs.
fb7933a3
KG
1400
1401
1402@node Multi-hop filename syntax
1403@section Multi-hop filename conventions
92eeeafc
KG
1404@cindex filename syntax for multi-hop files
1405@cindex multi-hop filename syntax
fb7933a3
KG
1406
1407The syntax of multi-hop file names is necessarily slightly different
1408than the syntax of other @tramp{} file names. Here's an example multi-hop
f37fc5a7 1409file name, first in Emacs syntax and then in XEmacs syntax:
fb7933a3 1410
f37fc5a7 1411@file{/multi:rsh:out@@gate:telnet:kai@@real.host:/path/to.file}
fb7933a3
KG
1412@file{/[multi/rsh:out@@gate/telnet:kai@@real.host]/path/to.file}
1413
1414This is quite a mouthful. So let's go through it step by step. The
f37fc5a7
KG
1415file name consists of three parts. On Emacs, the parts are separated
1416by colons, on XEmacs they are separated by slashes and square
1417brackets. The first part is @file{/multi:} (or @file{/[multi}), the
1418method specification. The second part is
1419@file{rsh:out@@gate:telnet:kai@@real.host} (or
1420@file{rsh:out@@gate/telnet:kai@@real.host}) and specifies the hops.
1421(Yes, on Emacs the second part may contain even more colons, so that's why
1422this file name has more than two colons in it.) The final part is
1423@file{/path/to.file} and specifies the file name on the remote host.
fb7933a3
KG
1424
1425The first part and the final part should be clear. @ref{Multi-hop
1426Methods}, for a list of alternatives for the method specification.
1427
1428The second part can be subdivided again into components, so-called hops.
1429In the above file name, there are two hops, @file{rsh:out@@gate} and
1430@file{telnet:kai@@real.host}.
1431
1432Each hop can @emph{again} be subdivided into (three) components, the
1433@dfn{hop method}, the @dfn{user name} and the @dfn{host name}. The
1434meaning of the second and third component should be clear, and the hop
1435method says what program to use to perform that hop.
1436
1437The first hop, @file{rsh:out@@gate}, says to use @command{rsh} to log in
1438as user @code{out} to the host @code{gate}. Starting at that host, the
1439second hop, @file{telnet:kai@@real.host}, says to use @command{telnet}
1440to log in as user @code{kai} to host @code{real.host}.
1441
1442@xref{Multi-hop Methods}, for a list of possible hop method values. The
1443variable @var{tramp-multi-connection-function-alist} contains the list of
1444possible hop methods and information on how to execute them, should you
1445want to add your own.
1446
1447
1448@node Dired
1449@section Dired and filename completion
92eeeafc
KG
1450@cindex dired
1451@cindex filename completion
fb7933a3
KG
1452
1453@tramp{} works transparently with dired, enabling you to use this powerful
1454file management tool to manage files on any machine you have access to
1455over the Internet.
1456
1457Filename completion also works with @tramp{} for files on remote machines
1458although there is no completion for user names or machine names at this
1459stage.
1460
1461As filename completion needs to fetch the listing of files from the
92eeeafc 1462remote machine, this feature is sometimes fairly slow. As @tramp{} does not
fb7933a3
KG
1463yet cache the results of directory listing, there is no gain in
1464performance the second time you complete filenames.
1465
1466If you need to browse a directory tree, Dired is a better choice, at
92eeeafc 1467present, than filename completion. Dired has its own cache mechanism
fb7933a3
KG
1468and will only fetch the directory listing once.
1469
1470
1471@node Bug Reports
1472@chapter Reporting Bugs and Problems
92eeeafc 1473@cindex bug reports
fb7933a3
KG
1474
1475Bugs and problems with @tramp{} are actively worked on by the development
1476team. Feature requests and suggestions are also more than welcome.
1477
1478The @tramp{} mailing list is a great place to get information on working
1479with @tramp{}, solving problems and general discussion and advice on topics
1480relating to the package.
1481
1482The mailing list is at @email{tramp-devel@@mail.freesoftware.fsf.org}.
1483Messages sent to this address go to all the subscribers. This is
1484@emph{not} the address to send subscription requests to.
1485
1486For help on subscribing to the list, send mail to the administrative
1487address, @email{tramp-devel-request@@mail.freesoftware.fsf.org}, with the
1488subject @samp{help}.
1489
1490To report a bug in @tramp{}, you should execute @kbd{M-x tramp-bug}. This
1491will automatically generate a buffer with the details of your system and
1492@tramp{} version.
1493
1494When submitting a bug report, please try to describe in excruciating
1495detail the steps required to reproduce the problem, the setup of the
1496remote machine and any special conditions that exist.
1497
1498If you can identify a minimal test case that reproduces the problem,
1499include that with your bug report. This will make it much easier for the
1500development team to analyze and correct the problem.
1501
1502@node Frequently Asked Questions
1503@chapter Frequently Asked Questions
92eeeafc
KG
1504@cindex frequently asked questions
1505@cindex FAQ
fb7933a3
KG
1506
1507@itemize @bullet
92eeeafc
KG
1508@item
1509Where can I get the latest @tramp{}?
fb7933a3
KG
1510
1511@tramp{} is available at
1512@uref{ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/tramp.tar.gz}.
1513There is also a Savannah project page, at
1514@uref{https://savannah.gnu.org/projects/tramp/}.
1515
1516
92eeeafc
KG
1517@item
1518Which systems does it work on?
fb7933a3
KG
1519
1520The package has been used successfully on Emacs 20 and Emacs 21, as well
1521as XEmacs 21. XEmacs 20 is more problematic, see the notes in
1522@file{tramp.el}. I don't think anybody has really tried it on Emacs 19.
1523
1524The package was intended to work on Unix, and it really expects a
1525Unix-like system on the remote end, but some people seemed to have some
1526success getting it to work on NT Emacs.
1527
1528There are some informations on Tramp on NT at the following URL; many
1529thanks to Joe Stoy for providing the information:
1530@uref{ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/}
1531
1532The above mostly contains patches to old ssh versions; Tom Roche has a
1533Web page with instructions:
1534@uref{http://www4.ncsu.edu/~tlroche/plinkTramp.html}
1535
1536??? Is the XEmacs info correct?
1537
1538??? Can somebody provide some information for getting it to work on NT
1539Emacs? I think there was some issue with @command{ssh}?
1540
1541
92eeeafc
KG
1542@item
1543I can't stop EFS starting with XEmacs
fb7933a3
KG
1544
1545Not all the older versions of @tramp{} supported XEmacs correctly. The
1546first thing to do is to make sure that you have the latest version of
1547@tramp{} installed.
1548
1549If you do, please try and find out exactly the conditions required for
1550the @code{EFS} handlers to fire. If you can, putting a breakpoint on
1551@code{efs-ftp-path} and sending in the stack trace along with your bug
1552report would make it easier for the developers to work out what is going
1553wrong.
1554
1555
92eeeafc
KG
1556@item
1557File name completion does not work with @tramp{}
fb7933a3
KG
1558
1559When you log in to the remote machine, do you see the output of
1560@command{ls} in color? If so, this may be the cause of your problems.
1561
1562@command{ls} outputs @acronym{ANSI} escape sequences that your terminal
1563emulator interprets to set the colors. These escape sequences will
1564confuse @tramp{} however.
1565
1566In your @file{.bashrc}, @file{.profile} or equivalent on the remote
1567machine you probably have an alias configured that adds the option
1568@option{--color=yes} or @option{--color=auto}.
1569
1570You should remove that alias and ensure that a new login @emph{does not}
1571display the output of @command{ls} in color. If you still cannot use
1572filename completion, report a bug to the @tramp{} developers.
1573
1574
92eeeafc
KG
1575@item
1576File name completion does not work in large directories
fb7933a3
KG
1577
1578@tramp{} uses globbing for some operations. (Globbing means to use the
1579shell to expand wildcards such as `*.c'.) This might create long
1580command lines, especially in directories with many files. Some shell
1581choke on long command lines, or don't cope well with the globbing
1582itself.
1583
1584If you have a large directory on the remote end, you may wish to execute
92eeeafc 1585a command like @samp{ls -d * ..?* > /dev/null} and see if it hangs.
fb7933a3
KG
1586Note that you must first start the right shell, which might be
1587@command{/bin/sh}, @command{ksh} or @command{bash}, depending on which
1588of those supports tilde expansion.
1589
1590
92eeeafc
KG
1591@item
1592What kinds of systems does @tramp{} work on
fb7933a3
KG
1593
1594@tramp{} really expects the remote system to be a Unix-like system. The
1595local system should preferably be Unix-like, as well, but @tramp{} might
1596work on NT with some tweaking.
1597
1598
92eeeafc
KG
1599@item
1600How can I get notified when @tramp{} file transfers are complete?
fb7933a3
KG
1601
1602The following snippet can be put in your @file{~/.emacs} file. It makes
1603Emacs beep after reading from or writing to the remote host.
1604
1605@lisp
1606(defadvice tramp-handle-write-region
1607 (after tramp-write-beep-advice activate)
1608 " make tramp beep after writing a file."
1609 (interactive)
1610 (beep))
1611(defadvice tramp-handle-do-copy-or-rename-file
1612 (after tramp-copy-beep-advice activate)
1613 " make tramp beep after copying a file."
1614 (interactive)
1615 (beep))
1616(defadvice tramp-handle-insert-file-contents
1617 (after tramp-copy-beep-advice activate)
1618 " make tramp beep after copying a file."
1619 (interactive)
1620 (beep))
1621@end lisp
1622
1623
92eeeafc
KG
1624@item
1625There's this @file{~/.sh_history} file on the remote host which keeps
1626growing and growing. What's that?
fb7933a3
KG
1627
1628Sometimes, @tramp{} starts @code{ksh} on the remote host for tilde
1629expansion. Maybe @code{ksh} saves the history by default. @tramp{}
1630tries to turn off saving the history, but maybe you have to help. For
1631example, you could put this in your @file{.kshrc}:
1632
1633@example
1634if [ -f $HOME/.sh_history ] ; then
1635 /bin/rm $HOME/.sh_history
1636fi
1637if [ "$@{HISTFILE-unset@}" != "unset" ] ; then
1638 unset HISTFILE
1639fi
1640if [ "$@{HISTSIZE-unset@}" != "unset" ] ; then
1641 unset HISTSIZE
1642fi
1643@end example
1644
1645@end itemize
1646
1647
1648@c For the developer
1649@node Version Control
1650@chapter The inner workings of remote version control
1651
92eeeafc 1652Unlike EFS and Ange-FTP, @tramp{} has full shell access to the remote
fb7933a3
KG
1653machine. This makes it possible to provide version control for files
1654accessed under @tramp{}.
1655
1656The actual version control binaries must be installed on the remote
1657machine, accessible in the directories specified in
1658@var{tramp-remote-path}.
1659
1660This transparent integration with the version control systems is one of
1661the most valuable features provided by @tramp{}, but it is far from perfect.
1662Work is ongoing to improve the transparency of the system.
1663
1664@menu
1665* Version Controlled Files:: Determining if a file is under version control.
1666* Remote Commands:: Executing the version control commands on the remote machine.
1667* Changed workfiles:: Detecting if the working file has changed.
1668* Checking out files:: Bringing the workfile out of the repository.
1669* Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere
1670@end menu
1671
1672
1673@node Version Controlled Files
1674@section Determining if a file is under version control
1675
1676The VC package uses the existence of on-disk revision control master
1677files to determine if a given file is under revision control. These file
1678tests happen on the remote machine through the standard @tramp{} mechanisms.
1679
1680
1681@node Remote Commands
1682@section Executing the version control commands on the remote machine
1683
1684There are no hooks provided by VC to allow intercepting of the version
1685control command execution. The calls occur through the
1686@code{call-process} mechanism, a function that is somewhat more
1687efficient than the @code{shell-command} function but that does not
1688provide hooks for remote execution of commands.
1689
1690To work around this, the functions @code{vc-do-command} and
1691@code{vc-simple-command} have been advised to intercept requests for
1692operations on files accessed via @tramp{}.
1693
1694In the case of a remote file, the @code{shell-command} interface is
1695used, with some wrapper code, to provide the same functionality on the
1696remote machine as would be seen on the local machine.
1697
1698
1699@node Changed workfiles
1700@section Detecting if the working file has changed
1701
1702As there is currently no way to get access to the mtime of a file on a
1703remote machine in a portable way, the @code{vc-workfile-unchanged-p}
1704function is advised to call an @tramp{} specific function for remote files.
1705
1706The @code{tramp-vc-workfile-unchanged-p} function uses the functioning VC
1707diff functionality to determine if any changes have occurred between the
1708workfile and the version control master.
1709
1710This requires that a shell command be executed remotely, a process that
1711is notably heavier-weight than the mtime comparison used for local
1712files. Unfortunately, unless a portable solution to the issue is found,
1713this will remain the cost of remote version control.
1714
1715
1716@node Checking out files
1717@section Bringing the workfile out of the repository
1718
1719VC will, by default, check for remote files and refuse to act on them
1720when checking out files from the repository. To work around this
1721problem, the function @code{vc-checkout} knows about @tramp{} files and
1722allows version control to occur.
1723
1724
1725@node Miscellaneous Version Control
1726@section Things related to Version Control that don't fit elsewhere
1727
1728Minor implementation details, &c.
1729
1730@menu
1731* Remote File Ownership:: How VC determines who owns a workfile.
1732* Back-end Versions:: How VC determines what release your RCS is.
1733@end menu
1734
1735
1736@node Remote File Ownership
1737@subsection How VC determines who owns a workfile
1738
1739Emacs provides the @code{user-full-name} function to return the login name
1740of the current user as well as mapping from arbitrary user id values
1741back to login names. The VC code uses this functionality to map from the
1742uid of the owner of a workfile to the login name in some circumstances.
1743
1744This will not, for obvious reasons, work if the remote system has a
1745different set of logins. As such, it is necessary to delegate to the
1746remote machine the job of determining the login name associated with a
1747uid.
1748
1749Unfortunately, with the profusion of distributed management systems such
1750as @code{NIS}, @code{NIS+} and @code{NetInfo}, there is no simple,
1751reliable and portable method for performing this mapping.
1752
1753Thankfully, the only place in the VC code that depends on the mapping of
1754a uid to a login name is the @code{vc-file-owner} function. This returns
1755the login of the owner of the file as a string.
1756
1757This function has been advised to use the output of @command{ls} on the
1758remote machine to determine the login name, delegating the problem of
1759mapping the uid to the login to the remote system which should know more
1760about it than I do.
1761
1762
1763@node Back-end Versions
1764@subsection How VC determines what release your RCS is
1765
1766VC needs to know what release your revision control binaries you are
1767running as not all features VC supports are available with older
1768versions of @command{rcs(1)}, @command{cvs(1)} or @command{sccs(1)}.
1769
1770The default implementation of VC determines this value the first time it
1771is needed and then stores the value globally to avoid the overhead of
1772executing a process and parsing its output each time the information is
1773needed.
1774
1775Unfortunately, life is not quite so easy when remote version control
1776comes into the picture. Each remote machine may have a different version
1777of the version control tools and, while this is painful, we need to
1778ensure that unavailable features are not used remotely.
1779
1780To resolve this issue, @tramp{} currently takes the sledgehammer
1781approach of making the release values of the revision control tools
1782local to each @tramp{} buffer, forcing VC to determine these values
1783again each time a new file is visited.
1784
1785This has, quite obviously, some performance implications. Thankfully,
1786most of the common operations performed by VC do not actually require
1787that the remote version be known. This makes the problem far less
1788apparent.
1789
1790Eventually these values will be captured by @tramp{} on a system by
1791system basis and the results cached to improve performance.
1792
1793
1794@node Files directories and paths
1795@chapter How file names, directories and paths are mangled and managed.
1796
1797@menu
1798* Path deconstruction:: Breaking a path into its components.
1799@end menu
1800
1801
1802@node Path deconstruction
1803@section Breaking a path into its components.
1804
1805@tramp{} filenames are somewhat different, obviously, to ordinary path
1806names. As such, the lisp functions @code{file-name-directory} and
1807@code{file-name-nondirectory} are overridden within the @tramp{} package.
1808
1809Their replacements are reasonably simplistic in their approach. They
1810dissect the filename, call the original handler on the remote path and
1811then rebuild the @tramp{} path with the result.
1812
1813This allows the platform specific hacks in the original handlers to take
1814effect while preserving the @tramp{} path information.
1815
1816
1817@node Issues
1818@chapter Debatable Issues and What Was Decided
1819
1820@itemize @bullet
1821@item The uuencode method does not always work.
1822
1823Due to the design of @tramp{}, the encoding and decoding programs need to
1824read from stdin and write to stdout. On some systems, @code{uudecode -o
1825-} will read stdin and write the decoded file to stdout, on other
1826systems @code{uudecode -p} does the same thing. But some systems have
1827uudecode implementations which cannot do this at all---it is not
1828possible to call these uudecode implementations with suitable parameters
1829so that they write to stdout.
1830
1831Of course, this could be circumvented: the @code{begin foo 644} line
1832could be rewritten to put in some temporary file name, then
1833@code{uudecode} could be called, then the temp file could be printed and
1834deleted.
1835
1836But I have decided that this is too fragile to reliably work, so on some
1837systems you'll have to do without the uuencode methods.
1838
1839@item @tramp{} does not work on XEmacs 20.
1840
1841This is because it requires the macro @code{with-timeout} which does not
1842appear to exist in XEmacs 20. I'm somewhat reluctant to add an
1843emulation macro to @tramp{}, but if somebody who uses XEmacs 20 steps
1844forward and wishes to implement and test it, please contact me or the
1845mailing list.
1846
f37fc5a7
KG
1847@item The @tramp{} filename syntax differs between Emacs and XEmacs.
1848
1849The Emacs maintainers wish to use a unified filename syntax for
1850Ange-FTP and @tramp{} so that users don't have to learn a new
1851syntax. It is sufficient to learn some extensions to the old syntax.
1852
1853For the XEmacs maintainers, the problems caused from using a unified
1854filename syntax are greater than the gains. The XEmacs package
1855system uses EFS for downloading new packages. So, obviously, EFS has
1856to be installed from the start. If the filenames were unified, Tramp
1857would have to be installed from the start, too.
1858
fb7933a3
KG
1859@end itemize
1860
1861
1862@c End of tramp.texi - the TRAMP User Manual
1863@bye
1864
1865@c TODO
1866@c
1867@c * Say something about the .login and .profile files of the remote
1868@c shells.
1869@c * Explain how tramp.el works in principle: open a shell on a remote
1870@c host and then send commands to it.
83fa16cf
KG
1871@c * Mention that bookmarks are a cool feature to go along with Tramp.
1872@c * Make terminology "inline" vs "out-of-band" consistent.
1873@c It seems that "external" is also used instead of "out-of-band".
fb7933a3 1874