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

how to create notification icon without starting dbus? #58

Closed
bdantas opened this issue Oct 15, 2019 · 6 comments
Closed

how to create notification icon without starting dbus? #58

bdantas opened this issue Oct 15, 2019 · 6 comments

Comments

@bdantas
Copy link

bdantas commented Oct 15, 2019

I'm trying to get rid of dbus on my system. I'm almost there but yad (one of my very favorite utilities) starts dbus when it creates notification icon:

bruno@box:~$ pgrep -fa dbus
bruno@box:~$ yad --notification --image=dialog-ok --text="testing" &
bruno@box:~$ pgrep -fa dbus
8504 dbus-launch --autolaunch b67e35c57ed5e6cf8ef0f5b65da5d7b3 --binary-syntax --close-stderr
8505 /usr/local/bin/dbus-daemon --syslog-only --fork --print-pid 5 --print-address 7 --session
8511 /usr/local/bin/dbus-daemon --config-file=/usr/local/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3

Is it possible for yad to create notification icons without starting dbus?

@v1cont
Copy link
Owner

v1cont commented Oct 16, 2019

is the behavior with dbus the same for other types of yad dialog or dbus started only for notifications?

@bdantas
Copy link
Author

bdantas commented Oct 16, 2019

Behavior is the same for other types of dialog. Sorry for the misleading issue title (I almost always use yad for notification icons).

Interestingly, yad works fine if I uninstall dbus. So it's puzzling why yad consistently starts dbus if dbus is installed but not already running.

@v1cont
Copy link
Owner

v1cont commented Oct 16, 2019

looks like this is gsettings issue. you can try to build yad with --enable-standalone configure option, but i'm not sure that this will helpful, because gtk3 itself already uses gsettings features for file and color dialogs

@bdantas
Copy link
Author

bdantas commented Oct 16, 2019

I rebuilt latest git with --enable-standalone and it made no difference.

Using this application (https://github.com/jonhoo/mktrayicon) (compiled against gtk3) to create a notification icon does not cause dbus to start, so I don't think it's a gtk3 issue.

Also, I substituted /usr/local/bin/dbus-launch with a shell script that logs PID and PPID, then launched yad. The log shows me that the parent of dbus-launch is yad, proving that at some point yad itself is calling dbus-launch for some reason.

@v1cont
Copy link
Owner

v1cont commented Oct 16, 2019

try to do "export NO_AT_BRIDGE=1" before running yad

@bdantas
Copy link
Author

bdantas commented Oct 16, 2019

Yes, now yad runs without starting dbus. Great! Thank you.

@bdantas bdantas closed this as completed Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants