Commit Graph
8 Commits
Author SHA1 Message Date
Александр 9833b202f9 fix(telegram-desktop): use Telegram's own external-updater opt-out instead
The DESKTOPINTEGRATION wrapper/environment.d combo only ever stopped the
shadow .desktop/.service self-install. It never addressed a second, worse
symptom: QGuiApplication::setDesktopFileName() in Platform::start() sets the
Wayland app_id to a per-install-path hashed "org.telegram.desktop._<hash>"
id whenever Core::UpdaterDisabled() is false — completely independent of
DESKTOPINTEGRATION — so the running window's app_id never matched our
shipped org.telegram.desktop.desktop and its icon/taskbar entry broke even
after the duplicate launcher file was silenced.

Telegram ships a documented opt-out for exactly this: Launcher::
ComputeExternalUpdater() (core/launcher.cpp) scans <exe-dir>/
externalupdater.d/ for a file containing a line equal to its own full
executable path, and calls SetUpdaterDisabledAtStartup() if found. That one
flag flips both Core::UpdaterDisabled() checks at once — InstallLauncher()
skips the shadow-file self-install AND desktopFileName() uses the plain
"org.telegram.desktop" id that matches our .desktop file, fixing the window
icon too. Drop the wrapper script and environment.d drop-in; back to a
plain /usr/bin symlink plus one externalupdater.d marker file.
2026-07-25 16:44:53 +10:00
Александр d3b2abecdd 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.
2026-07-25 16:30:19 +10:00
Александр b9e2887b2f fix(telegram-desktop): actually stop the shadow desktop-file self-install
The Exec-path and DBusActivatable matching from the previous two commits
were treating the wrong cause: InstallLauncher() in tdesktop's
specific_linux.cpp unconditionally wipes and rewrites its own
~/.local/share/applications/*.desktop and dbus-1/services/*.service on
every launch, regardless of what the installed .desktop file says — unless
the DESKTOPINTEGRATION env var is non-empty, which is upstream's documented
opt-out for exactly this kind of repack.

/usr/bin/telegram-desktop is now a wrapper script that sets
DESKTOPINTEGRATION=1 before exec'ing the real binary, covering every launch
path (desktop file, D-Bus activation, terminal). The .desktop file's
Exec/TryExec/DBusActivatable revert to their original values since the
field-matching theory they were built on didn't hold.
2026-07-25 16:11:20 +10:00
Александр f33ec4b124 fix(telegram-desktop): declare DBusActivatable=true to match Telegram's own check
Matching Exec to the real binary path wasn't enough: Telegram also compares
the installed .desktop's DBusActivatable field against what it expects and
still self-installs a shadow copy in ~/.local/share/applications when it
sees DBusActivatable=false, producing the same duplicate-icon symptom.
Setting it to true stops the shadow copy. Bumped release and checksum.
2026-07-25 15:56:05 +10:00
Александр 5dc78222f6 fix(telegram-desktop): point Exec at the real binary to stop duplicate launcher icons
Telegram's own Linux runtime checks whether the installed .desktop file's
Exec matches its actual binary path, and silently writes a private copy to
~/.local/share/applications with a randomized name whenever it doesn't.
Our desktop entry pointed at the /usr/bin/telegram-desktop symlink, which
never matched /opt/telegram-desktop/Telegram, so Telegram regenerated a
shadow launcher on every start, producing a second, unmatched icon.

Exec/TryExec now point directly at the installed binary so Telegram's own
check finds a match. Bumped release and updated the checksum for the
changed desktop file.
2026-07-25 03:43:58 +10:00
Александр a68fb112d7 fix(telegram-desktop): correct ALT Linux dependency package names
libbrotli, libbz2, libfontconfig, libffi, libglib2 and hicolor-icon-theme
don't exist as such in ALT's repos. Verified real names against this
machine's apt-cache: libbrotlicommon/libbrotlidec, bzlib, libfontconfig1,
libffi8, glib2, icon-theme-hicolor.
2026-07-25 02:35:06 +10:00
Александр 84a1bbea8a fix(telegram-desktop): ignore archive ownership on extraction
tsetup.tar.xz bakes in uid/gid 1000 from Telegram's release tooling;
the sandboxed builder can't chown to it, so the build failed with
"Невозможно изменить владельца". --no-same-owner/--no-same-permissions
matches the pineconemc package's handling of the same issue.
2026-07-25 02:30:28 +10:00
Александр 07d13aca64 feat: add Telegram Desktop package
Repackages the official static tsetup.7.0.5.tar.xz Linux build for
amd64, keeping the upstream org.telegram.desktop desktop-id and
TelegramDesktop WM class.
2026-07-25 02:28:05 +10:00