1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

[PM-10448] Enable wayland where possible in Linux Desktop (#10359)

* Enable wayland where possible

* Update electron to 34.4.0

* Re-add snap libdbus fix

* Flatpak permissions for wayland

* Bump electron version to 35.5.1

* Switch to x11 socket from x11-fallback

* Fix package.json
This commit is contained in:
Bernd Schoolmann
2025-07-16 17:21:12 +02:00
committed by GitHub
parent 60855c734f
commit 5b27988454
4 changed files with 11 additions and 4 deletions

View File

@@ -262,7 +262,8 @@
},
"u2f-devices"
],
"stagePackages": ["default"]
"stagePackages": ["default"],
"allowNativeWayland": true
},
"protocols": [
{

View File

@@ -8,6 +8,9 @@ command: bitwarden.sh
finish-args:
- --share=ipc
- --share=network
- --socket=wayland
# This should be fallback-x11, but on gnome/mutter, zwlr_data_control_manager_v1 is not implemented
# so we need to use x11 as a fallback to make copy paste work
- --socket=x11
- --device=dri
- --env=XDG_CURRENT_DESKTOP=Unity

View File

@@ -13,6 +13,9 @@ then
export LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libdbus-1.so.3"
fi
# pass through all args
$APP_PATH/bitwarden-app "$@"
PARAMS="--enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto"
if [ "$USE_X11" = "true" ]; then
PARAMS=""
fi
$APP_PATH/bitwarden-app $PARAMS "$@"

View File

@@ -25,7 +25,7 @@ async function run(context) {
fse.moveSync(oldBin, newBin);
console.log("Moved binary to bitwarden-app");
const wrapperScript = path.join(__dirname, "../resources/memory-dump-wrapper.sh");
const wrapperScript = path.join(__dirname, "../resources/linux-wrapper.sh");
const wrapperBin = path.join(appOutDir, context.packager.executableName);
fse.copyFileSync(wrapperScript, wrapperBin);
fse.chmodSync(wrapperBin, "755");