Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Could you help me show example about raspberry pi video permission ? #31

Open
zhulinpinyu opened this issue Apr 6, 2021 · 1 comment

Comments

@zhulinpinyu
Copy link

For example, on the Raspberry Pi, you'll need the kiosk user to be part of the video and input groups. You may also need to update the permissions and group ownership on /dev/vchiq if running on Nerves since it doesn't yet do that by default.

about this description, how can I set permissions for /dev/vchiq

@pavels
Copy link
Contributor

pavels commented Apr 6, 2021

That depends on how you actually start the kiosk app and if your elixir application runs as root (that is the case when running under Nerves) or not.

Basically you should create user and group for your kiosk process - let's assume these would be user kiosk and groupkiosk (user kiosk has group kiosk as it's primary group)

Than you need to do chgrp kiosk /dev/vchiq and chmod 770 /dev/vchiq

If your elixir app is running as root, you can do it in the start method of your Application using :os.cmd
like:

def start(_type, _args) do
  :os.cmd('chgrp kiosk /dev/vchiq')
  :os.cmd('chmod 770 /dev/vchiq')
  ...
end

If your elixir app is not running as root, you need to execute chmod and chgrp commands as root before starting kiosk application.

Another option can be udev rule with the same effects, chgrp and chmod

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants