Kodi Community Forum

Full Version: How do I run Kodi under non-root user?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I run Kodi under non-root user?
What permissions do I need to set?
What group(s) does the Kodi user need to belong to?

I had to set "chmod 777 /dev/vchiq" just to get Kodi to start as non-root user; otherwise, I get this error:
Code:
* failed to open vchiq instance

Also, when I try playing a video, I get this error when running as non-root:
Code:
*** Error in `/usr/lib/kodi/kodi.bin': double free or corruption (!prev): 0x0306c680 ***
/usr/bin/kodi: line 172:  1265 Aborted                 (core dumped) "$LIBDIR/${bin_name}/${bin_name}.bin" $SAVED_ARGS

I'm thinking I set the wrong permissions when I packaged my build of Kodi.
How do I run Kodi under non-root user?
What permissions do I need to set?
What group(s) does the Kodi user need to belong to?

I had to set "chmod 777 /dev/vchiq" just to get Kodi to start as non-root user; otherwise, I get this error:
Code:
* failed to open vchiq instance

Also, when I try playing a video, I get this error when running as non-root:
Code:
*** Error in `/usr/lib/kodi/kodi.bin': double free or corruption (!prev): 0x0306c680 ***
/usr/bin/kodi: line 172:  1265 Aborted                 (core dumped) "$LIBDIR/${bin_name}/${bin_name}.bin" $SAVED_ARGS

I'm thinking I set the wrong permissions when I packaged my build of Kodi.
@op - What device is running Kodi? ARM or x86_64?
(2017-02-04, 18:29)graysky Wrote: [ -> ]@op - What device is running Kodi? ARM or x86_64?
ΑRM (RPi 3)
(2017-02-04, 18:50)stefansaraev Wrote: [ -> ]look here: http://forum.kodi.tv/showthread.php?tid=...pid2437725
Do I need any other rules besides:
Code:
SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"
?
(2017-02-04, 19:32)Geremia17 Wrote: [ -> ]
(2017-02-04, 18:50)stefansaraev Wrote: [ -> ]look here: http://forum.kodi.tv/showthread.php?tid=...pid2437725
Do I need any other rules besides:
Code:
SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"
?

I dont know, I dont have an rpi. so try and find out. make sure the user you are using to start kodi is added to the "video" group.

EDIT: also look what distros are doing: https://github.com/osmc/osmc/blob/master...chiq.rules <= so you probably need all this
What distribution are you on? On Raspbian:
Code:
$ ls -l /dev/vchiq
crw-rw---- 1 root video 246, 0 Feb  4 19:25 /dev/vchiq
$ groups pi
pi : pi adm dialout cdrom sudo audio video plugdev games users input netdev spi i2c gpio
So default user pi belongs to video group which has permissions for /dev/vchiq.
We don't need two threads about this - moved and merged