Toqozz / wired-notify

Lightweight notification daemon with highly customizable layout blocks, written in Rust.
MIT License
581 stars 27 forks source link

Failed to get a session bus #118

Closed SolonRubens closed 8 months ago

SolonRubens commented 1 year ago

I have a fresh install of wired self builded from github

When I try running wired as a normal user I get the following error:

$ ./target/release/wired
Found a config file: /home/solon/.config/wired/wired.ron, but couldn't load it, so will use default one for now.
If you fix the error the config will be reloaded automatically.
    Error: Problem with config file: 3:1: Expected struct

A wired socket exists; taking ownership.  Existing wired processes will not receive CLI calls.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }', src/cli.rs:50:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

And when I run it as sudo it says

# sudo ./target/release/wired
Found a config file: /home/solon/.config/wired/wired.ron, but couldn't load it, so will use default one for now.
If you fix the error the config will be reloaded automatically.
    Error: Problem with config file: 3:1: Expected struct

A wired socket exists; taking ownership.  Existing wired processes will not receive CLI calls.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }', src/cli.rs:50:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I couldn't find anything about it here or on the internet. I'm thankfull for every help

Toqozz commented 1 year ago

Seems like it's struggling to remove the existing socket (/tmp/wired.sock). Can you remove it manually and try again?

This happens when you've run wired as admin or a different user, so the socket gets created with permissions we can't access. Maybe I should try changing the perms when we create it.

I should also update the error to be more descriptive.

Toqozz commented 8 months ago

Closing as now the error is more descriptive.