Skip to content
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

Add proper documentation for creating udev rules for Vial. #19

Merged
merged 7 commits into from
Jan 31, 2023

Conversation

SpecialBomb
Copy link
Contributor

No description provided.

@xyzz
Copy link
Contributor

xyzz commented Apr 30, 2022

I think this is much harder to follow for users not experienced with linux, users and groups. My suggestion is to change the "Generalized udev rule" section to a sequence of shell commands that users can execute, granting them access to the devices - similarly how it was done previously. In this case, you could perhaps use user's primary group (via something like id -gn $USER) by default, and then document it further in sections below.

…s rule as a rule for VIA keyboards. Added a short script for each rule to automatically create the rules, may need more work.
@SpecialBomb
Copy link
Contributor Author

SpecialBomb commented May 10, 2022

I made a few changes based off of your suggestions, specifically as to shell commands people could run to get the job done. I just did the simple thing for the time being since it will take a bit to properly write a shell script that won't blow up. The big thing is that I added a udev rule that specifically allows Vial keyboards to have read/write permissions, which should make the Vial experience a lot more transparent.

Another thing, I forced enabled the TOC since I thought it would make the page a lot easier to navigate and find what you need. I don't know how to set up a Just The Docs environment though, so I can't test if I even needed to or not.

Copy link
Contributor

@xyzz xyzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like latest changes lost the note about the "users" group, is this actually something that's default on major distros or does it need custom handling?

docs/manual/linux-udev.md Outdated Show resolved Hide resolved
docs/manual/linux-udev.md Outdated Show resolved Hide resolved
docs/manual/linux-udev.md Show resolved Hide resolved
docs/manual/linux-udev.md Outdated Show resolved Hide resolved
@SpecialBomb
Copy link
Contributor Author

Looks like latest changes lost the note about the "users" group, is this actually something that's default on major distros or does it need custom handling?

Not exactly, but safely yes? users is pretty standard from what I know, typically it always refers to gid 100. However, it's not as standard as something like wheel. It's a fairly safe default.

I will work on creating a script that will automatically generate a udev rule that specifically makes the user the owner of the device file using the OWNER udev key.

Quen Jankosky added 3 commits January 11, 2023 20:45
… that

  actually work. Main addition at the request of @xyzz was to make it so that
  the `GROUP` udev field was set to the user's group ID. This is to reduce the
  chance that the rule won't work on an OS without a default `users` group.

- Wording/grammatical mistakes fixed.

- Overall attempt to make things cleaner.
- Changed one-liners to automatically restart `udev`.
@SpecialBomb
Copy link
Contributor Author

SpecialBomb commented Jan 12, 2023

Looks like latest changes lost the note about the "users" group, is this actually something that's default on major distros or does it need custom handling?

Not exactly, but safely yes? users is pretty standard from what I know, typically it always refers to gid 100. However, it's not as standard as something like wheel. It's a fairly safe default.

I will work on creating a script that will automatically generate a udev rule that specifically makes the user the owner of the device file using the OWNER udev key.

Added functionality to automatically add user's primary group to the udev rule in 069dd4a. Theoretically won't cover ever possible case, but the default functionality of useradd from the standard shadow-utils makes a unique primary GID for every user created.

@SpecialBomb SpecialBomb requested a review from xyzz January 17, 2023 14:44
@xyzz xyzz merged commit 9cc15ca into vial-kb:main Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants