10000 Add the OSMC user into the 'input' group by default · Issue #748 · osmc/osmc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add the OSMC user into the 'input' group by default #748

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

Open
kurac338 opened this issue Oct 28, 2023 · 2 comments
Open

Add the OSMC user into the 'input' group by default #748

kurac338 opened this issue Oct 28, 2023 · 2 comments

Comments

@kurac338
Copy link

Hello, can we please add the osmc user into the input group by default in the OS?

In particular, it would stop any new users from having issues regarding this topic and as far as I can tell, should not impact anything negatively.

TL;DR: osmc user is not able to access the hidraw device (external BT controller) in order to utilize all of its features, due to not being in the input user group by default. Tested on 2023-08-01.

@samnazarko
Copy link
Contributor
samnazarko commented Oct 28, 2023 via email

@cgutman
Copy link
cgutman commented Oct 28, 2023

FYI, I just picked the input group for these gamepad hidraw devices because it seemed like a reasonable group to pick on stock Debian. I don't think there's any real standard about what group should own these devices (probably depends on the nature of each HID device). I'd prefer to stick as close to stock Debian as possible though, since these are generic Debian packages. These are my udev rules: https://github.com/cgutman/moonlight-packaging/blob/master/debian/moonlight-qt.udev

I was trying to avoid enabling access to all hidraw devices to everyone, since that could have negative impacts on security for multi-user systems. However, for a single user OS like OSMC, maybe it makes sense to avoid having to hardcode VID/PID values and just set all hidraw devices to be owned by osmc/input or 0666.

It may make more sense to make hidraw accessible by the osmc group otherwise this change would only take effect on new installs

Maybe you could put a usermod -a -G input osmc in a postinst script for some core package to take care of upgrades. Not sure if that's feasible.

It looks like OSMC uses the osmc group for ownership of input devices (rather than input), so the rules in the package are going to conflict with OSMC's rules. I assume the rule priority is the right way to deal with that problem and I've simply used the default (60). As long as your rules supersede mine (or the OSMC user is in the input group), it should all be okay.

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

No branches or pull requests

3 participants
0