sezanzeb / input-remapper

🎮 ⌨ An easy to use tool to change the behaviour of your input devices.
GNU General Public License v3.0
3.89k stars 161 forks source link

CLI Has Different Devices Listed in Sudo vs User #732

Open DefsNotQuack opened 1 year ago

DefsNotQuack commented 1 year ago

When using the CLI control interface and trying to list devices, I get two different lists of devices between super user and my user

As user: user@fedora:~$ input-remapper-control --list-devices Sony Interactive Entertainment DualSense Wireless Controller

As super user: user@fedora:~$ sudo input-remapper-control --list-devices Sony Interactive Entertainment DualSense Wireless Controller Razer Razer Naga Pro Video Bus Logitech USB Receiver Razer Razer Tartarus V2

This means that I am unable to control or begin injections through the CLI without actually being in terminal and issuing it.

I have tried running the underlying service as my user to no avail.

jonasBoss commented 1 year ago

that is right input-remapper-control --list-devices does not communicate with the service, and therefore only has the user permissions. The user does not have permissions to read all devices.


possible solution: The GUI gets around this issue by starting the bin/input-remapper-reader-service as root. The class ReaderClient in in charge of that. It might be possible to modify bin/input-remapper-control to utilize the ReaderClient and do a similar thing. There are a few things that need to be considered:

I will not be working on this for a while. If anyone wants to pick this up I am happy to answer questions.

DefsNotQuack commented 1 year ago

Makes sense, so it is a non-issue really.

Is there a way to allow the user access to more / all devices? What determines which devices the user has access to?

Thanks for your response mate!

jonasBoss commented 1 year ago

maybe this can help: https://bbs.archlinux.org/viewtopic.php?id=273094