The officially official Devuan Forum!

You are not logged in.

#1 2019-10-15 12:29:25

GNUser
Member
Registered: 2017-03-16
Posts: 489  

yad without dbus? [SOLVED]

I've noticed that yad starts dbus. I'm not happy about it because none of the other applications I use require dbus, and yad is very handy.

Is there a way to use yad without starting dbus? If not, are you aware of an alternative to yad? I basically only use it to create system tray icons with tooltips.

Last edited by GNUser (2019-10-16 19:53:11)

Offline

#2 2019-10-15 14:24:31

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,248  

Re: yad without dbus? [SOLVED]

I have yad installed and working in a no-dbus system. (live iso)  There are some dbus libs installed, but not dbus itself. Yad's deps don't include any dbus packages. What are you seeing?

Offline

#3 2019-10-15 14:34:21

GNUser
Member
Registered: 2017-03-16
Posts: 489  

Re: yad without dbus? [SOLVED]

I use fluxbox, which does not require dbus. However, I do have dbus installed because I sometimes use Thunderbird and Filezilla, which require it.

Notice how dbus is not running before yad, but rears its ugly head when yad creates a system tray 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

Offline

#4 2019-10-15 14:45:25

GNUser
Member
Registered: 2017-03-16
Posts: 489  

Re: yad without dbus? [SOLVED]

@fsmithred - On your no-dbus system, are you able to create a system tray icon using yad? What happens when you run $ yad --notification --image=dialog-ok --text="testing" &?

Offline

#5 2019-10-15 16:55:21

GNUser
Member
Registered: 2017-03-16
Posts: 489  

Re: yad without dbus? [SOLVED]

While trying to solve this issue, I discovered this little gem:

https://github.com/jonhoo/mktrayicon

You can compile it with this command:

gcc `pkg-config --cflags gtk+-3.0` mktrayicon.c -lX11 -o mktrayicon `pkg-config --libs gtk+-3.0`

If, like me, you want to use custom icons instead of stock icons, just change the two instances of gtk_status_icon_set_from_icon_name in mktrayicon.c to gtk_status_icon_set_from_file before you compile it.

P.S. I'm still interested in solving this issue--learning how to create systray icons with yad without dbus being started.

Last edited by GNUser (2019-10-15 16:57:51)

Offline

#6 2019-10-15 17:24:02

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,248  

Re: yad without dbus? [SOLVED]

GNUser wrote:

@fsmithred - On your no-dbus system, are you able to create a system tray icon using yad? What happens when you run $ yad --notification --image=dialog-ok --text="testing" &?

I get a notification icon in lxpanel. I can't tell what it is - maybe a bell - it's light on lighter background. If I use dialog-warning, then I get the warning icon, which is easy to recognize. It just works. I don't know why. The only new process that shows up is the yad command. Using this iso: https://get.refracta.org/files/experime … -04-16.iso


UPDATE: If I run the same command on my ascii/xfce with dbus, I get the icon in the systray and no additional instances of dbus in ps output. If I run strace on that command, the string 'dbus' does not appear in the output.

Offline

#7 2019-10-15 17:44:46

GNUser
Member
Registered: 2017-03-16
Posts: 489  

Re: yad without dbus? [SOLVED]

Thank you for that, fsmithred.

I can confirm that if I remove the executable bit from dbus-launch and dbus-daemon, yad is still able to create the notification icon. However, if dbus-launch and dbus-daemon are executable, dbus is consistently launched each time yad creates an icon. This is very strange.

I'll ask yad's developer and will keep exploring. I'll take a look at some PPIDs to exclude the possibility that some other utility/daemon is starting dbus when yad is detected.

Offline

#8 2019-10-16 19:52:32

GNUser
Member
Registered: 2017-03-16
Posts: 489  

Re: yad without dbus? [SOLVED]

yad developer's workaround (see https://github.com/v1cont/yad/issues/58):

NO_AT_BRIDGE=1 yad <arguments>

I don't understand why it works, but it does. I need to educate myself further.

I also found this much simpler alternative to yad, which does everything I need:
https://github.com/jonhoo/mktrayicon

Last edited by GNUser (2019-10-16 19:52:56)

Offline

Board footer