You are not logged in.
Pages: 1
I'm connecting to another Arch-Box via ssh. Once I'm connected I'm getting a kind of "double" bash prompt as shown below:
_pol@gemini:~\[pol@gemini ~]$ The first part before the backspace seems to get added by either ssh on my client or sshd on the host, changing $PS1 only changes the part behind the backspace.
this only happens on this specific combination of client and host. If I connect with another client, the prompt is fine, same if I connect to another host. Is there any option I didn't see to make this dissapear since that prompt starts taking up a lot of screen space once you start going deeper into the folder structure.
Let me know if I should provide you with any other information. Thanks in advance
Last edited by spof (2018-01-13 10:20:42)
Offline
What is the $TERM in the problematic host's session? And what is in the host's bashrc (or other initialisation files)?
Offline
Problem solved, /etc/bash.bashrc had the following in it:
#
# /etc/bash.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ $DISPLAY ]] && shopt -s checkwinsize
PS1='[\u@\h \W]\$ '
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
screen*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
esac
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completionremoving the case statement got rid of the double prompt. I didn't think to check the global bashrc since I assumed the one in my homefolder would override the global one.
Offline
Users .bashrc:
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ 'I found it weird as well, but since removing that case statement fixed it, I can only assume that was the cause
Offline
Pages: 1