touchegg icon indicating copy to clipboard operation
touchegg copied to clipboard

D-Bus Activation

Open JoseExposito opened this issue 3 years ago • 3 comments

Trying to fix https://github.com/JoseExposito/touchegg/issues/456

JoseExposito avatar Feb 19 '21 07:02 JoseExposito

Fedora has some documentation for creating DBus-activated systemd services here, maybe it helps: https://fedoraproject.org/wiki/Packaging:Systemd#DBus_activation

decathorpe avatar Aug 06 '21 09:08 decathorpe

I'm not 100% sure but I think the issues here are because touchégg doesn't run on the DBus bus. It's creates a UNIX socket that the clients connect to and uses the DBus protocol over that.

So systemd probably can't recognise that a client is connecting and activate the service as a result.

This would actually need to be more like a socket activated service which is also possible with systemd. But... The server needs to be able to take the file descriptor of the socket that systemd has created and passed on startup and use that instead of creating a new socket. I can't see a way to do that with the GLib DBus libraries used here.

davidmhewitt avatar Oct 09 '21 13:10 davidmhewitt

I think that's probably the reason @davidmhewitt. I didn't test it, but I'm sure that moving the connection to the system or session bus will solve it.

Ideally we should keep the UNIX socket for a while for backwards compatibility... I just wasn't motivated to do it

JoseExposito avatar Oct 09 '21 18:10 JoseExposito