diff --git a/linux/ibus-keyman/meson.build b/linux/ibus-keyman/meson.build index 5a8958e983f..18c9e2b09df 100644 --- a/linux/ibus-keyman/meson.build +++ b/linux/ibus-keyman/meson.build @@ -8,7 +8,7 @@ conf = configuration_data() ibus = dependency('ibus-1.0', version: '>= 1.2.0') gtk = dependency('gtk+-3.0', version: '>= 2.4') json_glib = dependency('json-glib-1.0', version: '>= 1.0') -systemd = dependency('libsystemd') +systemd = dependency('libsystemd', 'libelogind') icu = dependency('icu-i18n') core_dir = meson.current_source_dir() / '../../core' diff --git a/linux/keyman-system-service/meson.build b/linux/keyman-system-service/meson.build index 66da8f98914..07e0e971fb7 100644 --- a/linux/keyman-system-service/meson.build +++ b/linux/keyman-system-service/meson.build @@ -4,7 +4,7 @@ project('keyman-system-service', 'c', 'cpp', meson_version: '>=0.61') evdev = dependency('libevdev', version: '>= 1.9') -systemd = dependency('libsystemd') +systemd = dependency('libsystemd', 'libelogind') subdir('resources') subdir('src') diff --git a/linux/keyman-system-service/resources/com.keyman.SystemService1.service.libelogind b/linux/keyman-system-service/resources/com.keyman.SystemService1.service.libelogind new file mode 100644 index 00000000000..fbc612005ff --- /dev/null +++ b/linux/keyman-system-service/resources/com.keyman.SystemService1.service.libelogind @@ -0,0 +1,7 @@ +# /usr/share/dbus-1/system-services/com.keyman.SystemService1.service +# This version used with elogind (e.g. on Gentoo) + +[D-BUS Service] +Name=com.keyman.SystemService1 +Exec=/usr/libexec/systemd-keyman.service +User=root diff --git a/linux/keyman-system-service/resources/com.keyman.SystemService1.service b/linux/keyman-system-service/resources/com.keyman.SystemService1.service.libsystemd similarity index 78% rename from linux/keyman-system-service/resources/com.keyman.SystemService1.service rename to linux/keyman-system-service/resources/com.keyman.SystemService1.service.libsystemd index 3966fb1bbcb..65acc4067a4 100644 --- a/linux/keyman-system-service/resources/com.keyman.SystemService1.service +++ b/linux/keyman-system-service/resources/com.keyman.SystemService1.service.libsystemd @@ -1,4 +1,5 @@ # /usr/share/dbus-1/system-services/com.keyman.SystemService1.service +# This version used with systemd (e.g. on Debian) [D-BUS Service] Name=com.keyman.SystemService1 diff --git a/linux/keyman-system-service/resources/meson.build b/linux/keyman-system-service/resources/meson.build index c28cb81e585..a63ecf49fc9 100644 --- a/linux/keyman-system-service/resources/meson.build +++ b/linux/keyman-system-service/resources/meson.build @@ -1,3 +1,3 @@ install_data('com.keyman.SystemService1.conf', install_dir: get_option('datadir') / 'dbus-1/system.d/') -install_data('com.keyman.SystemService1.service', install_dir: get_option('datadir') / 'dbus-1/system-services/') +install_data('com.keyman.SystemService1.service.' + systemd.name(), install_dir: get_option('datadir') / 'dbus-1/system-services/', rename: ['com.keyman.SystemService1.service']) install_data('systemd-keyman.service', install_dir: get_option('prefix') / 'lib/systemd/system/')