Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable wayland by default, fallback to X11 #99

Merged
merged 3 commits into from
Nov 12, 2023
Merged

Conversation

ghisvail
Copy link
Collaborator

@ghisvail ghisvail commented May 5, 2022

No description provided.

@flathubbot
Copy link
Contributor

Started test build 89959

@flathubbot
Copy link
Contributor

Build 89959 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/87752/com.bitwarden.desktop.flatpakref

@flathubbot
Copy link
Contributor

Started test build 90422

@flathubbot
Copy link
Contributor

Build 90422 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/88207/com.bitwarden.desktop.flatpakref

@flathubbot
Copy link
Contributor

Started test build 94526

@flathubbot
Copy link
Contributor

Build 94526 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/92258/com.bitwarden.desktop.flatpakref

Comment on lines 51 to 67
- type: script
dest-filename: bitwarden.sh
commands:
- export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID"
- exec zypak-wrapper /app/Bitwarden/bitwarden "$@"
- export TMPDIR="${XDG_RUNTIME_DIR}/app/${FLATPAK_ID}"
- if [ "${XDG_SESSION_TYPE}" == "wayland" ]; then
- zypak-wrapper /app/Bitwarden/bitwarden --enable-features=UseOzonePlatform --ozone-platform=wayland "$@"
- else
- zypak-wrapper /app/Bitwarden/bitwarden "$@"
- fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just my two cent: the structure of it is displeasing. I suggest writing a separate bash script.

@flathubbot
Copy link
Contributor

Started test build 105042

@flathubbot
Copy link
Contributor

Build 105042 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/102727/com.bitwarden.desktop.flatpakref

@proletarius101
Copy link
Contributor

They have updated Electron to 21: https://github.com/bitwarden/clients/blob/2ac8e27b319a3873ace0ea418f1c51d5b4c08b21/package.json#L82. After the next release, the flag should be changed to

--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations

@ghisvail
Copy link
Collaborator Author

@proletarius101 thanks for the heads up 👍

@flathubbot
Copy link
Contributor

Started test build 14162

@flathubbot
Copy link
Contributor

Started test build 14163

@flathubbot
Copy link
Contributor

Build 14162 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/126589/com.bitwarden.desktop.flatpakref

@flathubbot
Copy link
Contributor

Build 14163 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/126590/com.bitwarden.desktop.flatpakref

@flathubbot
Copy link
Contributor

Started test build 17371

@flathubbot
Copy link
Contributor

Build 17371 failed

@flathubbot
Copy link
Contributor

Started test build 17376

@flathubbot
Copy link
Contributor

Build 17376 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/1/com.bitwarden.desktop.flatpakref

@flathubbot
Copy link
Contributor

Started test build 17381

@flathubbot
Copy link
Contributor

Build 17381 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/6/com.bitwarden.desktop.flatpakref

@flathubbot
Copy link
Contributor

Started test build 17966

@flathubbot
Copy link
Contributor

Build 17966 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/596/com.bitwarden.desktop.flatpakref

@taaem
Copy link
Contributor

taaem commented Sep 5, 2023

The second one should not be fixed like that but instead like this (see https://github.com/flathub/com.visualstudio.code/blob/master/com.visualstudio.code.yaml#L26C1-L26C46):

  - --system-talk-name=org.freedesktop.login1

@taaem
Copy link
Contributor

taaem commented Sep 5, 2023

Sorry for the update again, but according to https://github.com/electron/electron/blob/main/shell/browser/lib/power_observer_linux.cc#L18 the correct fix would be:

  - --system-talk-name=org.freedesktop.login1
  - --system-talk-name=org.freedesktop.login1.Manager

@ghisvail
Copy link
Collaborator Author

ghisvail commented Sep 5, 2023

Sorry for the update again, but according to https://github.com/electron/electron/blob/main/shell/browser/lib/power_observer_linux.cc#L18 the correct fix would be:

  - --system-talk-name=org.freedesktop.login1
  - --system-talk-name=org.freedesktop.login1.Manager

Thank you for investigating this. Could you submit this fix in a separate PR?

@taaem
Copy link
Contributor

taaem commented Sep 5, 2023

@ghisvail I will in a second :)

@taaem
Copy link
Contributor

taaem commented Sep 5, 2023

@ghisvail should I also add the other fix in the new pr?

@ghisvail
Copy link
Collaborator Author

ghisvail commented Sep 5, 2023

yes please

@flathubbot
Copy link
Contributor

Started test build 63711

@flathubbot
Copy link
Contributor

Build 63711 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/46349/com.bitwarden.desktop.flatpakref

@flathubbot
Copy link
Contributor

Started test build 64396

@ghisvail
Copy link
Collaborator Author

ghisvail commented Sep 9, 2023

@taaem could you test it again, now that your changes are in?

@flathubbot
Copy link
Contributor

Build 64396 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/47030/com.bitwarden.desktop.flatpakref

@taaem
Copy link
Contributor

taaem commented Sep 11, 2023

@ghisvail everything works for me now on wayland :)

@cassidyjames
Copy link
Member

Testing locally on Endless OS on Wayland, and it works. It seems to fix #165 for me as well.

@flathubbot
Copy link
Contributor

Started test build 81040

@flathubbot
Copy link
Contributor

Build 81040 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/63677/com.bitwarden.desktop.flatpakref

@ghisvail
Copy link
Collaborator Author

Looks like it's working on my X11 session too.

@ghisvail ghisvail merged commit 1eef6b2 into master Nov 12, 2023
1 check passed
@ghisvail ghisvail deleted the enable-wayland branch November 12, 2023 10:04
evan-a-a added a commit to evan-a-a/com.bitwarden.desktop that referenced this pull request Nov 14, 2023
evan-a-a added a commit to evan-a-a/com.bitwarden.desktop that referenced this pull request Nov 27, 2023
ghisvail added a commit that referenced this pull request Dec 1, 2023
There is an issue upstream with copy and paste on pure Wayland.

Users have reported that keeping the X11 socket alive solves it.

To be reverted when upstream fixes the issue for good.

* Revert "Enable wayland by default, fallback to X11 (#99)"

This reverts commit 1eef6b2.

* Update com.bitwarden.desktop.yaml

Co-authored-by: Tilo Spannagel <[email protected]>

---------

Co-authored-by: Ghislain Vaillant <[email protected]>
Co-authored-by: Tilo Spannagel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants