JoseExposito / touchegg

Linux multi-touch gesture recognizer
GNU General Public License v3.0
3.57k stars 167 forks source link

Allow touchegg to be run by systemd on-request #456

Open tintou opened 3 years ago

tintou commented 3 years ago

Is your feature request related to a problem? Please describe

Currently, the systemd config file makes it always start with the session. We can make it run only when it is required

Describe the solution you'd like

Systemd allows to start a service when another component requires its D-Bus service. It would be great to have touchegg only started by systemd when a component (like the compositor) is using it.

Additional context

This has been requested by Fedora maintainer in order to not have touchegg run on a pure GNOME session when installed for the Pantheon session.

JoseExposito commented 3 years ago

Hi @tintou, I'm looking into this issue... Without any luck for the moment.

Have you ever implemented something like this? I'd appreciate your help :smile:

Following the docs, I added a service file in /usr/share/dbus-1/system-services/io.github.joseexposito.Touchegg.service indicating that when a the interface is created it should run the service (SystemdService) and I also modified the current service type to Type=dbus.

However, the service starts running on boot (and fails) instead of waiting for the D-Bus interface to be created :thinking:

Here is the WIP PR: https://github.com/JoseExposito/touchegg/pull/457

m-roberts commented 3 years ago

Not SUPER helpful, but I know that this is how the notification-daemon package works. The actual package that I've seen that provides this is here. Perhaps that can help with reverse-engineering how to get it to behave?