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

fix(linux): Improve detection of Gnome environment #11292

Merged
merged 1 commit into from Apr 30, 2024

Conversation

ermshiperete
Copy link
Contributor

This change improves the way we detect if we're running a Gnome based UI that needs it's keyboards installed under
org.gnome.desktop.input-sources. We use the environment variable XDG_CURRENT_DESKTOP and check if it contains the word gnome. Additionally this change renames is_gnome_shell() to is_gnome_desktop().

Fixes #11225.

User Testing

Preparations

  • The tests should be run on these Linux platforms:

    • GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11
    • GROUP_NOBLE_WAYLAND: Ubuntu 24.04 Noble with Gnome Shell and Wayland
    • GROUP_WASTA: Wasta 22.04 with Cinnamon
  • Install build artifacts of this PR

  • Reboot

Tests

TEST_INSTALL:

  • open Keyman Configuration
  • install a Keyman keyboard
  • verify that the keyboard appears in Keyboard/language dropdown list in the task bar

@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Apr 23, 2024
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Apr 23, 2024

User Test Results

Test specification and instructions

  • ✅ GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

    1 tests PASSED
    • TEST_INSTALL (PASSED): 1. Tested with the attached PR build (Keyman 18.0.21-alpha (package version 18.0.21-1~PR-11292-2776.1+focal1) on Ubuntu Focal 20.04 Linux OS (VM) and here is my observation: 1. Opened Keyman Configuration. 2. Installed the Keyman Keyboard. 3. Verified that the installed keyboard appeared on the Keyboard / language dropdown list in the task bar. (notes)
  • ✅ GROUP_NOBLE_WAYLAND: Ubuntu 24.04 Noble with Gnome Shell and Wayland

    1 tests PASSED
    • TEST_INSTALL (PASSED): 1. Tested with the attached PR build (Keyman 18.0.21-alpha (package version 18.0.21-1~PR-11292-2776.1+noble1) on Ubuntu Noble 24.04 Linux OS (VM) and here is my observation: 1. Opened Keyman Configuration. 2. Installed the Keyman Keyboard. 3. Verified that the installed keyboard appeared on the Keyboard/language dropdown list in the taskbar. (notes)
  • ✅ GROUP_WASTA: Wasta 22.04 with Cinnamon

    1 tests PASSED
    • TEST_INSTALL (PASSED): 1. Tested with the attached PR build (Keyman 18.0.21-alpha (package version 18.0.21-1~PR-11292-2776.1+focal1) on Wasta 22.04 with Cinnamon Linux OS (VM) and here is my observation: 1. Opened Keyman Configuration. 2. Installed the Keyman Keyboard. 3. Verified that the installed keyboard appeared on the Keyboard/language dropdown list in the taskbar.

Test Artifacts

This change improves the way we detect if we're running a Gnome based
UI that needs it's keyboards installed under
`org.gnome.desktop.input-sources`. We use the environment variable
`XDG_CURRENT_DESKTOP` and check if it contains the word `gnome`.
Additionally this change renames `is_gnome_shell()` to
`is_gnome_desktop()`.

Fixes #11225.
@ermshiperete ermshiperete force-pushed the fix/linux/11225_environment-detection branch from b02a261 to 2044b18 Compare April 23, 2024 13:16
@ermshiperete ermshiperete marked this pull request as ready for review April 24, 2024 13:27
@bharanidharanj
Copy link

Test Results

GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

  • TEST_INSTALL (PASSED): 1. Tested with the attached PR build (Keyman 18.0.21-alpha (package version 18.0.21-1~PR-11292-2776.1+focal1) on Ubuntu Focal 20.04 Linux OS (VM) and here is my observation: 1. Opened Keyman Configuration. 2. Installed the Keyman Keyboard. 3. Verified that the installed keyboard appeared on the Keyboard / language dropdown list in the task bar.

@bharanidharanj
Copy link

Test Results

GROUP_NOBLE_WAYLAND: Ubuntu 24.04 Noble with Gnome Shell and Wayland

  • TEST_INSTALL (BLOCKED): 1. Got an error message while installed the attached PR build on Ubuntu Noble_Wayland Linux OS. 2. This error prevents further testing on this test.

@bharanidharanj
Copy link

Test Results

GROUP_WASTA: Wasta 22.04 with Cinnamon

  • TEST_INSTALL (PASSED): 1. Tested with the attached PR build (Keyman 18.0.21-alpha (package version 18.0.21-1~PR-11292-2776.1+focal1) on Wasta 22.04 with Cinnamon Linux OS (VM) and here is my observation: 1. Opened Keyman Configuration. 2. Installed the Keyman Keyboard. 3. Verified that the installed keyboard appeared on the Keyboard/language dropdown list in the taskbar.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Apr 25, 2024
Copy link
Contributor

@darcywong00 darcywong00 left a comment

Choose a reason for hiding this comment

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

lgtm

@darcywong00 darcywong00 modified the milestones: B17S6, A18S1 Apr 28, 2024
@ermshiperete
Copy link
Contributor Author

@bharanidharanj Please run:

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

then try the installation again.

@keymanapp-test-bot retest GROUP_NOBLE_WAYLAND TEST_INSTALL

@keymanapp-test-bot keymanapp-test-bot bot added user-test-required User tests have not been completed and removed user-test-failed labels Apr 30, 2024
@bharanidharanj
Copy link

Test Results

GROUP_NOBLE_WAYLAND: Ubuntu 24.04 Noble with Gnome Shell and Wayland

  • TEST_INSTALL (PASSED): 1. Tested with the attached PR build (Keyman 18.0.21-alpha (package version 18.0.21-1~PR-11292-2776.1+noble1) on Ubuntu Noble 24.04 Linux OS (VM) and here is my observation: 1. Opened Keyman Configuration. 2. Installed the Keyman Keyboard. 3. Verified that the installed keyboard appeared on the Keyboard/language dropdown list in the taskbar.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Apr 30, 2024
@ermshiperete ermshiperete merged commit d81cff2 into master Apr 30, 2024
7 checks passed
@ermshiperete ermshiperete deleted the fix/linux/11225_environment-detection branch April 30, 2024 13:52
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 18.0.25-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

bug(linux): Wrong environment detected installing keyboards
4 participants