After upgrading to Fedora 43, the Bash prompt contains returns and a bunch of variables, end=;exit=;start=;user=;hostname= etc. The PS1 variable is set correctly and if I change it to something like # the weird prompts remains. I tried removing bash-color-prompt with no improvement.
You are correct. Several reports, including this one:
The question is what to do about this in the long run? Many of the bugs raised are blaming it on the terminal used. I am sshing in from RHEL8. I do not expect them to update the terminal there. In my opinion it should not be assumed that a remote terminal can handle the sequences added by /etc/profile.d/80-systemd-osc-context.sh, and they should not be added for remote terminals. They do not care about the added information.
The best option I could find is to add this to /etc/profile.d/80-systemd-osc-context.sh
# Check if the terminal is known to be incompatible with systemd OSC context sequences
if \[ “$TERM” = “linux” \] || \[ “$TERM” = “vt102” \] || \[ “$TERM” = “xterm-256color” \]; then
return 0
fi
It probably will be removed on systemd updates.
With this, entering and leaving a root shell still emits some gibberish, but otherwise acts normally.