-
Notifications
You must be signed in to change notification settings - Fork 124
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
Get all events from dbus #269
base: master
Are you sure you want to change the base?
Conversation
Neat! Indeed, this should simplify things. I'm good with installing this by default, but if we do we probably should stop installing the other triggers by default?! And would it make sense to detect whether dbus-monitor is installed? (Though I agree it should be everywhere) |
Right, I can deactivate them in the Makefile
We could add a check in Quick search on that:
|
Ok, after toying around, I understand that the Makefile is not the right place to do that. I guess what we want is to change the default targets in |
|
||
suspend_event="type='signal',interface='org.freedesktop.login1.Manager',member='PrepareForSleep'" | ||
lid_event="type='signal',path=/org/freedesktop/UPower,member=PropertiesChanged" | ||
display_event="type='signal',path=/org/freedesktop/ColorManager" |
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.
Note that this ColorManager
dbus signal comes from colord
, which may not be configured/running for barebone WM-only setups.
See: https://github.com/hughsie/colord/blob/master/src/org.freedesktop.ColorManager.xml
Reading https://www.freedesktop.org/software/colord/intro.html, it says that colord
can send events for multiple subsystems, including xrandr (which is for monitor changes).
This means that with that trigger as is, you'd run autorandr when you plug a webcam or a printer, and I don't think you want that ^^
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.
This is the only way I found to detect newly plugged monitors via dbus. If this triggers when a printer is plugged, I don't think it is a big deal: better trigger too often than not often enough.
Anyway, I have been using this script for 3 years with under i3-wm and it works flawlessly for me.
Is this message expected?
|
This is expected. Without root access, dbus-monitor is unable to monitor
anything but signals on the system bus. AFAIK this is ok, because this
script only monitor signals
…On Wed, Jul 12, 2023 at 12:45 PM Nikolaus Rath ***@***.***> wrote:
Is this message expected?
dbus-monitor: unable to enable new-style monitoring: org.freedesktop.DBus.Error.AccessDenied: "Rejected send message, 1 matched rules; type="method_call", sender=":1.451" (uid=1000 pid=1194668 comm="dbus-monitor --system --profile type='signal',path") interface="org.freedesktop.DBus.Monitoring" member="BecomeMonitor" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)". Falling back to eavesdropping.
—
Reply to this email directly, view it on GitHub
<#269 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABZIMAUSFMD56OSKRLK2GDXPZ55LANCNFSM5ICDS4UA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi there,
autorandr_dbus_monitor
is a script to automatically trigger autorandr based on events collected viadbus-monitor
. If you havedbus
(which is a dependency ofsystemd
), then you havedbus-monitor
.This script will trigger autorandr:
I believe this could replace a lot of code.
Cheers,
Christophe-Marie