Public bug reported: On Ubuntu, Ptyxis 50.1 displays the visible window title off-center when running Pi, a Node.js command-line application. The title is shifted left, while the working-directory subtitle remains centered.
Steps to reproduce: 1. Open Ptyxis with a normal shell. 2. Run pi. 3. Observe that the visible window title is shifted left. Expected: The visible title should be centered without invisible trailing padding. Investigation: Pi sets process.title = "pi". Inspecting the affected process's /proc/<pid>/cmdline showed "pi" followed by many NUL bytes. In Ptyxis 50.1, get_cmdline_for_pid() in agent/ptyxis-process-impl.c replaces every NUL/control byte with a space, but does not trim trailing spaces. ptyxis_tab_dup_title() in src/ptyxis-tab.c appends that command line to the window title. This produces a title containing many invisible trailing spaces, shifting the visible text left when centered. Source: https://gitlab.gnome.org/chergert/ptyxis/-/blob/50.1/agent/ptyxis-process-impl.c https://gitlab.gnome.org/chergert/ptyxis/-/blob/50.1/src/ptyxis-tab.c Control tests: Setting the title using printf followed by sleep 15 displays a centered title. Disabling Pi's OSC 7501 program-status reporting does not fix the problem. Suggested fix: Trim trailing whitespace from the sanitized foreground command line, for example using g_strchomp(), before appending it to the title. A proposed minimal reproducer (not yet verified interactively) is: node -e 'process.title = "pi"; process.stdout.write("\x1b]0;Test title\x07"); setInterval(() => {}, 1000)' Run it inside an existing shell and stop it with Ctrl+C. This report was prepared with AI assistance. The alignment problem and control tests were observed by the reporter; source analysis and inspection of the affected process were assisted by AI. ProblemType: Bug DistroRelease: Ubuntu 26.04 Package: ptyxis 50.1-1ubuntu2 ProcVersionSignature: Ubuntu 7.0.0-42.42-generic 7.0.14 Uname: Linux 7.0.0-42-generic x86_64 ApportVersion: 2.34.1-0ubuntu0.1 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: ubuntu:GNOME Date: Fri Oct 30 22:05:25 2026 InstallationDate: Installed on 2026-10-30 (1 days ago) InstallationMedia: Ubuntu 26.04.1 LTS "Resolute Raccoon" - Release amd64 (20260826) SourcePackage: ptyxis UpgradeStatus: No upgrade log present (probably fresh install) ** Affects: ptyxis (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug resolute wayland-session -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2172597 Title: Ptyxis 50.1: trailing spaces in foreground process title cause window title to appear off-center To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ptyxis/+bug/2172597/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
