Public bug reported: ## Package
- Package: `xdg-terminal-exec` 0.14.0-1 - Ubuntu 26.04 LTS - Upstream: https://github.com/Vladimir-csp/xdg-terminal-exec ## Summary Under Turkish locales (`tr_TR.UTF-8`, `tr_CY.UTF-8`), `xdg-terminal-exec` silently fails to discover most terminal emulators, including the Ubuntu default `org.gnome.Ptyxis.desktop`. On a stock GNOME install this makes Ctrl+Alt+T do nothing at all, with no error shown to the user. The utility exits with status 0 and prints only: ``` No valid terminal entry was found in: /var/lib/snapd/desktop/applications/:/usr/share/applications/:... ``` ## Root cause `find_entry_paths()` filters desktop entries with a `find -path` glob that uses the unanchored character range `[a-zA-Z0-9_./-]` (line 785 area, the `find -L "$@"` call in `find_entry_paths`): ```sh ! -path "$xte__directory"'./*[^a-zA-Z0-9_./-]*' ``` Bracket range expressions in glob patterns are resolved using `LC_COLLATE`, not ASCII order. In Turkish collation, dotted `i` and dotless `ı` are collated as distinct primary letters, and as a result the ASCII characters **`i` and `I` fall outside the `a-z` / `A-Z` ranges**. Every desktop entry whose filename contains `i` or `I` is therefore treated as containing an "invalid character" and is dropped before registration — so it can be matched neither as a fallback candidate nor as an explicitly preferred entry from `xdg-terminals.list`. `org.gnome.Ptyxis.desktop` contains an `i`, so the Ubuntu default terminal is never registered, even though `/usr/share/xdg-terminal-exec/ubuntu-xdg-terminals.list` explicitly lists `org.gnome.Ptyxis.desktop:new-window` as the preferred entry. ## Steps to reproduce On a system with `tr_TR.UTF-8` generated: ```sh D=/usr/share/applications/ for L in C.UTF-8 tr_TR.UTF-8; do printf '%s: %s entries\n' "$L" \ "$(LC_ALL=$L find -L "$D." -type f \ '(' -path "$D"'./[a-zA-Z0-9_]*.desktop' \ ! -path "$D"'./*[^a-zA-Z0-9_./-]*' ')' | wc -l)" done ``` Observed on this machine: ``` C.UTF-8: 98 entries tr_TR.UTF-8: 50 entries ``` Isolating the affected characters — only `i` and `I` are rejected, in both `tr_TR.UTF-8` and `tr_CY.UTF-8`: ```sh mkdir -p /tmp/loctest && cd /tmp/loctest for c in {a..z} {A..Z}; do touch "x${c}x.desktop"; done for c in {a..z} {A..Z}; do [ "$(LC_ALL=tr_TR.UTF-8 find -L . -type f \ ! -path './*[^a-zA-Z0-9_./-]*' -name "x${c}x.desktop" | wc -l)" = 0 ] \ && printf '%s ' "$c" done; echo # output: i I ``` End-to-end reproduction: ```sh LANG=tr_TR.UTF-8 XTE_DEBUG=1 xdg-terminal-exec /bin/true 2>&1 | grep -i ptyxis ``` shows `matching path for entry ID 'org.gnome.Ptyxis.desktop'` but never a corresponding `registered ... as entry` line. ## Impact - Ctrl+Alt+T silently stops working on stock Ubuntu GNOME in Turkish locales. - The failure is confusing to diagnose: it only appears once the last terminal whose filename happens to contain no `i` is removed. On this machine `cool-retro-term.desktop` was the only visible terminal for that reason, so Ctrl+Alt+T had been opening it instead of the default terminal; uninstalling it left the user with no working terminal shortcut and no error message. - Any other locale whose collation reorders ASCII letters is likely affected in the same way. I could only verify Turkish locales, as no other non-C locale was generated on this system. ## Suggested fix Run the discovery `find` under a fixed collation so bracket ranges keep their ASCII meaning: ```diff - find -L "$@" 2> /dev/null | + LC_ALL=C find -L "$@" 2> /dev/null | ``` Confirmed to fix the issue here: with the patch applied, `org.gnome.Ptyxis.desktop` is registered and selected (`cmd=ptyxis`). Setting `LC_COLLATE=C` for just that command, or replacing the range expressions with explicit character enumerations, would work equally well. Scoping the change to the `find` invocation (rather than exporting it process-wide) avoids leaking a C locale into the spawned terminal's environment. ProblemType: Bug DistroRelease: Ubuntu 26.04 Package: xdg-terminal-exec 0.14.0-1 ProcVersionSignature: Ubuntu 7.0.0-30.30-generic 7.0.12 Uname: Linux 7.0.0-30-generic x86_64 ApportVersion: 2.34.0-0ubuntu2 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: ubuntu:GNOME Date: Sun Sep 6 21:21:23 2026 InstallationDate: Installed on 2026-08-12 (26 days ago) InstallationMedia: Ubuntu 26.04 "Resolute Raccoon" - Release amd64 (20260423.1) PackageArchitecture: all ProcEnviron: LANG=tr_TR.UTF-8 PATH=(custom, no user) SHELL=/bin/bash TERM=xterm-256color XDG_RUNTIME_DIR=<set> RebootRequiredPkgs: Error: path contained symlinks. SourcePackage: xdg-terminal-exec UpgradeStatus: No upgrade log present (probably fresh install) ** Affects: xdg-terminal-exec (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/2166620 Title: xdg-terminal-exec ignores every .desktop file containing "i" or "I" under Turkish locales (no terminal found) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xdg-terminal-exec/+bug/2166620/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
