changeset 51967:2693b0669cc1

Tramp 2.0.36 released. (Remote shell setup): Explain about problems with non-Bourne commands in ~/.profile and ~/.shrc.
author Kai Großjohann <kgrossjo@eu.uu.net>
date Sun, 20 Jul 2003 19:00:56 +0000
parents f78c11f1d976
children e4c4c45ea013
files man/ChangeLog man/tramp.texi man/trampver.texi
diffstat 3 files changed, 52 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/man/ChangeLog	Sat Jul 19 20:44:23 2003 +0000
+++ b/man/ChangeLog	Sun Jul 20 19:00:56 2003 +0000
@@ -1,3 +1,9 @@
+2003-07-20  Kai Gro,A_(Bjohann  <kai.grossjohann@gmx.net>
+	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  <rost@math.ohio-state.edu>
 
 	* buffers.texi (List Buffers): Adjust to new format of *Buffer
--- a/man/tramp.texi	Sat Jul 19 20:44:23 2003 +0000
+++ b/man/tramp.texi	Sun Jul 20 19:00:56 2003 +0000
@@ -1310,6 +1310,51 @@
 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
 
 
--- a/man/trampver.texi	Sat Jul 19 20:44:23 2003 +0000
+++ b/man/trampver.texi	Sun Jul 20 19:00:56 2003 +0000
@@ -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