Kodi: Difference between revisions

From fakedWiki
Jump to: navigation, search
Line 41: Line 41:
echo "GRUB_GFXMODE=1920x1080" | sudo tee -a /etc/default/grub
echo "GRUB_GFXMODE=1920x1080" | sudo tee -a /etc/default/grub
echo "GRUB_GFXPAYLOAD_LINUX=keep" | sudo tee -a /etc/default/grub
echo "GRUB_GFXPAYLOAD_LINUX=keep" | sudo tee -a /etc/default/grub
sudo update-grub
</nowiki>
</nowiki>



Revision as of 00:14, 17 December 2015

This is how i installed a standalone Kodi "Jarvis" 16 on a Gigabyte GA-F2A88XN-WIFI Mini-ITX board with an AMD A8-7600 APU and a Samsung EVO 850 SSD.

I've skipped the Wifi setup because i'm using a wired connection (high quality 1080p streaming is nicer without buffering).

Install OS

  • Ubuntu 15.10 (netboot via PXE is perfect, but you can use whatever you want, preferably Ubuntu Server)
  • New User: Kodi
  • In the software selection dialog choose:
    • [x] Basic Ubuntu server
    • [x] OpenSSH server

Install Kodi

  • make sure you're install the correct driver for your hardware, i need fglrx or Kodi has a constant CPU load of ~100%
  • 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 fglrx-updates alsa-utils avahi-daemon libva-glx1 libva-egl1 vainfo upower libcurl3 mysql-client 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), the soundcard and to shutdown, reboot, etc.
sudo usermod -aG users,dialout,audio,video,sudo kodi

Allow Shutdown/Reboot

  • create /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
[Actions for kodi user]
Identity=unix-user:kodi
Action=org.freedesktop.login1.reboot;org.freedesktop.login1.reboot-multiple-sessions;org.freedesktop.login1.power-off;org.freedesktop.login1.power-off-multiple-sessions;org.freedesktop.login1.suspend;org.freedesktop.login1.suspend-multiple-sessions;org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Splashscreen (optional)

This only started working as expexted after i disabled the "Fullscreen BIOS Logo" in my BIOS.

sudo apt-get install -y plymouth-label v86d
wget https://dl.dropboxusercontent.com/u/55728161/plymouth-theme-kodi-logo.deb
sudo dpkg -i plymouth-theme-kodi-logo.deb
echo "GRUB_GFXMODE=1920x1080" | sudo tee -a /etc/default/grub
echo "GRUB_GFXPAYLOAD_LINUX=keep" | sudo tee -a /etc/default/grub
sudo update-grub

Autostart Kodi

  • create /etc/systemd/system/kodi.service
[Unit]
Description=Job that runs Kodi
After=getty.target sound.target network.target
Wants=network-online.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.service
sudo systemctl enable systemd-networkd.service
sudo systemctl enable systemd-networkd-wait-online.service
sudo ln -s /etc/systemd/system/kodi.service /etc/systemd/system/display-manager.service

  • reboot. now. Kodi won't start with the new driver unless you reboot
sudo reboot