As Kodi is discontinued on HD Station, for a time I was using the contributed packages from other members. The packages are great, but I had some problems and addons I cannot execute over HD Station so I have installed Kodi using Linux Station in my QNAP 453A.
Of course going to the Linux Station way has its own set of problems that had to be solved before I had a functional standalone KODI. As many of the solutions and workarrounds are distributed through many posts, I wanted to contribute with one post with all the things done to do it.
Please be aware that Linux Station is in fact a container, so we will have to configure things on the QNAP host OS and others in the Ubuntu container side. So for sake of clarity, I'm indicating where the operation is performed usign [QNAP] or [UBUNTU].
- [QNAP] Under QTS, set up Linux Station to be use instead HD Station. Install Ubuntu 16.04 the way is described in QNAP's user guide.
- [QNAP] Setup the graphics ouput in the "configuration" section. If you are going to "clone" screesn, you will be not able to use the internal VNC client as the watchdog software will inmediately change the screen setup to "extend".
- [UBUNTU] Log into the Ubuntu container (through the HDMI terminal) using "admin" credentials. Open a XTerm, and perform the usual "sudo apt-get update; sudo apt-get upgrade"
- [UBUNTU] "ifconfig" will list the used IP. In my case the Ubuntu container is using 2 IP's, one on the Virtual Switch 2 and the other on Virtual Swtich 1 (this is the one I use for administration porpouses).
- [UBUNTU] Additionally, also perform "sudo apt-get install ssh" to get remote access to the platform. It will be more easy to perform changes using a SSH session.
- [QNAP] As I want to use ALSAL instead of PulseAudio, to files has to be modified at QNAP OS to prevent the PulseAudio daemon to respawn.
In file/share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1604/pulse/pulse.common/client.conf set autospawn=no
In file /share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1604/pulse/pulse.common/default.pa set load-module module-udev-detect tsched=0 - [UBUNTU] To get a fully IR-002 functional remote, I had to create file /etc/rc_keymaps/rc6_mce with the following content:
Code: Select all
# table rc6_mce, type: RC6 0x800f041e KEY_UP 0x800f041f KEY_DOWN 0x800f0420 KEY_LEFT 0x800f0421 KEY_RIGHT 0x800f0422 KEY_ENTER # KEY_OK 0x800f0423 KEY_BACKSPACE # KEY_EXIT 0x800f045b KEY_ESC # KEY_RED 0x800f0426 KEY_C # KEY_EPG 0x800f040f KEY_I # KEY_INFO 0x800f040c KEY_SLEEP 0x800f040e KEY_MUTE 0x800f0411 KEY_VOLUMEDOWN 0x800f0410 KEY_VOLUMEUP
- [UBUNTU] A new destop session with the needed parameters for ALSA Kodi is needded. Create fle /usr/shase/xsessions/kodi_alsa.desktop with the following content:
Code: Select all
[Desktop Entry] Name=Kodi ALSA Comment=This session will start Kodi media center in ALSA mode Exec=env AE_SINK=ALSA kodi-standalone TryExec=kodi-standalone Type=Application
- [UBUNTU] To get autologin working, the file /etc/lightdm/lightdm.conf has to be as follows:
If you need to disable autologin (ie. to lauch the Unity desktop instead Kodi), the file has to be modified to:Code: Select all
[Seat:*] autologin-user=admin
Code: Select all
[Seat:*] autologin-user=admin
- [UBUNTU] To get KODI as the default windows manager, modify /home/admin/.dmrc to:
Code: Select all
[Desktop] Session=kodi-alsa
- [QNAP] Reboot the Ubuntu container using the web tool.
- [UBUNTU] One thing that can be needed is to "reset settings to defaults", under "configuration->system->audio" to get all the passthrough configuration.
- [QNAP] At file /share/CACHEDEV1_DATA/.qpkg/ubuntu-hd/lxc/ubuntu_1604/config the following lines have to be inserted just after the "# lirc" section:
Restart the UBUNTU container to make the changes effective.
Code: Select all
lxc.mount.entry = /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file lxc.cgroup.devices.allow = c 166:* rwm
- [UBUNTU] Even if the Pulse-Eight CEC adapter is now visible and detected by Kodi it is still unuable till we add the user admin to the dialout gorup:
Code: Select all
sudo usermod -a -G dialout admin
Now I'm trying to get to know how I can have 2 cloned screen with differente resolutions. On an "standard" Ubuntu 16.04 this will be done with the following command on Ubuntu's side:
Code: Select all
xrandr --output HDMI1 --mode 4096x2160 --scale 1x1 --output HDMI2 --same-as HDMI1 --mode 1280x720 --scale-from 4096x2160
Cheers,
Sergien