From: Kai Großjohann Date: Sun, 20 Jul 2003 19:00:56 +0000 (+0000) Subject: Tramp 2.0.36 released. X-Git-Tag: ttn-vms-21-2-B4~9300 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6013ce4724488c9ec585a4464ced7d1081c5b735;p=emacs.git Tramp 2.0.36 released. (Remote shell setup): Explain about problems with non-Bourne commands in ~/.profile and ~/.shrc. --- diff --git a/man/ChangeLog b/man/ChangeLog index 985d82e41ce..4d2f9ca704d 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,9 @@ +2003-07-20 Kai Gro,A_(Bjohann + Tramp version 2.0.36 released. + + * tramp.texi (Remote shell setup): Explain about problems with + non-Bourne commands in ~/.profile and ~/.shrc. + 2003-07-13 Markus Rost * buffers.texi (List Buffers): Adjust to new format of *Buffer diff --git a/man/tramp.texi b/man/tramp.texi index 49e10c9e581..07cffe26137 100644 --- a/man/tramp.texi +++ b/man/tramp.texi @@ -1310,6 +1310,51 @@ The other approach is to teach @tramp{} about these questions. See the variables @code{tramp-actions-before-shell} and @code{tramp-multi-actions} (for multi-hop connections). +@item Non-Bourne commands in @file{.profile} + +After logging in to the remote host, @tramp{} issues the command +@code{exec /bin/sh}. (Actually, the command is slightly different.) +When @code{/bin/sh} is executed, it reads some init files, such as +@file{~/.shrc} or @file{~/.profile}. + +Now, some people have a login shell which is not @code{/bin/sh} but a +Bourne-ish shell such as bash or ksh. Some of these people might put +their shell setup into the files @code{~/.shrc} or @code{~/.profile}. +This way, it is possible for non-Bourne constructs to end up in those +files. Then, @code{exec /bin/sh} might cause the Bourne shell to barf +on those constructs. + +As an example, imagine somebody putting @code{export FOO=bar} into the +file @file{~/.profile}. The standard Bourne shell does not understand +this syntax and will emit a syntax error when it reaches this line. + +Another example is the tilde (@code{~}) character, say when adding +@file{~/bin} to @code{$PATH}. Many Bourne shells will not expand this +character, and since there is usually no directory whose name consists +of the single character tilde, strange things will happen. + +What can you do about this? + +Well, one possibility is to make sure that everything in @file{~/.shrc} +and @file{~/.profile} on all remote hosts is Bourne-compatible. In the +above example, instead of @code{export FOO=bar}, you might use +@code{FOO=bar; export FOO} instead. + +The other possibility is to put your non-Bourne shell setup into some +other files. For example, bash reads the file @file{~/.bash_profile} +instead of @file{~/.profile}, if the former exists. So bash +aficionados just rename their @file{~/.profile} to +@file{~/.bash_profile} on all remote hosts, and Bob's your uncle. + +The @tramp{} developers would like to circumvent this problem, so if you +have an idea about it, please tell us. However, we are afraid it is not +that simple: before saying @code{exec /bin/sh}, @tramp{} does not know +which kind of shell it might be talking to. It could be a Bourne-ish +shell like ksh or bash, or it could be a csh derivative like tcsh, or +it could be zsh, or even rc. If the shell is Bourne-ish already, then +it might be prudent to omit the @code{exec /bin/sh} step. But how to +find out if the shell is Bourne-ish? + @end table diff --git a/man/trampver.texi b/man/trampver.texi index 8db1e07f1a0..f728531b9e9 100644 --- a/man/trampver.texi +++ b/man/trampver.texi @@ -5,7 +5,7 @@ @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. @macro trampver{} -2.0.35 +2.0.36 @end macro @c Other flags from configuration