Correct way t grant user permission to /dev/fb0 and /dev/input/event1

I have cross compiled QT 5.5.0 for the BBB with debian jessie rootfs and 3.14-ti kernel (both latest)
I can run examples using eglfs but need to do so using sudo.
I would like to run these directly from the default “debian” user.

My questions are:

  1. What is the correct method of granting access to the devices required?
  2. Will this work to launch application remotely via ssh?

Any advice or pointers will be appreciated.

Thanks

Rob

You can grant permissions via sudo, and specify an exact command only - Say the exact command you use for using eglfs. Here is a link that should explain it some. https://www.garron.me/en/linux/visudo-command-sudoers-file-sudo-default-editor.html

You know of visudo already ?

1. What is the correct method of granting access to the devices required?

The term “correct” in this context can be, and often is subjective. It largely depends . . . But any method that is secure, and makes you happy is fine. Sudo, guids ( assigning various privileges to groups ), bash aliases perhaps etc. You can even go crazy with chroot. Passed that, I’m probably leaving out a lot, but searching “remote Linux security” on the web can go a long ways. A lot more than can be covered in a single forum post.

2. Will this work to launch application remotely via ssh?

If you mean - logging in and issuing commands via ssh. Yes.

Any advice or pointers will be appreciated.

Thanks

For /dev/fb0 use addgroup to add your user to the video group

Thanks for the replies gents I have opted for Barry’s suggestion and just added the user to input group for /dev/event1, for fb0, the user is member of viseo group by default.
This seemed to work when testing with ts_calibrate and ts_test - works withou sudo but, when trying to rung a QT5 program with eglfs, it fails with cannot initialise.
However, when running as sudo, the program works - I assume thewre are further permission problems somewhere so further insight or help will be greatly appreciated.

Thabks

Rob

The immediate thing to do, if not done already would be to google the exact error message. This may, or may not give you an answer to your problem.

Indeed adding your user to a group in this case seems like the “real” way to go. So preferable if you can nail down this issue.

Right, Google did not yield any direct answers but a few pointers here and there.
After messing up my rootfs a couple of times trying different things, I am back to square one.
I have discovered that although the “debian” user is member of video and input groups, it only helps in terms of running ts_calibrate and ts_test programs, launching any qt 5.5 program with eglfs, just terminates with failure message that egl could not be initialized - there is no message about permissions or anything else (like running a system command without sudo, you get a command not found error)

Launching program with sudo actually runs the program but with various warnings about environment variables that need to be set in order for qt to know the physical screen size.
logging in as debian and doing su, then launching program, everything works 100%, no errors, warnings or anything else.

So in my limited knowledge of linux, i have come to the conclusion that all the problems above are due to permissions.

  1. How can I determine where the permission failure is happening?
  2. How would I grant the correct permissions for user “debian” to be able to run the qt program

Any advice, pointers, thoughts would be greatly appreciated.

Thanks

Rob