| Summary: | Using ANSI codes to set the title has a delay of one title | ||
|---|---|---|---|
| Product: | [Applications] konsole | Reporter: | sergio.costas <sergio.costas> |
| Component: | emulation | Assignee: | Konsole Bugs <konsole-bugs-null> |
| Status: | REPORTED --- | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Running this script also shows the bug:
#!/bin/sh
echo -n "\033]2;New terminal title1\007"
sleep 2
echo -n "\033]2;New terminal title2\007"
sleep 2
echo -n "\033]2;New terminal title3\007"
sleep 2
When launching it, the title changes to "New terminal title1", and after six seconds, it changes to "New terminal title3" when it ends and returns to the command line. The "New terminal title2" title is never shown.
This python3 program also reproduces the problem:
#!/usr/bin/env python3
import time
print("\033]2;Window title 1\007", flush=True, end="")
time.sleep(2)
print("\033]2;Window title 2\007", flush=True, end="")
time.sleep(2)
print("\033]2;Window title 3\007", flush=True, end="")
time.sleep(2)
|
SUMMARY *** When using ANSI codes to set the window title, there is a delay of one title. This is: setting once the title doesn't change it; setting it twice shows the first title, not the second; setting it three times shows the second title, not the third one. *** STEPS TO REPRODUCE 1. Enable showing the terminal title in the window bar (in the settings) 2. Run in Konsole: echo -en "\033]2;New terminal title 1\007" 3. Run in Konsole: echo -en "\033]2;New terminal title 2\007" OBSERVED RESULT After running the first echo command, the window title won't change. After running the second command, the title from the first command ("New terminal title 1") will be shown in the window title. EXPECTED RESULT After running the first echo command, the window title should change to "New terminal title 1". After running the second echo command, the window title should change to "New terminal title 2". SOFTWARE/OS VERSIONS Ubuntu Linux; Konsole 4:22.12.3-0ubuntu1; libqt=5.15.8 ADDITIONAL INFORMATION