I have installed xbmc/kodi on a headless raspbian (no keyboard, no mouse). I thought to configure it with the webserver configuration tools, but I am not able to enable it as I cannot access the GUI: how can enable it via command line?
TLDR; I'm working on the same setup; this answer turned into a log of my investigations: see below for a config which works for me.
Background: I've followed the tutorial: Setting up a Raspberry Pi with file sharing and screen sharing for Macs. I've also installed Shairport Sync.
I installed kodi as recommended in the documentation:
sudo apt-get update sudo apt-get install kodi
Then I can start kodi from the CLI
kodi, or from the desktop interface (mirrored on the Mac) under
Menu > Sound & Video > Kodi. I have the Pi plugged in to my TV via HDMI, and Kodi shows on the TV, whilst the desktop shows on the Mac.. I haven't found any way of switching apps to Kodi via VNC, or switching spaces (ctrlcmdright arrow shows that that I've only got one space active).
Configuring Kodi via SSH
- SSH into your server
nano /home/pi/.kodi/userdata/guisettings.xml(Forum: Managing Network Settings by SSH)
- search for the
<services>section and edit the following properties, which vary from the default:
<services> ... <airplay>true</airplay> ... <esallinterfaces>true</esallinterfaces> ... <upnprenderer>true</upnprenderer> <upnpserver>true</upnpserver> ... <webserver>true</webserver> ... </services>
killall -9 kodi.bin
- start Kodi:
- see what ports Kodi is listening on
netstat -lnptu | grep kodi
tcp 0 0 127.0.0.1:9090 0.0.0.0:* LISTEN 3805/kodi.bin udp 0 0 0.0.0.0:9777 0.0.0.0:* 3805/kodi.bin
Potentially helpful tips:
The services documentation lists the default http username:
The logs for kodi can be viewed at:
Fing is a free app on ios and android which will detect devices on the local network, display their MAC addresses, and scan ports. From my iPad, I can see
#5900:VNC, but no
:9090 :'(. If I run
python -m SimpleHTTPServer on the pi, Fing can see
Further options can be configured by editing (or creating)
Deleting either of the xml configs will cause them to be recreated with defaults.
Whilst installing Shairport Sync (prior to Kodi), I read:
You should not have more than one zeroconf service on the same system
avahi-browse -a returns a list of services all over my network, including:
+ eth0 IPv4 Kodi (pi) _xbmc-jsonrpc._tcp local + eth0 IPv4 Kodi (pi) _xbmc-events._udp local
Update: I attached a keyboard and went and toggled all the switches which seemed relevant to connectivity. I now connect via http (http://[localIP]:8080). I diffed my updates with the default config, and pasted the relevant lines above.
http://kodi.wiki/view/web_interface. This helped instantaneously