Created attachment 7293 An error message as described in the bug report. Hello, TL;DR: I was trying to refresh genmon on xfce-panel running on my user using root and failed with a non explanatory error message, I'm trying to do this so I can refresh genmon display using udev. Long version: First I would like to present my goal, I'm a Manjaro user: I want to have a genmon item showing me the current battery status for my phone connecting via USB cable with adb (debug mode enabled). I configured my genmon correctly, I even have error handling mechanism for when my device is being disconnected and the "adb shell" command would fail. And then I realized I want more, I want the genmon script to be refreshed when I'm plugging or unplugging my device so I wrote a simple udev script, I think now is the right time to mention that the udev scripts are running as the "root" user. So I tried refreshing my genmon display using this command: /usr/bin/xfce4-panel --plugin-event=genmon-10:refresh:bool:true But it didn't work. So I tried switching to root and then running this command again to simulate the udev environment, the command failed due to missing display so I added --display=:0. Now I got a "protocol undefined" so I switched to my user with su so the command looks something like: su yaron -c "/usr/bin/xfce4-panel --plugin-event=genmon-10:refresh:bool:true --display=:0" Now I'm getting a dialog with the following details: Title: Failed to send D-Bus message Message body: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead (Screenshot attached). I Googled the issue and on some bug reports devs were saying this is a really old version so I tried looking at the version myself. So apparently I'm using the latest version: xfce4-panel 4.12.1 (Xfce 4.12) Copyright (c) 2004-2011 The Xfce development team. All rights reserved. Please report bugs to <http://bugzilla.xfce.org/>. If I'm doing something wrong please tell me, if there's something I can fix myself I'd love that.
I believe this is an issue with running it as root and root not having access to your user's dbus session. Try using the following command: su yaron -c "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus /usr/bin/xfce4-panel --plugin-event=genmon-10:refresh:bool:true" ...and replace the 1000 with the actual userid of yaron (id -u).
That's correct, thank you.
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/172. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev