#1115172 kanata: the service fails to start with a permission error

#1115172#5
Date:
2025-09-13 22:41:00 UTC
From:
To:
Dear Maintainer,

Thank you very much for packaging kanata in Debian! It is great to have
it in the archive.

Unfortunately, I was not able to make it run from the systemd service:
it fails with the following error

kanata[4769]: 00:20:35.4782 [INFO] kanata v1.9.0 starting
kanata[4769]: 00:20:35.4783 [INFO] process unmapped keys: false
kanata[4769]: 00:20:35.4783 [INFO] NOTE: kanata was compiled to never allow cmd
kanata[4769]: 00:20:35.4783 [INFO] config file is valid
kanata[4769]: 00:20:35.4784 [ERROR] Failed to open the output uinput device. Make sure you've added the user executing kanata to the `uinput` group
kanata[4769]: 00:20:35.4784 [ERROR] Permission denied (os error 13)
kanata[4769]: Press enter to exit
kanata[4769]: Error: Permission denied (os error 13)
systemd[1]: kanata.service: Main process exited, code=exited, status=1/FAILURE

Is there something I could or should do to fix this permission problem?
Is the systemd service too restrictive?
Thanks in advance!

Cédric

#1115172#10
Date:
2025-09-14 20:36:30 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
rust-kanata, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1115172@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Agathe Porte <gagath@debian.org> (supplier of updated rust-kanata package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 14 Sep 2025 21:46:17 +0200
Source: rust-kanata
Built-For-Profiles: noudeb
Architecture: source
Version: 1.9.0-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Changed-By: Agathe Porte <gagath@debian.org>
Closes: 1115172
Changes:
 rust-kanata (1.9.0-3) unstable; urgency=medium
 .
   * Package kanata 1.9.0 from crates.io using debcargo 2.7.8
   * Create proper _kanata user in input+uinput groups (Closes: #1115172)
Checksums-Sha1:
 a7244dd0eb2ef00046f5bf4b95a108cfc195ae55 3409 rust-kanata_1.9.0-3.dsc
 79dc1d195e8e8415efcd8ef398d5f966aadd4543 11976 rust-kanata_1.9.0-3.debian.tar.xz
 7e823c7cd99eb19341c1637af089525091292056 8260 rust-kanata_1.9.0-3_source.buildinfo
Checksums-Sha256:
 f26e1c5505e13feaf8c9d875a6fbd42af45df2bb08a1969237550b712f9ddbc3 3409 rust-kanata_1.9.0-3.dsc
 1770814d5935bbf1a5e0ff0a73d82abcf67052d79ad6a219957fc38612b97f36 11976 rust-kanata_1.9.0-3.debian.tar.xz
 9c6303735d5b26700c072e4f052a872d787088162fba12e6c3c3dac145dcb476 8260 rust-kanata_1.9.0-3_source.buildinfo
Files:
 d01d813e16facdd8447b8d83ea69c07f 3409 rust optional rust-kanata_1.9.0-3.dsc
 bf4fe060178105e8c18cd9557f63e7d6 11976 rust optional rust-kanata_1.9.0-3.debian.tar.xz
 2db41d280584daf9648a35ec6e1d709c 8260 rust optional rust-kanata_1.9.0-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEE2xMJtrCqCOwoob8cBjaerR0+AQUFAmjHG5QSHGdhZ2F0aEBk
ZWJpYW4ub3JnAAoJEAY2nq0dPgEFOywP/jBYJVYw7bMRtRBFrKuYiMe0OKHqeKj9
3LebsUnJt08Fy78FO23axW//TahLvNFDDrA9D7n6nK6tpW3RamiJFoDjOA/HYcdE
FKBO8kBSnxaK5bAX3IcwW1iRTNP9lJqWG7Q+ON7zkgyn+DPeTZtpPH8mHo+QPdQJ
Nv+Ir/lJCw0IKsW+JxgI9Jog9H84RUx97YoJHmHdNgWOzNgIhOvvy/9lp4q9BHpN
i+Gj15lwaVd6EUyp+OKw2dpRYgbFqjTQXr1YqBdZ5OUk3tra3JA8Ux7LBwyNWoNg
hI0oYzoOtzj9+aqLwiBT7a1uMOZlXjnOCe5n6wDk30Z6AOtcKD+6VMPBPXo1apGs
sZZRR/WlFg+Q6fqFswTvXfGohw/y0zqG3HCmItLeweVbvn5MyXW0C0ReJ3zHEt1P
lFfOkR7+xRfiZfjb78YZH16EdwURH0X541+ByniFtufhiOYZDzFTO2IGZi9H4T92
ElMwFJ1K9ObxqKpt01Slf4RZM4f0BrhY7FPeLPL5yRijZxrsNljmszdM8pnjPIT0
2iSAJur6zyaUI7QcYT6gRgovMWZ0jANyxHgx99rKK2Owuji2oltWath9BDSK6CE5
dV6DHCQR/582qQ7iH5NgAXzrCgxcsfeGMt1qGty93BwKeOt1zao0Coj/lSfqr0JO
1AOW/Z2ey0N9
=/Noi
-----END PGP SIGNATURE-----

#1115172#15
Date:
2025-09-15 08:52:02 UTC
From:
To:
reopen 1115172
found 1115172 kanata/1.9.0-3
thanks

Hi!

I fetched kanata 1.9.0-3 from incoming.debian.org. The part in postinst
adding _kanata user to uinput group complained that the uinput group
didn't exist.

I created a uinput system group. The installation could finish, but I
would still get the same permission error.
I added a udev rule, as in Point 3 from this page
https://github.com/jtroo/kanata/wiki/Avoid-using-sudo-on-Linux
then used udevadm trigger to check that /dev/uinput belongs to the
uinput group, and thus can be used by _kanata user.

Was the uinput group supposed to exist beforehand, or is it the
responsibility of kanata to create this uinput group if it does not
exist?

Thanks!
Cédric

#1115172#26
Date:
2025-09-15 13:14:16 UTC
From:
To:
Hello Cédric,

Thanks for reopening the bug after my last upload. I indeed have a local
udev rule that I forgot to add into the package. I will add it, upload a
new version, and that should be fixed.

Instead of creating a dedicated uinput group that might collide with
existing groups of the system, I will add the /dev/uinput file to the
input group, and since the new _kanata user is a member of that group,
it should fix the access issue.

Thanks for bug reporting and following!

Agathe.

#1115172#31
Date:
2025-09-15 14:40:50 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
rust-kanata, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1115172@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Agathe Porte <gagath@debian.org> (supplier of updated rust-kanata package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 15 Sep 2025 15:42:04 +0200
Source: rust-kanata
Built-For-Profiles: noudeb
Architecture: source
Version: 1.9.0-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Changed-By: Agathe Porte <gagath@debian.org>
Closes: 1115172
Changes:
 rust-kanata (1.9.0-4) unstable; urgency=medium
 .
   * Package kanata 1.9.0 from crates.io using debcargo 2.7.8
   * Allow input group to access /dev/uinput (Closes: #1115172)
Checksums-Sha1:
 a7b49bfcf7f602fd1a4cc22b74f96f7358fb2b0e 3409 rust-kanata_1.9.0-4.dsc
 562272b80baf2ed6f182d77274f341788391311e 12124 rust-kanata_1.9.0-4.debian.tar.xz
 01e2d1a826e9734c6bf0f93185d8fdbb6ce8004e 8260 rust-kanata_1.9.0-4_source.buildinfo
Checksums-Sha256:
 f59e3b4994d7cfa7fb797e425c874e964b4be883f47272945339e14275a2b72e 3409 rust-kanata_1.9.0-4.dsc
 3ebba5438318244ad78c4f9adeb7f7e6578d898ed15fb07df8afe7a0f8dc5efa 12124 rust-kanata_1.9.0-4.debian.tar.xz
 694eae387689e6c8893de5f78ed2d1da4207616e3a0552421b8bd5b0b30b5b99 8260 rust-kanata_1.9.0-4_source.buildinfo
Files:
 dd1f0816402914f9d72dc80c6517f844 3409 rust optional rust-kanata_1.9.0-4.dsc
 100046bba94abcd53b6ea7c7a8ccfe0f 12124 rust optional rust-kanata_1.9.0-4.debian.tar.xz
 8742f2397e8a260a8d64979703f6eac6 8260 rust optional rust-kanata_1.9.0-4_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEE2xMJtrCqCOwoob8cBjaerR0+AQUFAmjIF7MSHGdhZ2F0aEBk
ZWJpYW4ub3JnAAoJEAY2nq0dPgEFHIkP/362LnK6/8hxu48zU/YCFAQYePMwzk3V
mO2siFLltBKwgZ/9FbRKSFiA/HRW//VfLGcaRd4JJqT/dEWiTVooP7KMBIv+685G
mXMT3EJJWUCk4WHeaHj4SG+YMP7FIzlw/Ev8A+Ct3RdE5X9l5y9b2ZSQGnQHJzHr
NDwnvFdjyIuhUbyM4+0ypMETXwqCbqM4lYzx5bvlpYIRXOWHjQdsDYvPjxoxVgI4
WJPAae4fXdLC2AXjRZx/NlRotao95mX2QNo8N/XCrHj5KQ02JLqEsOOjPUtedFsG
f0r8Mjw/oGnfAwLSs0c2GscSSSknZXtuvkGPGRyxNmiB+QdUIPNjrdVTPR21FjTx
fhoPV/WhKsWam0AnPtQq8SE+gwVu8TzYcPcHsRu7CGX64aTiMuq2awl8Cm1M2qVC
SUVQHdVmSFB8zekMoRBMVEkzFlWZReHrW7Wl99yRiLn0yb/4qMS+Thf7XfpP1eM2
M5Hewvej8HB0eNZhCGLmYbXNzw1SI9etfW5YN4hgZOZ/jH5btXNJHiG7745NEUo6
gBsC/DGVSs0sck8mNN2C0zuFVKkPYpp3EA6Cl+3gNfeACGRbLxFFrwsTK7wN8/EO
DEs0f8s7fCUJUsbJ1OJC8yJk78scIZi7BwGAcIk1jLMPDZ3VaNG3t+mwnIBZLruH
bY0xneWaEEcY
=Kwzf
-----END PGP SIGNATURE-----

#1115172#36
Date:
2025-09-15 17:17:34 UTC
From:
To:
Dear Agathe,

Thanks for your reactivity. I had a last minor issue with 1.9.0-4. I got
an error at installation, because the uinput group was not existing. I
modified the kanata.posting with the following patch, and it now works
as expected thanks to your udev rule.
--- /tmp/kanata.postinst 2025-09-15 19:13:24.021349417 +0200 +++ kanata.postinst 2025-09-15 19:14:19.823344660 +0200 @@ -9,7 +9,7 @@ useradd --system _kanata fi - usermod -aG uinput,input _kanata + usermod -aG input _kanata deb-systemd-invoke restart systemd-udevd || true ;; And thanks a lot again for packaging this cool software. It is so great to be able to just apt install it! Cédric
#1115172#41
Date:
2025-09-16 10:26:09 UTC
From:
To:
Hello again,

2025-09-15 19:17 CEST, Cédric Boutillier:

Nice catch, I have uploaded 1.9.4-5 that should fix this issue. Do not
hesitate to open other bugs if you see any area of improvement regarding
the package.

Agathe.

#1115172#50
Date:
2025-09-17 09:45:26 UTC
From:
To:
done