diff --git a/CMakeLists.txt b/CMakeLists.txt index 4791ea40..3d655af3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/installation/io.github.joseexposito.Touchegg.service b/installation/io.github.joseexposito.Touchegg.service new file mode 100644 index 00000000..36e36a35 --- /dev/null +++ b/installation/io.github.joseexposito.Touchegg.service @@ -0,0 +1,5 @@ +[D-BUS Service] +Name=io.github.joseexposito.Touchegg +Exec=/usr/bin/touchegg --daemon +User=root +SystemdService=touchegg.service diff --git a/installation/touchegg.service b/installation/touchegg.service index de392007..4799774c 100644 --- a/installation/touchegg.service +++ b/installation/touchegg.service @@ -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