I ran desktop-software to install kodi on top of dietpi
Install apparently carried out ok
Then I changed the appropriate tags inside /root/.kodi/userdata/guisettings.xml to enable remote web access.
Then I rebooted (as I could not find how to “simply” restart kodi)
can’t access kodi via web
kodi doesnt autostart even if enable in dietpi-whatever
running startkodi from terminal results in :
/usr/bin/kodi: 1: /usr/bin/kodi: fbset: not found
I tried the above on TWO different raspberry pi (a 1B and a 3B) with identical result
Note that on Raspberry Pi the (functional) Kodi binary is: kodi-standalone
Our wrapper that is used for autostart and desktop icon does nothing else on RPi: /DietPi/dietpi/misc/start_kodi
When you run dietpi-autostart from terminal, select Kodi (index 1), logout the session via exit and log in again, Kodi is not automatically starting?
For “restarting” Kodi it has a logout (or exit to terminal) button. Afterwards rerun kodi-standalone.
Cleanest way to kill it from SSH: killall kodi-standalone kodi
With your method you need to assure that the underlying X server (xinit) is down as well, e.g. check via htop.
Starting Kodi from SSH session is possible as well: xinit kodi-standalone & works on my test x86 machine to start Kodi on the local screen. Otherwise reboot + rely on autostart should work. Possibly on RPI kodi-standalone & (skipping xinit) will work as well from SSH, not sure.
However as of the error output it simply seems that Kodi requires the fbset package. That was not the case before, perhaps new with Kodi 18. And I just run Kodi 17.1 successfully here without fbset .
Test G_AGI fbset and then try from SSH: kodi-standalone & or xinit kodi-standalone &
Otherwise reboot and rely on autostart.
If that indeed solves the problem, we will add fbset as dependency to Kodi install on RPi.
I plugged one of the two Raspis I am playing with on a tv (via hdmi of course) and it really seems that
without fbset the kodi process does start, but I get no kodi on the tv
install fbset, reboot, kodi is output to the TV
yes, I’m talking about Kodi 18 (i.e. the one that gets installed automatically by your script anyway)
BUT…
Even installing fbset on the second Raspi, which I never connected to the TV, though, something keeps resetting guisettings.xml , in particular esallinterfaces and webserver are both reset to false, and kodi gui keeps being inaccessible via web.
If I unplug the firts Raspi from TV & power, and repower it with the HDMI cable disconnected, the box turns on (as far as the leds say) but I cant ssh it.
Unpower first Raspi, reconnect HDMI, repower it. Kodi comes up on the TV and I can again ssh it, and I can remote-web it too.
By googling around I found someone who packaged a so-called “headless kodi” in a docker container.
I played with that a bit too.
The matter is not fully clear to me yet but it seems that when you do succed firing kodi up at boot time, the app requires to find an HDMI target to complete its startup or it refuses to give control back to the underlying OS. Maybe there’s a switch inside the app/its xml files to allow for an hdmi-loose startup - maybe worth a look.
Overall, bloody Kodi in general seems not to like lower-level fiddling at all, or, better said, seems not a well layered / modular application at all. You can access its db, config files, etc, but most of those can’t be as freely modified as expected by their very accessibility. Which fundamentally means it seems not an “open” platform at all; it’s rather a “closed” base-system with an open-published plug-in development grammar (and in facts if you are looking for a kodi plugin to interface your toaster you’ll probably find it).
Did you try to enable the web interface via the GUI: Settings → Services → Control → Allow remote control via HTTP
Ref: https://kodi.wiki/view/Web_interface
Perhaps the GUI is resetting the settings file, although it should read the settings from it on start. Not sure.
Okay so we need to install fbset with Kodi on RPi.
About SSH not working without HDMI. This is a bid strange since Kodi on TTY1 and SSH on PTS1 have nothing to do with each other. The SSH service starts way before the login script starts Kodi . Did you give it some time to boot up (not just LEDs) before attempting SSH?
I will check how xinit/Kodi behaves when started without monitor attached. If indeed some issue happens then (although it should not matter) perhaps we can check for attached screen and otherwise prevent Kodi and generally graphical autostart options from being started.