Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmus: Starting CMUS without a session bus results in MPRIS error #20744

Closed
flexibeast opened this issue Apr 8, 2020 · 10 comments
Closed

cmus: Starting CMUS without a session bus results in MPRIS error #20744

flexibeast opened this issue Apr 8, 2020 · 10 comments
Labels

Comments

@flexibeast
Copy link
Contributor

Installing and running cmus from the console results in an error message: "an error occured while initializing MPRIS". This line of the cmus source suggests that cmus requires the presence of a session bus (cf. the documentation for sd_bus_default_user), and indeed, running dbus-launch /bin/cmus results in no error being reported on startup.

How should this be addressed? Should the cmus package be modified, or should upstream not be assuming the presence of a session bus?

@ericonr
Copy link
Member

ericonr commented Apr 10, 2020

Do you have the dbus service enabled?

@flexibeast
Copy link
Contributor Author

This issue doesn't affect me personally; it was reported by someone on #voidlinux, who encountered it after trying to run cmus from the console on a fresh Void install.

i found that enabling the dbus service made no difference, which makes sense to me: to make use of the system bus, the cmus code would need to be calling sd_bus_default_system instead of sd_bus_default_user.

My inclination is to say this is an upstream issue, but i'm interested to know how Void handles cases like this - whether the procedure is to try to work around the problem in the packaging, or whether users should be told to raise the issue with upstream.

@ericonr
Copy link
Member

ericonr commented May 6, 2020

Coming back to this, I thik the default procedure is to report the issue and seek a fix. If the fix is deemed important and has been accepted by upstream, we can try to patch it before a release.

@flexibeast
Copy link
Contributor Author

@galmio: Could you please open an issue with upstream about this? My personal feeling is that it's reasonable for people to want to run cmus in a console without a session bus (although of course, that would mean the MPRIS functionality will not be available).

@flexibeast
Copy link
Contributor Author

@galmio: i'm not a cmus user myself, so if you think that's best, sure. :-) Let me know once you've opened that issue, so i can close this as "not a Void issue".

@freshprince
Copy link
Contributor

An error message is shown but cmus continues to function without problems. Also you can disable MPRIS in cmus with :set mpris=false which makes the message disappear on the next launch.

You could consider removing

build_options_default="elogind"

from the template so that this message doesn't show up but this disables the MPRIS feature for everyone else.

Another fix would be to patch the default setting for mpris to false. But I don't think that upstream will fix this. (It seems also that cmus is unmaintained right now.)

@shoober420
Copy link

shoober420 commented Aug 28, 2020

I ran into this bug as well when switching over to Artix Linux. Using Arch with systemd worked fine and a session bus was started automatically. When using s6 and runit, a session bus is not created automatically. I opted to disable MPRIS with the :set mpris=false command.

@ap4y
Copy link
Contributor

ap4y commented Sep 30, 2020

In my case I was starting x session via dbus-launch --sh-syntax --exit-with-session yet was still getting mpris related errors. This one took me a while to figure out, but the problem is that DBUS_SESSION_BUS_ADDRESS was not exposed in my environment. I checked what gentoo does to fix this, since my gentoo machine with a similar setup doesn't have this error, and apparently dbus package adds 80-dbus under /etc/X11/xinit/xinitrc.d when X use flag is enabled. @ericonr I wonder if we should do the same for dbus-x11 and dbus-elogind-x11? I'm happy to send a patch for this.

@ericonr
Copy link
Member

ericonr commented Feb 28, 2021

@ap4y the script can probably be improved a bit, but idk how it interacts with people who have their own setup for starting a bus. Maybe we can create a xorg-dbus package containing it? Not sure it's ideal, but it'd at least avoid being a default.

@github-actions
Copy link

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants