Giter Club home page Giter Club logo

Comments (8)

eworm-de avatar eworm-de commented on July 30, 2024

Just pushed 11b436d to branch systemd.
Not sure if it changes anything for you, though. Want to give it a try?

When did this start to break? Did it work reliable before?

from mpd-notification.

petronny avatar petronny commented on July 30, 2024

Thank you but I still get Connection refused after updated to 11b436d .
My workaround is create a script to delay 3 seconds, then run mpd-notification.

#!/bin/sh
sleep 3
/usr/bin/mpd-notification
After=mpd.service
...
ExecStart=/somewhere/to/the/script.sh

Of course it is a little ugly...
How about creating a loop to connect to the server every period time in mpd-notification.c?

from mpd-notification.

eworm-de avatar eworm-de commented on July 30, 2024

Forced sleep times and connecting in loop are really ugly workarounds. Usually systemd should get this right, otherwise the software (mpd in this case) is broken.

Let's try something different. Could you please edit /usr/lib/systemd/user/mpd.service and add a line

Type=forking

and change the ExecStart= line to

ExecStart=/usr/bin/mpd

The complete file should look something like this:

[Unit]
Description=Music Player Daemon
After=network.target sound.target

[Service]
Type=forking
ExecStart=/usr/bin/mpd

# allow MPD to use real-time priority 50
LimitRTPRIO=50
LimitRTTIME=infinity

[Install]
WantedBy=default.target

from mpd-notification.

eworm-de avatar eworm-de commented on July 30, 2024

Or you could try with

Type=notify

as committed upstream: systemd: set Type=notify

from mpd-notification.

eworm-de avatar eworm-de commented on July 30, 2024

Ah, this will not (yet) work... It needs another commit at compile time: Main: notify systemd when MPD is ready

from mpd-notification.

eworm-de avatar eworm-de commented on July 30, 2024

Ok, let's use a workaround until real fixes linked above make its way into a release.
Can you try branch systemd with 67c75e3?

from mpd-notification.

eworm-de avatar eworm-de commented on July 30, 2024

Closed with 67c75e3.

from mpd-notification.

eworm-de avatar eworm-de commented on July 30, 2024

I reverted this in master, should just work with mpd version 0.20 now. Can you give it a try?

from mpd-notification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.