Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ endif()
include(GNUInstallDirs)
set(CMAKE_INSTALL_PREFIX "/usr")
install(FILES ${PROJECT_SOURCE_DIR}/installation/touchegg.conf DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/touchegg) # /usr/share/touchegg/touchegg.conf
install(FILES ${PROJECT_SOURCE_DIR}/installation/io.github.joseexposito.Touchegg.service DESTINATION /usr/share/dbus-1/system-services)
install(FILES ${PROJECT_SOURCE_DIR}/installation/touchegg.service DESTINATION /lib/systemd/system)
install(FILES ${PROJECT_SOURCE_DIR}/installation/touchegg.desktop DESTINATION /etc/xdg/autostart)
# TODO Disabled to test D-Bus activation, re-enable this:
# install(FILES ${PROJECT_SOURCE_DIR}/installation/touchegg.desktop DESTINATION /etc/xdg/autostart)
install(PROGRAMS ${CMAKE_BINARY_DIR}/touchegg DESTINATION ${CMAKE_INSTALL_BINDIR}) # /usr/bin/touchegg

set(CPACK_PACKAGE_NAME touchegg)
Expand Down
5 changes: 5 additions & 0 deletions installation/io.github.joseexposito.Touchegg.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[D-BUS Service]
Name=io.github.joseexposito.Touchegg
Exec=/usr/bin/touchegg --daemon
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Exec=/usr/bin/touchegg --daemon
Exec=/bin/false

This will call the SystemdService

Copy link
Copy Markdown
Owner Author

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 🤔

User=root
SystemdService=touchegg.service
6 changes: 2 additions & 4 deletions installation/touchegg.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ Description=Touchégg Daemon
Documentation=https://github.com/JoseExposito/touchegg/tree/master/installation#readme

[Service]
Type=simple
Type=dbus
BusName=io.github.joseexposito.Touchegg
Group=input
ExecStart=/usr/bin/touchegg --daemon
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target