(2020-02-04)
Problem
Terminal window titles and screen session titles are different things. At some point, Redhat/Fedora changed what the PROMPT_COMMAND emitted by default.
Solution
In a login shell startup dotfile (for example, I put mine in a
file I put in /etc/profile.d):
# Screen session and terminal window titles
# This "should" be reasonably portable/harmless-to-systems-that-don't-understand
# If we are interactive
if [ "$PS1" ]; then
# Print out a string for screen to print as a session title,
# then print out a string for putty/kitty/xterm to use as a window title.
if [ "$PS1" ]; then
# If we are in a screen session, print out an escape sequence for the screen session title.
# Either way, print out an escape sequence for putty/kitty/xterm to use as a window title.
PROMPT_COMMAND='if [ "$TERM" == "screen" ] ;then \
printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"; \
fi; \
printf "\033]0;%s@%s:%s007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
fi
For screen, this sets a value that screen displays in the hardstatus line as "%t".
Commentary
Goddamn it, RedHat.