matthuisman / docker-kodi-headless

A headless install of kodi in a docker container
GNU General Public License v3.0
124 stars 11 forks source link

' --windowing=headless' as comand line argument #39

Closed hobbit378 closed 7 months ago

hobbit378 commented 7 months ago

Question: Given I apply only your 'headless.patch' to the Kodi source files: Would this be sufficient in order to be able to select headless mode by adding' --windowing=headless' as command line argument when starting Kodi. Or does this require additional changes in the Kodi source code? If the former is true, would it be possible to provide your 'headless.patch' to the official Kodi project for merging with their code base?

(Background info: I run Kodi with option '--standalone' on a Raspberry Pi that is attached via HDMI to my TV. I want to be able to use Kodi also as an Audio Player (playing audio to speakers connected via Bluetooth) that can be controlled via the web interface even when the TV is powered-off. However Kodi (in 'Standalone' mode) causes a substantial increase in CPU load when the TV is (completely) powered-off, probably as it keeps searching and trying to open a non-existent video device. So it would be convient to have an option to simply restart kodi with a ' --windowing=headless' option as soon as the TV is powered off, which can be done by an udev triggerd script.)

matthuisman commented 7 months ago

i dont think Kodi has any interest in the headless. It would need to be cleaned up a lot as I just rip some stuff out and then create a new windowing which is all stubs

But, nothing is stopping you applying and building yourself. No need to use an argument either. headless is "forced" You can see how the docker runs it: https://github.com/matthuisman/docker-kodi-headless/blob/Omega/root/etc/s6-overlay/s6-rc.d/svc-kodi/run no args