From 0f68810644f41b325d7ad30a9f139bfdebbde9d5 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Tue, 1 Oct 2024 14:28:04 +0100 Subject: [PATCH 1/2] fix: use `--password-store=basic` when launching Signal See https://github.com/snapcrafters/signal-desktop/issues/300 An upstream Chrome issue blocks the correct inovation of libsecret from within snap/flatpak environments, which means that Signal loses access to the encryption key used to encrypt the local database, and needs to be re-linked (losing all message history) every time it's launched. --- snap/local/usr/bin/signal-desktop-wrapper | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/snap/local/usr/bin/signal-desktop-wrapper b/snap/local/usr/bin/signal-desktop-wrapper index 3caf4d69f..404e536d9 100755 --- a/snap/local/usr/bin/signal-desktop-wrapper +++ b/snap/local/usr/bin/signal-desktop-wrapper @@ -8,7 +8,16 @@ set -euo pipefail tray_icon="$(snapctl get tray-icon)" # Define an array of command line options -opts=() +opts=( + # Don't run the chrome sandbox inside the snap environment, rely on AppArmor confinement + "--no-sandbox" + # See https://github.com/snapcrafters/signal-desktop/issues/300 + # An upstream Chrome issue blocks the correct inovation of libsecret from within + # snap/flatpak environments, which means that Signal loses access to the encryption + # key used to encrypt the local database, and needs to be re-linked (losing all message + # history) every time it's launched. + "--password-store="basic" +) # If the the tray icon is enabled, add to the list of command line args if [[ "${tray_icon}" == "true" ]]; then @@ -16,4 +25,4 @@ if [[ "${tray_icon}" == "true" ]]; then fi # Run signal-desktop with the gathered arguments -exec "${SNAP}/opt/Signal/signal-desktop" "--no-sandbox" "${opts[@]}" "$@" +exec "${SNAP}/opt/Signal/signal-desktop" "${opts[@]}" "$@" From d42fdb68847db7d69798d01fedd4c57898360f9a Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Tue, 1 Oct 2024 14:29:00 +0100 Subject: [PATCH 2/2] chore: remove temporary password-manager-service plug --- snap/local/usr/bin/signal-desktop-wrapper | 2 +- snap/snapcraft.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/snap/local/usr/bin/signal-desktop-wrapper b/snap/local/usr/bin/signal-desktop-wrapper index 404e536d9..6762c224e 100755 --- a/snap/local/usr/bin/signal-desktop-wrapper +++ b/snap/local/usr/bin/signal-desktop-wrapper @@ -16,7 +16,7 @@ opts=( # snap/flatpak environments, which means that Signal loses access to the encryption # key used to encrypt the local database, and needs to be re-linked (losing all message # history) every time it's launched. - "--password-store="basic" + "--password-store=basic" ) # If the the tray icon is enabled, add to the list of command line args diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 4f8418f50..f68a3b2b3 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -194,7 +194,6 @@ apps: - removable-media - unity7 - screen-inhibit-control - - password-manager-service environment: TMPDIR: $XDG_RUNTIME_DIR # Included temporarily until https://github.com/snapcore/snapcraft-desktop-integration/issues/28