Add Linux port support and packaging#233
Conversation
Greptile SummaryThis PR adds comprehensive Linux support for OpenLogi: a split uinput keyboard/pointer device, GNOME gsettings-aware desktop-navigation actions, app-rendered window chrome for client-side decorations, systemd agent integration, and
Confidence Score: 4/5The core Linux port work is solid, but the permission probe introduced for mouse event nodes will silently never return Granted due to a wrong sysfs property lookup. The crates/openlogi-gui/src/platform/permissions.rs — the Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Button press] --> B{Action type}
B -->|Click or Scroll| D[VIRTUAL_POINTER]
B -->|Key combo| E[VIRTUAL_KEYBOARD]
B -->|Desktop-nav| F[press_gsettings_shortcut_any]
F --> G[configured_shortcuts via gsettings]
G -->|found| E
G -->|not found| H[fallback chord]
H --> E
D --> I[kernel pointer event node]
E --> J[kernel keyboard event node]
K[GUI permission check] --> L[probe_uinput]
K --> M[probe_logitech_hidraw]
K --> N[probe_logitech_mouse_event]
N --> O{ID_INPUT_MOUSE=1 in sysfs?}
O -->|Not present - udev DB only| P[returns None]
P --> Q[classify gives Unknown not Granted]
L --> R[classify result shown in UI]
M --> R
N --> R
Reviews (2): Last reviewed commit: "Merge pull request #2 from jvannoyx4/lin..." | Re-trigger Greptile |
| WindowButton::Minimize => (IconName::Minimize, tr!("Minimize")), | ||
| WindowButton::Maximize if is_maximized => (IconName::Maximize, tr!("Restore")), | ||
| WindowButton::Maximize => (IconName::Maximize, tr!("Maximize")), |
There was a problem hiding this comment.
The
Maximize icon is used for both the maximized and normal states. The tooltip label correctly changes to "Restore", but the icon stays as Maximize, which is inconsistent with desktop conventions (usually the icon also switches to indicate the restore action).
| WindowButton::Minimize => (IconName::Minimize, tr!("Minimize")), | |
| WindowButton::Maximize if is_maximized => (IconName::Maximize, tr!("Restore")), | |
| WindowButton::Maximize => (IconName::Maximize, tr!("Maximize")), | |
| WindowButton::Minimize => (IconName::Minimize, tr!("Minimize")), | |
| WindowButton::Maximize if is_maximized => (IconName::Restore, tr!("Restore")), | |
| WindowButton::Maximize => (IconName::Maximize, tr!("Maximize")), |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| fn configured_shortcuts(schema: &str, key: &str) -> Vec<(Vec<KeyCode>, KeyCode)> { | ||
| let output = std::process::Command::new("gsettings") | ||
| .args(["get", schema, key]) | ||
| .output() | ||
| .ok(); | ||
| let Some(output) = output else { | ||
| return Vec::new(); | ||
| }; | ||
| if !output.status.success() { | ||
| return Vec::new(); | ||
| } | ||
| let Ok(stdout) = String::from_utf8(output.stdout) else { | ||
| return Vec::new(); | ||
| }; | ||
| accelerator_values(&stdout) | ||
| .into_iter() | ||
| .filter_map(|shortcut| parse_accelerator(shortcut)) | ||
| .collect() | ||
| } |
There was a problem hiding this comment.
gsettings subprocess spawned on every keypress
configured_shortcuts() spawns a gsettings get child process each time a desktop-navigation action is triggered (e.g. PreviousDesktop/NextDesktop each spawn two processes per press via press_gsettings_shortcut_any). Process startup overhead (~50–150 ms) will produce a noticeable delay on every button press for those actions. These shortcuts don't change at runtime, so the result could be cached at first use (e.g. via OnceLock or LazyLock per schema/key pair).
|
Real-world confirmation that the new
So the only workaround today is the keylogger-capable |
|
Follow-up as promised: tested the updated rule from this branch on the same machine (Ubuntu 26.04, GNOME Shell 50.1, native Wayland, systemd-logind), installed via Results:
LGTM from the Wayland/GNOME side. |
|
Heads-up on a Wayland app_id / This PR and #191 (Wayland frontmost backends) both set the GUI's Wayland
In #191 the I'd propose standardizing on
Two small follow-ons if we go with that:
Happy to rebase #191 onto whatever lands here — just want us aligned on the one id string before either merges so the frontmost self-identification doesn't silently break. |
|
Quick update: I've aligned #191 on Rather than leave a bare literal, I hoisted the value into So when this PR lands, the conflict in |
Summary
This PR adds Linux support for OpenLogi, including device access setup, Linux-compatible button actions, GUI desktop integration, and Linux release packaging.
What changed
.deb.rpm.tar.gzValidation
Tested locally on Linux:
cargo fmt --all -- --checkcargo check -p openlogi-gui -p xtaskcargo test -p openlogi-core linux_acceleratorssh -non Linux install/uninstall/package scriptsopenlogi-0.6.8-linux-amd64.tar.gzopenlogi_0.6.8_amd64.debopenlogi-0.6.8-1.x86_64.rpm