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

Auto-detect Wayland in run.sh #1653

Merged
merged 1 commit into from Jun 22, 2023
Merged

Auto-detect Wayland in run.sh #1653

merged 1 commit into from Jun 22, 2023

Conversation

rocodes
Copy link
Contributor

@rocodes rocodes commented Mar 29, 2023

Description

Optionally can replace #1652. Check XDG_SESSION_TYPE and if wayland, set QT_QPA_PLATFORM var when running the client.

Annoyingly, the warning ("Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway") is displayed even when the QT_QPA_PLATFORM environment variable is set.

Test Plan

Activate venv, run.sh:

  • Client launches successfully in both Xorg and Wayland environments
  • Visual review ok and CI passing

Checklist

If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:

  • I have tested these changes in the appropriate Qubes environment
  • I do not have an appropriate Qubes OS workstation set up (the reviewer will need to test these changes)
  • These changes should not need testing in Qubes

If these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:

  • I have updated the AppArmor profile
  • No update to the AppArmor profile is required for these changes
  • I don't know and would appreciate guidance

If these changes modify the database schema, you should include a database migration. Please check as applicable:

  • I have written a migration and upgraded a test database based on main and confirmed that the migration is self-contained and applies cleanly
  • I have written a migration but have not upgraded a test database based on main and would like the reviewer to do so
  • I need help writing a database migration
  • No database schema changes are needed

@rocodes rocodes requested a review from a team as a code owner March 29, 2023 18:46
@rocodes
Copy link
Contributor Author

rocodes commented Mar 29, 2023

Tested on a debian machine with Wayland, client launches successfully

run.sh Outdated
@@ -46,6 +46,7 @@ gpg --allow-secret-key-import --import tests/files/securedrop.gpg.asc &

# check whether current env is qubes
is_qubes="$(printenv | grep ^QUBES_)" || true
is_wayland="$(echo $XDG_SESSION_TYPE | grep ^wayland)" || true
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason we're grepping for it instead of a simple equality check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No 🙃 (well, yes, I wasn't 100% sure if suffixes like wayland-0 were valid or not, but looks like not). Fixing!

Sorry this has been sitting for 500 years

@gonzalo-bulnes gonzalo-bulnes mentioned this pull request Apr 5, 2023
@rocodes rocodes force-pushed the is-it-wayland branch 2 times, most recently from 35c8ac2 to 7869a37 Compare May 23, 2023 19:26
@legoktm legoktm merged commit 6e7380c into main Jun 22, 2023
18 checks passed
@legoktm legoktm deleted the is-it-wayland branch June 22, 2023 22:18
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.

None yet

2 participants