After Fedora 43 Upgrade, Bash Prompts Contains start=, end=, user=, exit=

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.

It does not happen on a terminal on the local machine. It only happens when I ssh or ssh -X in remotely.

So it could be that it happens in login shells, but not in non-login shells.

Do you have anything unexpected in ~/.bash_profile or /etc/profile ?

I don’t see anything unusual, but /etc/profile has a lot of stuff. The profile string stuff in /etc/bashrc looks ok too.

It’s /etc/profile.d/80-systemd-osc-context.sh causing it.

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.