From d3b2abecdd498d3c2e2af4ca87077283be91773a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80?= <153805936+Cheviiot@users.noreply.github.com> Date: Sat, 25 Jul 2026 16:30:19 +1000 Subject: [PATCH] fix(telegram-desktop): also export DESKTOPINTEGRATION for the whole session The /usr/bin wrapper only stops the shadow .desktop/.service self-install when Telegram is actually launched through it. A stale GNOME Shell app-grid entry (or anything else invoking /opt/telegram-desktop/Telegram directly) still bypasses it and lets InstallLauncher() recreate the shadow files, which was still reproducing after the previous fix. Ship a systemd environment.d drop-in setting DESKTOPINTEGRATION=1 for the whole graphical session, so the guard applies regardless of which launcher or cached desktop entry starts the binary. Requires a full logout/login (or reboot) to take effect, same as the desktop-shell cache refresh this bug already needs on Wayland. --- telegram-desktop/Staplerfile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/telegram-desktop/Staplerfile b/telegram-desktop/Staplerfile index 58bf001..ff7dcaf 100644 --- a/telegram-desktop/Staplerfile +++ b/telegram-desktop/Staplerfile @@ -1,6 +1,6 @@ name='telegram-desktop' version='7.0.5' -release=4 +release=5 summary='Official Telegram messaging client' summary_ru='Официальный клиент мессенджера Telegram' group='Networking/Instant messaging' @@ -77,6 +77,17 @@ EOF install -Dm644 telegram-desktop.png \ "${pkgdir}/usr/share/icons/hicolor/256x256/apps/org.telegram.desktop.png" + # Belt-and-braces on top of the /usr/bin wrapper: the wrapper only helps + # when something actually launches via that path. A stale desktop-shell + # app cache (or any other launcher) can still exec the raw binary + # directly, so also export DESKTOPINTEGRATION for the whole graphical + # session via environment.d — this covers every launch path regardless + # of how the binary was invoked. + install -Dm644 /dev/stdin \ + "${pkgdir}/etc/environment.d/50-telegram-desktop-nivora.conf" <<'EOF' +DESKTOPINTEGRATION=1 +EOF + install-license LICENSE "telegram-desktop/LICENSE.nivora" } @@ -85,6 +96,7 @@ files() { files-find-desktop files-find-license files-find \ + "/etc/environment.d/50-telegram-desktop-nivora.conf" \ "/opt/telegram-desktop/**/*" \ "/usr/share/icons/hicolor/256x256/apps/org.telegram.desktop.png" }