hoodie / notify-rust

☝️send desktop notifications from your Rust app.
Apache License 2.0
1.13k stars 73 forks source link

Need some help and guidance in ZBus error on Linux #190

Closed earljohn004 closed 1 year ago

earljohn004 commented 1 year ago

Hello,

I am new to rust and notify-rust. I am making some POC for some application and I want to integrate this.

Problem: I am encountering some errors on Linux environment on runtime and I don't understand what is wrong on Linux. I have referred to toastify and this is my current configuration

[dependencies.notify-rust]
version = "4.5"
default-features = false

[features]
default = ["z"]
d = ["notify-rust/d"]
z = ["notify-rust/z"]
images = ["notify-rust/images"]

I have created some helper function in some crate. It looks just like this

use notify_rust::Notification;

pub fn show_toast_notification() -> Result<(), notify_rust::error::Error> {
    Notification::new()
        .summary("Test Summary")
        .body("This is a dummy error. Testing notification")
        .show()?;
    Ok(())
}

I need this to work in cross platform:

I am confused why I am encountering an error in ZBus with "No such file or directory". Maybe you have an idea on what this could mean.

Thank you.