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.
This commit is contained in:
Александр
2026-07-25 16:30:19 +10:00
parent b9e2887b2f
commit d3b2abecdd
+13 -1
View File
@@ -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"
}