If you run Kodi on a RetroPie system you can add Kodi to the RetroPie menu as if it is a game system.
This guide assumes you already have Kodi installed on your RetroPie system where it appears as an item under the “Ports” system.
To continue you will need to use the command line. You can get to the command line either
- Pressing F4 if you have a keyboard attached directly to your system
- Using SSH to connect to the RetroPie system from another computer
Step 1 – Copy es_systems.cfg file
Firstly we need to copy the default es_systems.cfg file:
sudo cp /etc/emulationstation/es_systems.cfg /opt/retropie/configs/all/emulationstation/es_systems.cfg
Step 2 – Edit es_systems.cfg file
We need to edit this file in the nano text editor:
sudo nano /opt/retropie/configs/all/emulationstation/es_systems.cfg
Add the following text block just after an existing </system> tag :
<system>
<fullname>Kodi</fullname>
<name>kodi</name>
<path>~/RetroPie/roms/kodi</path>
<extension>.sh .SH</extension>
<command>bash %ROM%</command>
<platform>kodi</platform>
<theme>kodi</theme>
</system>
I placed this block right at the end of the file start before the final </systemlist> tag.
Save the changes using CTRL-X, Y then ENTER.
Step 3 – Create launch script
We now need to create a Kodi rom directory to contain a script to launch Kodi:
mkdir ~/RetroPie/roms/kodi
then create and edit the launch script using:
sudo nano ~/RetroPie/roms/kodi/kodi.sh
Add the following lines:
!/bin/bash
kodi-standalone
Save the changes using CTRL-X, Y then ENTER.
The script needs to be made executable using:
sudo chmod +x ~/RetroPie/roms/kodi/kodi.sh
Step 4 – Restart EmulationStation
If you used F4 to get to the command line then you can return to EmulationStation by typing:
EmulationStation
If you used SSH to connect then quit that session. Using a controller connected to RetroPie, press “Start” to bring up the main menu. Select “Quit” then “Restart EmulationStation”.
Once back in EmulationStation Kodi should appear in the main RetroPie menu alongside all the other system.
Selecting the single “kodi” option will launch Kodi.
This isn’t a huge difference to selecting Kodi from the “Ports” page but it can much quicker if your Ports list is quite busy.
Additional Resources
Here are some links to related resources: