tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'exec /bin/bash --login' in ~/.profile


From: Marc Girod
Subject: Re: 'exec /bin/bash --login' in ~/.profile
Date: Wed, 9 Feb 2011 10:48:27 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Michael Albinus <michael.albinus <at> gmx.de> writes:

> How did you check that .bash_profile is not read? Printed traces?
> Missing environment?

Missing environment. The prompt: PS1, reset to '#$ '...
I can see now that this was a wrong assumption of mine:
my prompt was found, but reset.
>From the debug tramp buffer:

10:32:30.752009 tramp-maybe-open-connection (3) # Found remote shell prompt on
`eieatx016'
10:32:30.753009 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND=''
PS1=\#\$\  PS2='' PS3='' /bin/sh

I checked now that e.g. my aliases were set, so my startup files *were* run.

Now, I got one surprising effect doing the same with a different user (for which
I did *not* set exec bash in its .profile): there it worked!
I.e *my* account setting affected the shell run for the other account, and
there, the prompt was kept!
So that I understand it must in fact have been restored after being first set.

In the debug buffer, the last line says indeed:

10:42:11.373009 tramp-send-command (6) # cd /home/eeivob05/; exec /usr/bin/bash
--noediting -i

Excellent idea... got from SHELL being set in .bash_profile?

> This sounds like a $PATH problem.

Only, without any change in any startup file, and although it worked previously.
Now, I cannot reproduce this anymore at this time.

> You could set tramp-verbose to 6, and
> check the Tramp debug buffer.

I did now. Thanks.

> I do not know what you mean with "clean up this condition", but when you
> test a Tramp connection, it is always a good idea to reset it via "M-x
> tramp-cleanup-connection".

I had done this with no result (this time).

> Don't know whether it should work. Never tested.

At least, it seems to work.

Thanks,
Marc




reply via email to

[Prev in Thread] Current Thread [Next in Thread]