Skip to content

Add support for Linux users without the input group #69

Open

Description

@demurgos

This is a follow-up issue to #68

Jinput on Linux requires the user to be the member of the input group. This seems like an extra requirement that should not be needed in most cases.
I've been using my computer and playing various games on Steam and outside of Steam, with gamepad support and my keyboard while not being a member of the input group. If most games do not need the input group to support keyboard and controllers, I assume there should be a way to avoid it in jinput too.

If it turns out the the input group is required, it may be a good idea to throw an exception (or at least log an error) explaining that the controllers can't be accessed due to a probable lack of permissions.

Activity

  1. HiranChaudhuri commented on Jan 16, 2023

    @HiranChaudhuri

    If you want to access the plain old joystick interface /dev/input/js0, that file is world-readable in Ubuntu 22 and with that your claim would hold true.
    However there is a more modern event based interface with device nodes /dev/input/eventXX - these are not world readable. So you'd definitely need to be a member of the group. JInput will not get around this as it is part of the Linux security model.

    But that raises the question which of the interfaces is used by JInput. Using the event based model would eliminate the Java code to perform polling of the joystick status and even allow access to force feedback functionality. It would be good to know which mechanism JInput uses (could be chosen at runtime) and allow for extensions for force feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions