Skip to content

feat(linux): Linux desktop support — Part 5/6: Phone storage sync and file manager integration - #43

Merged
thtbee merged 16 commits into
thtbee:mainfrom
jochenkirstaetter:linux-5-storage
Oct 23, 2026
Merged

thtbee merged 16 commits into
thtbee:mainfrom
jochenkirstaetter:linux-5-storage

Conversation

@jochenkirstaetter

Copy link
Copy Markdown
Contributor

Summary

Part 5 of 6 for Linux desktop support (stacked on #42 / linux-4-media, #41 / linux-3-input, and #38 / linux-2-basics).

Adds Linux phone storage synchronization and file manager bookmark integration:

  • Linux Storage Synchronization (desktop/app/src/linux/storage.rs):
    • Synchronizes paired phone storage under ~/Nectarlink/<Phone name> when the phone's storage toggle is enabled.
    • Streams remote files into atomic .nectarlink-part temporary files (O_NOFOLLOW, 0o600) before renaming into place, preserving remote modification timestamps.
    • Detects user additions and edits in the local folder and pushes them back to the phone via storage.mkdir and storage.write.
    • Automatically registers and cleans up ~/.config/gtk-3.0/bookmarks entries (file://<encoded_path> <DeviceName> (NectarLink)) so paired phones appear in GTK/GNOME/XFCE/Cinnamon file managers.
  • Cross-Platform Storage Dispatch (desktop/app/src/storage.rs, desktop/app/src/core_host.rs):
    • Routes storage::{start, sync, on_event, shutdown, unregister_all, sync_root_path_for, open_in_explorer} to linux::storage on Linux.
    • Advertises STORAGE_MOUNT, STORAGE_READ, and STORAGE_WRITE capabilities on Linux.

Verification

  • cargo fmt --all --check
  • cargo xtask strings --check
  • cargo clippy --locked -p nectarlink-desktop -p nectarlink-vcam -p s1-qt-rust --all-targets -- -D warnings
  • cargo test --locked -p nectarlink-desktop -p nectarlink-vcam (306 + 6 unit tests pass)

…uts, network & BLE (Part 2)

Signed-off-by: Jochen Kirstätter <7329802+jochenkirstaetter@users.noreply.github.com>
Signed-off-by: Jochen Kirstätter <7329802+jochenkirstaetter@users.noreply.github.com>
…-monitor parser

Signed-off-by: Jochen Kirstätter <7329802+jochenkirstaetter@users.noreply.github.com>
…ode for watched PIDs

Signed-off-by: Jochen Kirstätter <7329802+jochenkirstaetter@users.noreply.github.com>
Signed-off-by: Jochen Kirstätter <7329802+jochenkirstaetter@users.noreply.github.com>
…rdings (Part 4)

Signed-off-by: Jochen Kirstätter <7329802+jochenkirstaetter@users.noreply.github.com>
Signed-off-by: Jochen Kirstätter <7329802+jochenkirstaetter@users.noreply.github.com>
@thtbee

thtbee commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Thanks for opening this. Our notes for this part are on #38 (comment). The main thought, only a suggestion: syncing walks the phone every 4 s and copies every file into ~/Nectarlink/<phone>, which can mean gigabytes the user didn't ask for, and a file deleted locally comes back on the next pass. An on-demand mount (FUSE) reads only what's opened. We tried one against the kernel protocol, and it held up end to end, including a 1 GiB read and recovery after a crash; it's on linux-review-fixes if it helps (b346bfe, ea1f8e0, e58ee10). KDE's sidebar also reads ~/.local/share/user-places.xbel besides GTK's bookmarks.

jochenkirstaetter and others added 7 commits October 23, 2026 14:39
… D-Bus, and packaging

Applies the Part 2 review improvements and fixes from upstream/linux-review-fixes
(b346bfe, 47e3e06, 6291b51, a815275, 0be2ddf, 20c70f3, ccb9318):
- USB ADB: retry another local TCP port only when adb reports a port bind failure (47e3e06)
- Linux platform layer: native D-Bus/Netlink/Qt integrations for clipboard, tray,
  notifications (6291b51), single-instance activation token, BlueZ/NetworkManager,
  Wake-on-LAN, BLE beacon, and clean SIGTERM/SIGINT/SIGHUP shutdown (ccb9318)
- Shell & Doctor: remove Windows settings links/explorer.exe shims (20c70f3) and
  provide plain Linux Doctor readiness checks and wording with German and Chinese
  translations (a815275)
- Release workflow & packaging: pin AppImage tools with SHA-256 verification and
  smoke-test every Linux package (.deb, AppImage, tarball) with --version (0be2ddf)

Many thanks to @thtbee for the thorough review and reference implementation on
linux-review-fixes!

Co-authored-by: Bee <302257494+thtbee@users.noreply.github.com>
Signed-off-by: Jochen Kirstätter <7329802+jochenkirstaetter@users.noreply.github.com>
…and window capture

Merges updated linux-2-basics and applies the Part 3 review improvements from
upstream/linux-review-fixes (b346bfe, 7bc9b2b, a815275):
- Keyboard layout resolution (7bc9b2b): add desktop/app/src/linux/keymap.rs using
  libxkbcommon / libxkbcommon-x11 to resolve keysyms and keycodes against the
  user's active X11 or Wayland keyboard layout for text typing and shortcuts
- Input injection & window capture (b346bfe): native XTest/uinput/RemoteDesktop
  portal input handling and X11/Portal window capture improvements
- DeckPage QML & i18n (a815275): use Linux shortcut labels (Super+D, Screenshot,
  Super) with German and Chinese translations

Many thanks to @thtbee for the collaborative review and reference implementation
on linux-review-fixes!

Co-authored-by: Bee <302257494+thtbee@users.noreply.github.com>
Signed-off-by: Jochen Kirstätter <7329802+jochenkirstaetter@users.noreply.github.com>
… portal, and OpenH264 ABI

Applies the Part 4 review improvements and fixes from upstream/linux-review-fixes (b346bfe, c41f185, 20c70f3):
- Wayland ScreenCast portal: open the portal's PipeWire remote connection via OpenPipeWireRemote and pass it as fd 3 to gst-launch-1.0 pipewiresrc, with session restore_token persistence (c41f185)
- Media & audio: PipeWire/PulseAudio speaker monitor capture, MPRIS D-Bus client & server, FFmpeg 8 libavcodec compatibility, v4l2loopback virtual camera, and virtual microphone
- OpenH264 ABI compatibility: auto-detect 40-byte (Debian/Ubuntu libopenh264.so.7 2.4.1) vs 56-byte (upstream 2.3+ r_psnr) SLayerBSInfo layout at runtime and install libopenh264-dev in Linux CI

Many thanks to @thtbee for the thorough review and reference implementation on linux-review-fixes!

Co-authored-by: Bee <302257494+thtbee@users.noreply.github.com>
Signed-off-by: Jochen Kirstätter <7329802+jochenkirstaetter@users.noreply.github.com>
…phone storage

Applies the Part 5 review improvements and fixes from upstream/linux-review-fixes (b346bfe, e58ee10):
- Replace whole-phone sync folder with an on-demand /dev/fuse filesystem mount via fusermount3/fusermount
- Add GTK3 and XBEL file-manager bookmark integration and clean unmount on disconnect or shutdown
- Only advertise STORAGE_MOUNT / STORAGE_READ / STORAGE_WRITE on Linux when /dev/fuse and fusermount are available (e58ee10)

Many thanks to @thtbee for the thorough review and reference implementation on linux-review-fixes!

Co-authored-by: Bee <302257494+thtbee@users.noreply.github.com>
Signed-off-by: Jochen Kirstätter <7329802+jochenkirstaetter@users.noreply.github.com>
@jochenkirstaetter

Copy link
Copy Markdown
Contributor Author

Updated with linux-4-media and integrated @thtbee's Part 5 review fixes from linux-review-fixes (64d36fc — on-demand FUSE directory/file fetching via StorageListing::request and StorageDownload::fetch, ENOENT negative caching, and fusermount3 -u -z teardown). Huge thanks @thtbee for the collaborative effort!

@thtbee thtbee left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Reviewed on the final branch (0b37495) along with the rest of the series: all findings addressed, and Linux and Windows checks, the FUSE end-to-end run and the package builds pass. Thank you.

@thtbee
thtbee merged commit bfd5522 into thtbee:main Oct 23, 2026
9 checks passed
@jochenkirstaetter
jochenkirstaetter deleted the linux-5-storage branch October 24, 2026 00:40
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.

2 participants