input-remapper
input-remapper copied to clipboard
CLI Has Different Devices Listed in Sudo vs User
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.
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:
input-remapper-reader-serviceis a separate process, what happens when both the GUI and theinput-remapper-controlis running? (possible race-condition?)- when the GUI runnig will there be two
input-remapper-reader-serviceprocesses or one? input-remapper-control --command startalso needs to know about the devices- since this requires root and we are at the command line, make sure that the password prompt is on the command line and not the GUI?
I will not be working on this for a while. If anyone wants to pick this up I am happy to answer questions.
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!
maybe this can help: https://bbs.archlinux.org/viewtopic.php?id=273094