symless / synergy-core

Open source core of Synergy, the cross-platform keyboard and mouse sharing tool (Windows, macOS, Linux)
https://symless.com/synergy
Other
10.13k stars 3.6k forks source link

Linux: setCurrentLanguageWithDbus() no longer works in Gnome 41+ #7343

Open CheeseSucker opened 3 months ago

CheeseSucker commented 3 months ago

Gnome has tightened the security around DBus and Eval: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970

For setting keyboard layout via DBus to work:

  1. The user needs to enable unsafe mode for the session
  2. The code need to be changed to ES module syntax: import('resource:///org/gnome/shell/ui/status/keyboard.js').then(m => m.getInputSourceManager().inputSources[" + QString::number(group) + "].activate())

Synergy Version

Synergy 3 RC3 - v3.0.79.1-rc3

Steps to Reproduce

  1. Client: Enable "Use the primary computer's keyboard layout"
  2. Client: Add two keyboard layouts, one of them should be the same as the server's layout
  3. Client: Activate the keyboard layout that is different from the server's layout
  4. Restart the client
  5. Press a key on the server, and a warning should be logged.

Logs

synergy-core     [2024-03-31T12:48:15] - WARNING - keyboard layout fail. Reply is unexpected!