3

I have a Logitech M315 mouse with a nano receiver and have Solaar installed so that I can use it on mu Lubuntu laptop. Solaar runs on startup like I would expect it to, but whenever I plug in my nano receiver Solaar says:

Found a Logitech Receiver (/dev/hidraw1), but did not have permission to open it.

If you've just installed Solaar, try removing the receiver and plugging it back in.

The only way for this message to disappear and get Solaar to work correctly is to open a terminal and runsudo solaar. I take this to mean that it requires root permission to open the USB device read/write. I use Solaar to pair/unpair my devices so having a terminal hanging around all the time is both annoying and RAM-consuming (my laptop only has 512MB physical RAM).

The only way I know how to fix this is from back in my UNIX days where you put it in /etc/profile, but this only runs in Linux is the user logs in at a text mode shell (via a terminal or Ctrl-Alt-F2). Is there another way to give Solaar root permission at startup so that my mouse will work and I can get this annoying message out of my face?

nkeck72
  • 173

1 Answers1

3

You can use a udev rule to give the current seated* user read/write privileges to the HID device representing the Logitech Unifying USB receiver. An example of such a rule can be found in the Solaar rules.d/42-logitech-unify-permissions.rule file.

You mentioned (un)pairing and a M315 mouse. If that is all you need, you can also try the solaar-cli tool which immediately exits after pairing. Alternatively, you can use the small ltunify utility which is describes at this page (basic invocation: ltunify pair and ltunify unpair).

As an additional note on file permissions, do note that anyone who can read from the hidraw device is able to intercept your mouse motions (and keyboard strokes if you have a wireless keyboard). If you are worried about that, do not install the udev rule and instead stick to sudo.

*) seated means the user who is physically at the computer. This excludes SSH users for example who are not physically logged in.

Lekensteyn
  • 178,446