Spotifyd / spotifyd

A spotify daemon
https://spotifyd.rs
GNU General Public License v3.0
9.83k stars 450 forks source link

Update docs: system wide services cannot access a user keyring #1248

Closed sepastian closed 6 months ago

sepastian commented 9 months ago

Description

The documentation describes hot to store login credentials in the user's keyring, either by specifying use_keyring=true in the configuration or by specifying --use-keyring on the command line. The documentation also explains how to run spotifyd in systemd, as either a user service or as a system service.

However, running as a system service rules out the option of using the user's keyring, because a system service cannot access a specific user's keyring. There is not mention about this in the documentation and it took me a while to figure out. While searching for a solution I came across questions from other users who faced the same problem.

I'm providing PR #1247 to update the documentation accordingly.

To Reproduce

Run spotifyd as a system service and try to access the user's keyring.

Expected behavior

Spotifyd fails to start, this is expected behavior.

Just update the documentation accordingly.

Logs

Click to view logs ``` Dec 13 14:10:39 x220 systemd[1]: Started spotifyd.service - A spotify playing daemon. Dec 13 14:10:39 x220 spotifyd[17969]: No config file specified. Running with default values Dec 13 14:10:39 x220 spotifyd[17969]: No password specified. Checking password_cmd Dec 13 14:10:39 x220 spotifyd[17969]: No password_cmd specified Dec 13 14:10:39 x220 spotifyd[17969]: No proxy specified Dec 13 14:10:39 x220 spotifyd[17969]: Using software volume controller. Dec 13 14:10:39 x220 spotifyd[17969]: Checking keyring for password Dec 13 14:10:39 x220 spotifyd[17969]: Keyring did not return any results: Platform secure storage failure> Dec 13 14:10:39 x220 spotifyd[17969]: no usable credentials found, enabling discovery Dec 13 14:10:39 x220 spotifyd[17969]: The application panicked (crashed). Dec 13 14:10:39 x220 spotifyd[17969]: Message: called `Result::unwrap()` on an `Err` value: DnsSdError(O> Dec 13 14:10:39 x220 spotifyd[17969]: Location: src/setup.rs:105 Dec 13 14:10:39 x220 spotifyd[17969]: Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable t> Dec 13 14:10:39 x220 spotifyd[17969]: Run with RUST_BACKTRACE=full to include source snippets. Dec 13 14:10:39 x220 systemd[1]: spotifyd.service: Main process exited, code=exited, status=101/n/a Dec 13 14:10:39 x220 systemd[1]: spotifyd.service: Failed with result 'exit-code'. Dec 13 14:10:42 x220 systemd[1]: spotifyd.service: Failed to schedule restart job: Unit spotifyd.service > Dec 13 14:10:42 x220 systemd[1]: spotifyd.service: Failed with result 'exit-code'. ```

Compilation flags

Versions (please complete the following information):

eladyn commented 6 months ago

Addressed within PR #1247.