diff options
| author | Darrell Anderson <darrella@clovermail.net> | 2025-09-03 04:10:12 +0300 |
|---|---|---|
| committer | Alexander Golubev <fatzer2@gmail.com> | 2025-10-24 17:15:30 +0300 |
| commit | 7bf546b27b8cf52effdafbabd2161d506ffeb04d (patch) | |
| tree | e153a566c39ffd5dcd03b3ca90c8e9a2f4a37b83 | |
| parent | 71b4350a41691bf4dfe6c1eb8b70d4b991f5aed0 (diff) | |
| download | tdebase-7bf546b2.tar.gz tdebase-7bf546b2.zip | |
starttde: set XDG_CURRENT_DESKTOP unless already defined
Bug: https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/issues/322
Co-authored-by: Alexander Golubev <fatzer2@gmail.com>
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 6fac1bccedf2267e3ce56cc61bf08d41bfbc7f47)
| -rwxr-xr-x | starttde | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -346,9 +346,27 @@ echo "[starttde] XDG_DATA_DIRS: $XDG_DATA_DIRS" 1>&2 test -n "$TDEHOME" && tdehome=$(echo "$TDEHOME" | sed "s,^~/,$HOME/,") -# Allow interested applications, such as the Plasma control wrapper, -# to know that this is a Trinity desktop and not a KDE one. +# Help non-TDE software identify the desktop environment. +# +# DESKTOP_SESSION is considered legacy but retained for backwards +# compatibility. export DESKTOP_SESSION=trinity +# XDG_CURRENT_DESKTOP is considered the correct way to identify desktop +# environments. This is the variable xdg-utils uses although xdg-utils +# does not explicitly support TDE. Acceptable desktop identifiers are found in +# Appendix B of the Desktop Menu Specification: +# https://specifications.freedesktop.org/menu-spec/latest/apb.html +# Note: The variable should be already set by most modern DMs (including TDM +# since R14.0.12), but when launching TDE manually via startx, it's unlikely to +# be defined, so set it here. Also note that the variable is allowed to contain +# multiple colon-separated identifiers. +if [ -n "$XDG_CURRENT_DESKTOP" ]; then + echo "[starttde] Setting XDG_CURRENT_DESKTOP=TDE" 1>&2 + export XDG_CURRENT_DESKTOP=TDE +elif ! is_in_path XDG_CURRENT_DESKTOP "TDE"; then + echo "[starttde] Setting XDG_CURRENT_DESKTOP=TDE:$XDG_CURRENT_DESKTOP" 1>&2 + export XDG_CURRENT_DESKTOP=TDE:$XDG_CURRENT_DESKTOP +fi # If necessary create the profile directory. if [ ! -d "$tdehome" ]; then |
