My raspiNAS is based on a raspberry pi 2, with 1GB of ram and a 4core ARM processor, a more powerful board able to run a NAS and also a full HD media center. So in order to simplify my home setup and remove a raspberry I’ve decided to merge the KODI mediacenter (based on OSMC) into the raspiNAS board.
We have to create the group “input” if it doesn’t exist.
1 | sudo addgroup --system input |
Edit the file
1 | sudo nano /etc/udev/rules .d /99-input .rules |
enter the following text and save it:
1 2 | SUBSYSTEM==input, GROUP=input, MODE=0660 KERNEL== tty [0-9]*, GROUP= tty , MODE=0660 |
Create & edit the following file:
1 | sudo nano /etc/udev/rules .d /10-permissions .rules |
enter this text and save it:
1 2 3 4 5 6 7 8 | # input KERNEL== "mouse*|mice|event*" , MODE= "0660" , GROUP= "input" KERNEL== "ts[0-9]*|uinput" , MODE= "0660" , GROUP= "input" KERNEL==js[0-9]*, MODE=0660, GROUP=input # tty KERNEL== tty [0-9]*, MODE=0666 # vchiq SUBSYSTEM==vchiq, GROUP=video, MODE=0660 |
Run the following commands for user pi (if you haven’t changed your user name):
1 2 3 4 5 6 | sudo usermod -a -G audio pi sudo usermod -a -G video pi sudo usermod -a -G input pi sudo usermod -a -G dialout pi sudo usermod -a -G plugdev pi sudo usermod -a -G tty pi |
To play full HD video in Kodi, you have to set
1 | gpu_mem=160 |
in /boot/config.txt (or higher) and reboot the board.
Now install kodi with:
1 | sudo apt-get install kodi |
Edit /etc/default/kodi in order to start kodi at boot:
1 2 3 4 5 6 7 8 | # Set this to 1 to enable startup ENABLED=1 # The user to run Kodi as USER=pi # Adjust niceness of Kodi (decrease for higher priority) NICE=-5 |
Source: https://www.raspberrypi.org/forums/viewtopic.php?t=99866