@command{ssh} can also take extra parameters as port numbers. For
example, a host on port 42 is specified as @file{host#42} (the real
host name, a hash sign, then a port number). It is the same as passing
-@code{-p 42} to the @command{ssh} command.
+@samp{-p 42} to the @command{ssh} command.
@item @option{telnet}
@cindex method telnet
substitutions.
When @value{tramp} is not specific about the share name or uses the
-generic remote directory @code{/}, @command{smbclient} returns all
+generic remote directory @file{/}, @command{smbclient} returns all
available shares.
Since SMB authentication is based on each SMB share, @value{tramp}
based on standard protocols, such as HTTP@. @option{davs} does the same
but with SSL encryption. Both methods support the port numbers.
+@item @option{gdrive}
+@cindex method gdrive
+@cindex gdrive method
+@cindex Google Drive
+
+Via the @option{gdrive} method it is possible to access your Google
+Drive online storage. User and host name of the remote file name are
+your email address of the Google Drive credentials, like
+@file{@trampfn{gdrive,john.doe@@gmail.com,/}}. These credentials must
+be populated in your @command{Online Accounts} application outside Emacs.
+
+Since Google Drive uses cryptic blob file names internally,
+@value{tramp} works with the @code{display-name} of the files. This
+could produce unexpected behaviour in case two files in the same
+directory have the same @code{display-name}, such a situation must be avoided.
+
@item @option{obex}
@cindex method obex
@cindex obex method
@vindex tramp-gvfs-methods
This custom option is a list of external methods for GVFS@. By
default, this list includes @option{afp}, @option{dav}, @option{davs},
-@option{obex}, @option{sftp} and @option{synce}. Other methods to
-include are: @option{ftp} and @option{smb}.
+@option{gdrive}, @option{obex}, @option{sftp} and @option{synce}.
+Other methods to include are: @option{ftp} and @option{smb}.
@end defopt
Set @code{password-cache} to @code{nil} to disable password caching.
-@strong{Implementation Note}: password caching depends on
-@file{password-cache.el} package. @value{tramp} activates password
-caching only if @value{tramp} can discover, while Emacs is loading,
-the package through @code{load-path}.
-
-@ifset installchapter
-@file{password.el} is available from No Gnus or from the @value{tramp}
-@file{contrib} directory, see @ref{Installation parameters}.
-@end ifset
-
@node Connection caching
@section Reusing connection related information
Another way to find the remote path is to use the path assigned to the
remote user by the remote host. @value{tramp} does not normally retain
-this remote path after logging. However, @code{tramp-own-remote-path}
+this remote path after login. However, @code{tramp-own-remote-path}
preserves the path value, which can be used to update
@code{tramp-remote-path}.
@lisp
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
@end lisp
+
+@strong{Note} that this works only if your remote @command{/bin/sh}
+shell supports the login argument @samp{-l}.
@end defopt
When remote search paths are changed, local @value{tramp} caches must
@end example
The above command-line syntax has changed with @command{busybox}
-versions. If @command{nc} refuses the @command{-p} parameter, then
+versions. If @command{nc} refuses the @samp{-p} parameter, then
overwrite as follows:
@lisp
on the Android device can accept any @option{ssh}-based methods
provided these settings are adjusted:
-@code{sh} must be specified for remote shell since Android devices do
-not provide @code{/bin/sh}. @code{sh} will then invoke whatever shell is
-installed on the device with this setting:
+@command{sh} must be specified for remote shell since Android devices
+do not provide @command{/bin/sh}. @command{sh} will then invoke
+whatever shell is installed on the device with this setting:
@lisp
(add-to-list 'tramp-connection-properties
@multitable @columnfractions .5 .5
@c @multitable {@trampfn{telnet,melancholia.danann.net,}} {@trampfn{telnet,192.168.0.1,}}
@item @trampfn{telnet,127.0.0.1,} @tab @trampfn{telnet,192.168.0.1,}
-@item @trampfn{telnet,@value{ipv6prefix}::1@value{ipv6postfix},} @tab @trampfn{telnet,localhost,}
+@c @item @trampfn{telnet,@value{ipv6prefix}::1@value{ipv6postfix},} @tab @trampfn{telnet,localhost,}
+@item @value{prefix}telnet@value{postfixhop}@value{ipv6prefix}::1@value{ipv6postfix}@value{postfix} @tab @trampfn{telnet,localhost,}
@item @trampfn{telnet,melancholia.danann.net,} @tab @trampfn{telnet,melancholia,}
@end multitable
@end example
of @command{ls} is in color.
To disable @acronym{ANSI} escape sequences from the remote hosts,
-disable @option{--color=yes} or @option{--color=auto} in the remote
-host's @file{.bashrc} or @file{.profile}. Turn this alias on and off
-to see if file name completion works.
+disable @samp{--color=yes} or @samp{--color=auto} in the remote host's
+@file{.bashrc} or @file{.profile}. Turn this alias on and off to see
+if file name completion works.
@item
File name completion does not work in directories with large number of
globbing.
To test if globbing hangs, open a shell on the remote host and then
-run @samp{ls -d * ..?* > /dev/null}.
+run @command{ls -d * ..?* > /dev/null}.
When testing, ensure the remote shell is the same shell
(@command{/bin/sh}, @command{ksh} or @command{bash}), that
@item
-How to get a Visual Warning when working with @samp{root} privileges
-
-Get a modeline indication when working with @samp{root} privileges
-with the following code (tested with Emacs 22.1) in @file{~/.emacs}
-file:
-
-@lisp
-(defun my-mode-line-function ()
- (when (string-match "^/su\\(do\\)?:" default-directory)
- (setq mode-line-format
- (format-mode-line mode-line-format 'font-lock-warning-face))))
-
-(add-hook 'find-file-hook 'my-mode-line-function)
-(add-hook 'dired-mode-hook 'my-mode-line-function)
-@end lisp
-
-
-@item
-How to get host indication in the mode line?
-
-The following code (tested with Emacs 22.1) in @file{~/.emacs} file
-shows it:
+How to get a Visual Warning when working with @samp{root} privileges?
+Host indication in the mode line?
-@lisp
-(defconst my-mode-line-buffer-identification
- (list
- '(:eval
- (let ((host-name
- (if (file-remote-p default-directory)
- (tramp-file-name-host
- (tramp-dissect-file-name default-directory))
- (system-name))))
- (if (string-match "^[^0-9][^.]*\\(\\..*\\)" host-name)
- (substring host-name 0 (match-beginning 1))
- host-name)))
- ": %12b"))
-
-(setq-default
- mode-line-buffer-identification
- my-mode-line-buffer-identification)
-
-(add-hook
- 'dired-mode-hook
- (lambda ()
- (setq
- mode-line-buffer-identification
- my-mode-line-buffer-identification)))
-@end lisp
-
-The mode line in Emacs 23.1 and later versions now contains an
-indication if @code{default-directory} for the current buffer is on a
-remote host. Moreover, the corresponding tool-tip shows the remote
-host name. The above @code{:eval} clause can also be simplified to
-show the host name in the mode line:
-
-@lisp
- '(:eval
- (let ((host-name
- (or (file-remote-p default-directory 'host)
- (system-name))))
- (if (string-match "^[^0-9][^.]*\\(\\..*\\)" host-name)
- (substring host-name 0 (match-beginning 1))
- host-name)))
-@end lisp
+Install @file{tramp-theme} from GNU ELPA via Emacs' Package Manager.
+Enable it via @kbd{M-x load-theme @key{RET} tramp}. Further
+customization is explained in variable
+@code{tramp-theme-face-remapping-alist}.
@item
directory to the cache:
@lisp
+@c `with-eval-after-load' has been introduced with Emacs 24.4. Shall
+@c be used when appropriate.
(eval-after-load "filecache"
'(file-cache-add-directory
"@trampfn{ssh,news@@news.my.domain,/opt/news/etc/}"))