-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add config option to use the system bus. #10
Conversation
f5b6775
to
0775fae
Compare
Travis doesn't like this. |
@@ -5,6 +5,7 @@ | |||
|
|||
import pykka | |||
|
|||
from mopidy import exceptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mopidy_mpris/frontend.py:8:1: F401 'exceptions' imported but unused
Well, the other failure isn't actually yours but it's still broken |
Yeah, build 46.1 fails because of a missing dependency or something, which is not my fault, and 46.2 fails because I forgot to remove that import when I didn't use it anymore. I'll fix the import later today. |
This commit adds a config option to use the system bus instead of the session bus. This change makes it possible to expose Mopidy through an MPRIS interface even when it's run in its own user without a session bus. This commit relates closely to issue mopidy#9, and might solve it as far as possible within the scope of this extension. The check for whether the `$DISPLAY` X11 environment variable is set is removed from the `validate_environment(self)` method in the main Extension class. Dbus will take care of this error, and there is already logic to handle it in the code that deals with dbus. the error will now be printed like this: WARNING MPRIS frontend setup failed (org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11) This error message is equally verbose and easy to spot. Signed-off-by: totokaka <mail@totokaka.io>
The last build fixed the Travis build, at least the pyflakes part. The other build failing is due to a missing mopidy module or something. |
Yeah, the other part is my fault for moving stuff in the Mopidy project. I'll work around it in -MPRIS. |
Thanks for taking the time to add this! The tests passed as soon as I made them pass in the master branch again. Since I've let this PR stay untouched for so long, I made some changes myself rather than bug you about them. See commit e0a037c if you're interested. |
This commit adds a config option to use the system bus instead of the session bus. This change makes it possible to expose Mopidy through an MPRIS interface even when it's run in its own user without a session bus.
This commit relates closely to issue #9, and might solve it as far as possible within the scope of this extension.
The check for whether the
$DISPLAY
X11 environment variable is set is removed from thevalidate_environment(self)
method in the main Extension class. Dbus will take care of this error, and there is already logic to handle it in the code that deals with dbus. the error will now be printed like this:This error message is equally verbose and easy to spot.