From 3508b4631dd2ff0c5ddc1f6a38df142998dab669 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Wed, 13 Nov 2024 14:06:57 +0100 Subject: [PATCH] Fix snap protocol handler (#11932) Co-authored-by: Matt Bishop --- apps/desktop/resources/memory-dump-wrapper.sh | 6 ++++++ apps/desktop/src/main/window.main.ts | 12 ++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/apps/desktop/resources/memory-dump-wrapper.sh b/apps/desktop/resources/memory-dump-wrapper.sh index b62c050683..6737cc312f 100644 --- a/apps/desktop/resources/memory-dump-wrapper.sh +++ b/apps/desktop/resources/memory-dump-wrapper.sh @@ -7,6 +7,12 @@ ulimit -c 0 RAW_PATH=$(readlink -f "$0") APP_PATH=$(dirname $RAW_PATH) +# force use of base image libdus in snap +if [ -e "/usr/lib/x86_64-linux-gnu/libdbus-1.so.3" ] +then + export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libdbus-1.so.3" +fi + # pass through all args $APP_PATH/bitwarden-app "$@" diff --git a/apps/desktop/src/main/window.main.ts b/apps/desktop/src/main/window.main.ts index 6d42e519d8..fb9ab033cf 100644 --- a/apps/desktop/src/main/window.main.ts +++ b/apps/desktop/src/main/window.main.ts @@ -12,15 +12,7 @@ import { BiometricStateService } from "@bitwarden/key-management"; import { WindowState } from "../platform/models/domain/window-state"; import { DesktopSettingsService } from "../platform/services/desktop-settings.service"; -import { - cleanUserAgent, - isDev, - isLinux, - isMac, - isMacAppStore, - isSnapStore, - isWindows, -} from "../utils"; +import { cleanUserAgent, isDev, isLinux, isMac, isMacAppStore, isWindows } from "../utils"; const mainWindowSizeKey = "mainWindowSize"; const WindowEventHandlingDelay = 100; @@ -84,7 +76,7 @@ export class WindowMain { return new Promise((resolve, reject) => { try { - if (!isMacAppStore() && !isSnapStore()) { + if (!isMacAppStore()) { const gotTheLock = app.requestSingleInstanceLock(); if (!gotTheLock) { app.quit();