From 2a9af40ece6b2aae285e51a1a885eec2e7a67427 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 18 Mar 2025 11:55:19 +0100 Subject: [PATCH] Tails: persist desktop entry --- src/utils/Utils.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/utils/Utils.cpp b/src/utils/Utils.cpp index 72322ba9..bd1bef99 100644 --- a/src/utils/Utils.cpp +++ b/src/utils/Utils.cpp @@ -333,12 +333,23 @@ bool xdgDesktopEntryRegister() { #endif QPixmap appIcon(":assets/images/appicons/64x64.png"); - QString pathIcon = QString("%1/.local/share/icons/feather.png").arg(QDir::homePath()); - if (!fileExists(pathIcon)) { - pixmapWrite(pathIcon, appIcon); + QString iconPathSuffix = "%1/.local/share/icons/feather.png"; + QString iconPath = iconPathSuffix.arg(QDir::homePath()); + if (!fileExists(iconPath)) { + pixmapWrite(iconPath, appIcon); } xdgDesktopEntryWrite(QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) + "/feather-wallet.desktop"); + // Also write to dotfiles persistence + if (TailsOS::detect() && TailsOS::detectDotPersistence()) { + QString basePath = "/live/persistence/TailsData_unlocked/dotfiles"; + iconPath = iconPathSuffix.arg(basePath); + if (!fileExists(iconPath)) { + pixmapWrite(iconPath, appIcon); + } + xdgDesktopEntryWrite(basePath + "/.local/share/applications/feather-wallet.desktop"); + } + xdgRefreshApplications(); return true; } -- 2.52.0