Skip to content

net-vm,gui-vm: Enhance xdg-dbus-proxy with system bus D-Bus proxy#1432

Merged
brianmcgillion merged 1 commit intotiiuae:mainfrom
jkuro-tii:dbus-proxy
Nov 17, 2025
Merged

net-vm,gui-vm: Enhance xdg-dbus-proxy with system bus D-Bus proxy#1432
brianmcgillion merged 1 commit intotiiuae:mainfrom
jkuro-tii:dbus-proxy

Conversation

@jkuro-tii
Copy link
Copy Markdown
Contributor

@jkuro-tii jkuro-tii commented Sep 24, 2025

Description of Changes

D-Bus Proxy Changes for Ghaf

What Changed

net-vm:
Updated xdg-proxy-config to expose NetworkManager's D-Bus interface to other VMs
gui-vm:
Added dbus-proxy service that:
Connects to net-vm's NetworkManager
Claims NetworkManager's name on local system bus
Exchanges all D-Bus traffic between nm-applet and NetworkManager
Connection:
Reused existing socket connections between VMs
No new security holes or connections needed
nm-applet:
Now connects to local system bus instead of trying to reach net-vm directly
Works normally without knowing NetworkManager is in another VM
Why It Works
The proxy makes NetworkManager in net-vm appear as if it's running locally in gui-vm. nm-applet talks to what it thinks is a local NetworkManager, but the proxy in background forwards everything to net-vm.
This keeps the network isolated in net-vm while letting users control it from gui-vm.

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

Boot Ghaf
Verify both net-vm and gui-vm start successfully
Check dbus-proxy service is running in gui-vm: systemctl status dbus-proxy.service

Log in and verify nm-applet
Check nm-applet icon appears in system tray
Click icon - menu should show available networks
Connect to a WiFi network (verify password prompt works)
Disconnect from network
Toggle WiFi on/off
Disconnect/reconnect USB network card
Check "Connection Information" displays correct IP/DNS details
Verify network changes reflect immediately in icon

Test resilience
Logout, login
Verify nm-applet reconnects
Restart net-vm: sudo systemctl restart microvm@net-vm.service (on host)
Verify it reconnects once net-vm is back (waiting period may be around 10-20 secs)
Restart nm-apple servicet: systemctl --user restart nm-applet.service (under logged in user)
Should reconnect without proxy restart

@kajusnau
Copy link
Copy Markdown
Collaborator

Really promising stuff!
This might allow us to enable cosmic-settings app Network page and others further down the line without further tinkering

@vadika
Copy link
Copy Markdown
Contributor

vadika commented Sep 25, 2025 via email

@jkuro-tii
Copy link
Copy Markdown
Contributor Author

NetworkManager Integration

Introduced --nm-mode parameter
Bridges nm-applet's SecretAgent interface with NetworkManager
Enables proper secret storage and retrieval for network connections
Essential for systems using NetworkManager with desktop applets

@kajusnau
Copy link
Copy Markdown
Collaborator

kajusnau commented Oct 13, 2025

Tested on darp11-b:

  • nm-applet shows up
  • nm-applet network discovery, connect, disconnect functionalities work

Additional:

Really promising stuff! This might allow us to enable cosmic-settings app Network page and others further down the line without further tinkering

Cosmic settings app Network page works as intended - networks are listed, can be disconnected/connected, Wi-Fi can be disabled/enabled, new connections can be added.

Great work!

Copy link
Copy Markdown
Collaborator

@kajusnau kajusnau left a comment

Choose a reason for hiding this comment

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

Some minor changes

Please also enable Cosmic settings network page, as it seems to work as intended with this proxy:

# in overlays/custom-packages/cosmic/cosmic-settings/default.nix
# uncomment line 23:

"page-networking"

@jkuro-tii jkuro-tii marked this pull request as ready for review November 14, 2025 07:36
@brianmcgillion brianmcgillion added the Needs Testing CI Team to pre-verify label Nov 14, 2025
@milva-unikie
Copy link
Copy Markdown

Tested on Darter Pro (nixos-rebuild switch)

All seems to be working nicely!

  • Was able to complete all testing steps (there is no dbus-proxy.service in gui-vm but dbus-proxy-networkmanager.service is running)
  • Cosmic Settings Network & Wireless page works for Wi-Fi and Wired
  • Connecting to Wi-Fi from the Cosmic Initial Setup works

@milva-unikie milva-unikie added Tested on System76 and removed Needs Testing CI Team to pre-verify labels Nov 14, 2025
    Switch nm-applet from private xdg-dbus-proxy to system bus connection.
    Previously nm-applet used its own bus with xdg-dbus-proxy in net-vm.
    Now uses local dbus-proxy service on gui-vm system bus instead.

Signed-off-by: Jaroslaw Kurowski <jaroslaw.kurowski@tii.ae>
@brianmcgillion brianmcgillion merged commit 247265f into tiiuae:main Nov 17, 2025
28 checks passed
@jkuro-tii jkuro-tii deleted the dbus-proxy branch November 17, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants