-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
D-Bus Activation #457
base: master
Are you sure you want to change the base?
D-Bus Activation #457
Conversation
@@ -0,0 +1,5 @@ | |||
[D-BUS Service] | |||
Name=io.github.joseexposito.Touchegg | |||
Exec=/usr/bin/touchegg --daemon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exec=/usr/bin/touchegg --daemon | |
Exec=/bin/false |
This will call the SystemdService
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for looking into this 😄 I tried that and there seems to be 2 major issues:
- Installation from deb package hangs until the service times out, even thought the service is running in the background
- The service stars even when no clients are connected and crashes every 2 minutes:
Feb 20 12:14:57 elementary-os systemd[1]: touchegg.service: start operation timed out. Terminating.
Feb 20 12:14:58 elementary-os systemd[1]: touchegg.service: Failed with result 'timeout'.
Feb 20 12:14:58 elementary-os systemd[1]: Failed to start Touchégg Daemon.
It seems like the service is not waiting for the creation of the D-Bus interface even with /bin/false
🤔
Fedora has some documentation for creating DBus-activated systemd services here, maybe it helps: |
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. |
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 |
Trying to fix #456