-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential udev issues #6
Comments
With NixOS you might want to use the following:
|
Thanks @FabianRig! Do you know a good way to detect NixOS to determine whether or not this should be suggested? Would you be willing to making a PR for this? |
NixOS works a bit differently than most other distributions. You have to edit a config and can't simply call "apt install ...". Therefore, I don't think it's a good idea to go about this manually. Actually, I'm thinking about adding a NixOS module which would add an option (https://search.nixos.org/options) for labelle/udev... |
@FabianRig, I've been eyeing NixOS, but haven't yet decided to take the plunge. For the full context, please note that the In particular, the udev configuration is meant to be decoupled from the installation process. We don't know ahead-of-time which devices the user will connect, and the udev rule is meant to be device-specific.
What's the alternative? I don't like the idea of attempting to add/edit configuration automatically. I'd rather prompt the user with appropriate instructions, and I'm happy to have them be nix-specific when nix is detected.
That'd be awesome, thanks!!! |
@maresb Thank you for the clarification. I overlooked the fact, that the id is generated dynamically... I could write a NixOS module, but it wouldn't make things any easier because you'd have to configure it yourself. And it wouldn't make your config any easier... Perhaps, it's a better idea to detect NixOS and to print a string which you can directly import into your configuration.nix?! I did a little test:
yields '#1-NixOS SMP PREEMPT_DYNAMIC Thu Apr 4 18:23:07 UTC 2024' for me. If we detect that, we could create the above string and simply print it for the user.
Then you'd just have to add the above to your configuration.nix and apply it. |
Thanks @FabianRig, that sounds great! Would you like to open a PR for that? |
One subtle issue is that when printing the exception, line breaks were being inserted according to the terminal width. To avoid this, I broke the command into short lines. The error now reads: ``` UsbDeviceError: You do not have sufficient access to the device. You probably want to add the a udev rule in /etc/udev/rules.d with the following command: echo 'ACTION=="add",'\ 'SUBSYSTEMS=="usb",'\ 'ATTRS{idVendor}=="0922",'\ 'ATTRS{idProduct}=="1001",'\ 'MODE="0666"' \ | sudo tee /etc/udev/rules.d/91-labelle-0922-1001.rules Next, refresh udev with: sudo udevadm control --reload-rules sudo udevadm trigger --attr-match=idVendor="0922" Finally, turn your device off and back on again to activate the new permissions. If this still does not resolve the problem, you might need to reboot. In case rebooting is necessary, please report this at <labelle-org#6>. We are still trying to figure out a simple procedure which works for everyone. In case you still cannot connect, or if you have any information or ideas, please post them at that link. ```
Hi, I'm working with a dymo printer LabelWriter 550, connected directly to a Linux machine (Debian 12) but I cannot print when I launch the line |
We strive to make it easy to set up the necessary udev rules in Linux. In case you have any trouble, please discuss it here.
The text was updated successfully, but these errors were encountered: