Very long bash prompt after upgrade from fedora 42 to 43

Hello,

After I upgrade my two fedora 42 virtual box to 43, the bash prompt changed to very long when I ssh to it, such as,

  • 08;end=863fae26-XXXX-XXXX-b297-330a959da90e;exit=success08;start=f2a4…root@localhost:~#

How to restore it to the style on fedora 42 ?
Thanks in advance.

Perlang

Welcome to Fedora @perlang.

Please have a look what kind of output you get when you type echo $PS1 in your terminal.
Is it the same long string there?

If yes have a look in the file ~/.bashrc if you can remove the string there. (.bashrc is a hidden file in /home/username/.bashrc)
It should be something like

PS1= long string  

If there is such an entry, please put a # in front of the PSI= variable to see if the prompt gets normal.
You have to reopen with ssh to see the result.

1 Like

Are you logging in via ssh as the root user? I that case, you want to look at /root/.bashrc

See:

The latest systemd (in Fedora 43) expects that it is communicating with an ANSI-standard terminal emulator, and gives weird behaviour with non-ANSI terminals.

I put my own PS1 in /root/.bashrc

export PS1="[\h \D{%a %Y%m%d-%H%M}]\n\u:\w [!]# "

that looks like:

[msi Tue 20251104-1432]
root:~ [3996]#

where “msi” is the host shortname. The [!] is what causes the current command number (3996 here) to show inside the brackets

Yes. I found that the environment $TERM, which value couldn’t be changed with command export TERM=‘’, maybe has relation with the result.
It’s always “08;end=xxxxxxxx-xxxx-xxxx-899f-xxxxxxxx0e8e;exit=success08;start=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx;user=root;hostname=localhost;machineid=xxxxxxxxxxxx4cb99f4df0866d86fa07;bootid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx;pid=1111;type=shell;cwd=/root”

P.S.
It’s ok when I login console or ssh with tabby client.
Currently It’s wrong when I use SecureCRT client.

I append export PROMPT_COMMAND=
in file ~/.bashrc
the prompt is restored.

Thank ilikelinux, George, P G, and Mark for your help !

1 Like

But this resolution is not elegance, every time I type command in SecureCRT, it will echo $TERM except the command output.

Notice this(After Fedora 43 Upgrade, Bash Prompts Contains start=, end=, user=, exit=) now. Thank P G again.

I.e., they are ANSI conformant terminals …

… and this is not. Complain to them and have them fix their software.

1 Like

I guess ptyxis would be a good open alternative …

This totally misses the point. Fedora is shipping configuration that’s broken on most of the terminals it provides, including xterm, GNOME Terminal, and MATE Terminal. It also fails for people coming in from other systems.

It’s perfectly fine for the systemd config to expect to be communicating with an OSC 3008 compliant terminal. I have no issue with that.

From a Fedora integration perspective, however, it is definitely not okay to break the user experience this way. There needs to be some sort of OSC 3008 compliance check before allowing the systemd config to go forward. Whether that check is wrapped around vanilla systemd config or injected into it as a patch is up to the integrator, but leaving it out should be a release blocker.

Let me be clear: If systemd wants to declare such breakage NOI (“Not Our Issue”), that’s within their prerogative. It’s totally on the Fedora project to ensure the software they include integrates functionally.

Here’s a stupid simple test for terminals shipped by Fedora. Issue the following command to whack the terminal title:

PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "elsewhere" "${PWD/#$HOME/\~}"'

Now ssh into the same host you’re already on (or another Fedora 43 host with vanilla prompt command config). In most Fedora-provided terminals, the terminal title will not change to reflect the host you’ve logged into. This is at best dangerous; the user is given bogus information about which host she’s logged into and could easily issue commands on the wrong host. The systemd project can hide behind “NOI”, but the Fedora project should not.