Connect to system bus instead of session bus

This commit is contained in:
Elias Schriefer 2020-08-30 16:33:29 +02:00
parent 06a7aea979
commit bb51ff77b1

View File

@ -25,7 +25,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
cr.insert("/", &[], ());
// Connect with D-Bus
let (resource, c) = dbus_tokio::connection::new_session_sync()?;
let (resource, c) = dbus_tokio::connection::new_system_sync()?;
debug!("D-Bus unique name: {}", c.unique_name());
// Spawn a new task for the D-Bus resource