Bug 513920 - konsole creates unmapped windows
Summary: konsole creates unmapped windows
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: single-process (other bugs)
Version First Reported In: 25.12.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-28 17:34 UTC by Carlo Wood
Modified: 2025-12-28 17:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlo Wood 2025-12-28 17:34:24 UTC
SUMMARY

At some point I noticed that `qdbus org.kde.konsole` showed more /Windows/* than that I had open.
After some investigation it turned out that those windows where unmapped top-level windows, known to X11 but not visible to or managed by the window manager.

STEPS TO REPRODUCE
1. Configure konsole to be in single process mode.
2. Run the following a script (perhaps a few times might be needed):

```
#!/usr/bin/env bash
set -euo pipefail

# How many konsole instances to start simultaneously.
INSTANCES=5

# Base temp file prefix.
TMPBASE=$(mktemp -d /tmp/konsole-tabs.XXXXXX)

cleanup()
{
  rm -rf "$TMPBASE"
}
trap cleanup EXIT

# Create tab definition files.
for ((i = 0; i < INSTANCES; ++i)); do
  cat >"$TMPBASE/tabs-$i" <<EOF
workdir: /bin ;; profile: Profile 1
workdir: /usr ;; profile: Profile 2
EOF
done

for ((i = 0; i < INSTANCES; ++i)); do
  setsid konsole --tabs-from-file "$TMPBASE/tabs-$i" -e true </dev/null >/dev/null 2>&1 &
done
```

Make sure the profiles actually exist (I used two different profiles).

OBSERVED RESULT

All five windows show with:
```
qdbus  org.kde.konsole | grep -E '^/Windows/[0-9]+$'
```
but not all five are managed/mapped:
```
wmctrl -lx | grep 'konsole\.konsole'
```
shows less than five (if not then try again, it might be a race condition that requires a few attempts).

EXPECTED RESULT

All started windows are mapped and visible with `wmctrl -l`.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: none (I use fluxbox as WM)
KDE Frameworks Version: 6.21.0
Qt Version: 6.10.1

ADDITIONAL INFORMATION

Using `setsid konsole --tabs-from-file "$TMPBASE/tabs-$i" -e true </dev/null >/dev/null 2>&1 &` is to run konsole as "unmanaged", aka without a controlling tty, in order to have all windows be managed by a single process.
Comment 1 Carlo Wood 2025-12-28 17:35:27 UTC
I guess this is duplicate of https://bugs.kde.org/show_bug.cgi?id=502075
which is already 8 or 9 months old though.