Hello, so I understand the issue better, and read through the quite reasonable doc. This is mostly an FYI reply to share what I learned, although any tips would be appreciated of course.
The issue is that the shell has changed, though I am not sure why. Thus my .bashrc file does not run, and thus the prompt is not set.
When I ssh to a machine, it runs the shell found in /etc/passwd. When I run a remote shell from Tramp, though it makes use of ssh (it seems), it runs /bin/sh. I am not sure if a linux update on the server changed /bin/sh from bash to dash, but I would not be surprised. Discussion on that has been going on for years. It seems more likely that something has changed in the way ssh is being invoked.
So, I gather that Tramp wants to pick the shell, and it will not come from /etc/passwd. Is there a way to configure that? There was some mention of a /etc/passwd reader function in the docs. This would be the best solution. A solution that would work for me is to always use /usr/bin/bash.
I found various things in the doc for coercing Tramp to pick a different shell:
The commented out lines did nothing. Perhaps if I play around with it more. Actually given that is a regular _expression_, perhaps I should just match '.*', as I always use bash anyway. The other lines convinced Tramp to call /usr/bin/bash on the one account, but the sudo root stuff is still runing /bin/sh. I will play around with that more also. Again, the shell specified in /etc/passwd would be best, but /usr/bin/bash would work for me.
; "remote-shell" "/usr/bin/bash"))
;(customize-set-variable 'tramp-encoding-shell "/usr/bin/bash")
'((explicit-shell-file-name . "/bin/bash")
(explicit-bash-args . ("-i"))))
'(:application tramp :protocol "ssh" :machine "localhost")
Hmm, I wonder if my .bashrc to .shrc would also get my prompt set...
Now that I understand what is happening, I have found a reasonable work around. I just run bash at the first prompt, the .bashrc runs and the prompt is set, then life is good.
Thanks again. Tramp is a wonderful tool. If the dired stuff works remotely. It is a blessing for emacs users.