Kodi: Difference between revisions

From fakedWiki
Jump to: navigation, search
No edit summary
No edit summary
Line 16: Line 16:
  <nowiki>sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
  <nowiki>sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
</nowiki>
</nowiki>
* grant the "kodi" user access to serial devices (CEC)
* grant the "kodi" user access to serial devices (CEC) and the soundcard
  <nowiki>sudo usermod -a -G dialout
  <nowiki>sudo usermod -aG dialout,audio kodi
</nowiki>
</nowiki>
== Enable Audio ==
== Enable Audio ==

Revision as of 23:34, 14 December 2015

Install OS

  • Ubuntu 15.10
  • New User: Kodi
  • Choose
    • [x] Basic Ubuntu server
    • [x] OpenSSH server

Install Kodi

  • make sure you're install the correct driver for your hardware, i need *-radeon and *-ati
  • i used the "unstable" PPA, but if you prefer final releases just replace the "unstable" with "ppa"
sudo add-apt-repository -y ppa:team-xbmc/unstable
sudo apt-get update
sudo apt-get install -y xinit xserver-xorg-video-radeon xserver-xorg-video-ati mesa-vdpau-drivers pulseaudio upower libcurl3 kodi 

  • allow "anybody" to start the X server
sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config

  • grant the "kodi" user access to serial devices (CEC) and the soundcard
sudo usermod -aG dialout,audio kodi

Enable Audio

  • create /etc/asound.conf
pcm.!default {
    type hw
    card Generic_1
}
ctl.!default {
    type hw
    card Generic_1
}

Autostart Kodi

  • create /etc/systemd/system/kodi.service
[Unit]
Description=Job that runs Kodi
After=default.target graphical.target getty.target sound.target

[Service]
User=kodi
Restart=always
RestartSec=1s
ExecStart=/usr/bin/xinit /usr/bin/kodi --standalone -- -nocursor

[Install]
WantedBy=default.target

  • enable the startup script
sudo systemctl daemon-reload
sudo systemctl enable kodi

  • test it
sudo service kodi start
sudo service kodi stop