-
Create liveusb using Ubuntu mini.iso
dd bs=4M if=/home/user/Downloads/mini.iso of=/dev/sdf status=progress; and sync
in fish shell -
During install will be prompted for what to install: choose xubuntu minimal and openssh server
-
This time left just one disk (8TB) in the case, and used LVM when partitioning: root given 15gb, data partition given the rest (set recovery-blocks to 1% and inode to largest size since this is just a media partition)
Kodi will be run by a user with limited privileges. This is for security reasons as we will setup the user to login automatically with no password. The limited user will have restricted access to the OS (e.g. it will not be able to install programs system wide or change security settings).
Create a limited user account kodi
with a disabled password:
NOTE: Use sudo su - kodi
to login as kodi user when SSH'd in as another user.
sudo adduser --disabled-password --gecos "" kodi
- Make the user able to login without a password:
sudo usermod --append --groups nopasswdlogin kodi
- Gives the limited user user access to the video devices (
video
), connected external devices (plugdev
), controller and joystick input (input
) and connected wireless and Ethernet networks (netdev
).
sudo usermod --append --groups video,plugdev,users,input,netdev kodi
sudo apt-add-repository ppa:team-xbmc/ppa
sudo apt update
sudo apt install kodi
Create systemd service in /etc/systemd/system/
kodi.service
- [Unit]
- Description=Starts instance of Kodi using xinit
- After=systemd-user-sessions.service network.target sound.target mysqld.service
- Conflicts=getty@tty1.service
- [Service]
- User=kodi
- Group=kodi
- PAMName=login
- TTYPath=/dev/tty1
- ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1
- Restart=on-abort
- StandardInput=tty
- [Install]
- WantedBy=multi-user.target
- Couldn't get the above systemd script to work, but I think it should work if rewritten as a user service.
- Anyway, decided to use lightdm autologin instead.
- pam-service line is needed for passwordless login.
- lightdm will run the session
kodi
(/usr/share/xsessions/kodi.desktop), which will then startkodi-standalone
/etc/lightdm/lightdm.conf
[Seat:*]
pam-service=lightdm-autologin
autologin-user=kodi
autologin-user-timeout=0
autologin-session=kodi
Bonus: Add splashscreen from the discontinued Kodibuntu distro (from here)
wget -O plymouth-theme-kodi-animated-logo-master.zip https://github.com/solbero/plymouth-theme-kodi-animated-logo/archive/master.zip
unzip plymouth-theme-kodi-animated-logo-master.zip
cd plymouth-theme-kodi-animated-logo-master
sudo apt install fakeroot
chmod +x build.sh
./build.sh
sudo dpkg -i plymouth-theme-kodi-animated-logo.deb
sudo apt-add-repository ppa:fish-shell/release-2
sudo apt update
sudo apt install fish
whereis fish
chsh --shell /path/to/fish # for current user
sudo usermod --shell /path/to/fish kodi # for kodi user