Usually the cause is “a program has output weird ANSI sequences”. This can happen if you cat or more/less a binary file, for example. Fixed by running “reset” in the affected terminal.
Is there any customisation in the bashrc or profile files that could be generating output?
The rest may not be helpful...
I have faint memories of problems of shells-within-shells in xterm, causing strange output like this (in vanilla linux). Maybe it a problem with an rc or profile scripts creating terminal-specific output.
Maybe it needs checking details of what is being exec’ed in the .desktop file, which could be running at least one extra shell. Is it plain qvm-run or does it have the “–no-shell” arg?
Although that should not send/affect output to the shell inside the xterm window, unless via the environment… and the various xterm args that decide how the shell gets run… and depending on the specific linux variant.
I fear the complexity is why the memories have been suppressed.
Maybe it doesn’t show up over email? Both times you’ve printed your PS1=..., on Discourse it appears to include a repeated text garble, looks like a hash code or something like that.
Might be some extreme email sanitisation. I do slightly less incomprehensible things if I send email from php containing user input, but with lots of simple replacement.
Now we got (hopefully) past that, I failed to reproduce any weirdness in a debian-12-minimal appVM with just the prompt. The Xresources looks innocuous - surely it couldnt insert output…?
Another question: do your ooots-toots show any of your exotic prompt colouring?
I think I did not expect that. I hoped maybe the spurious first characters would be plain.
Does it mean bash is emitting them as a real part of the prompt ?
Until now, I was thinking maybe a $TERM mismatch somewhere between the xterm and the bash running in the tty. I think I noticed that debian and fedora have different terminal types in a user xterm, but that should(?) only be relevant for “open console” where the xterm is in a different qube…