Modifying OSMC code

I want to fiddle with some improvements to and friends and was wondering how to test it.

E.g can I hack the file in

Then delete the pyo file and somehow get kodi to use my changes? When I tried the networking applet disappeared entirely from the GUI, although a new networking_gui.pyo file had been generated when kodi was restarted.

…or do I need to pull the source from git and rebuild kodi.bin and friends the proper way?


If you made changes to the .py file, and it doesn’t work anymore, then most likely, your changes were bad and caused Python to crash. Try reverting your changes. If it start working again, then something in you Python code was bad.

But changing the files in /usr/share/… probably isn’t a good idea, as updates may overwrite them.

You can edit the Python scripts directly. If the Python file is newer than the Python bytecode (pyo) version, then the Python script will be compiled again, so there’s no need to remove the object files manually.

You may be aware that My OSMC is currently undergoing a significant rewrite, so you may not want to invest too much time in the current version.

The proper way to build My OSMC in its entirety would be:

git clone
cd osmc/package/mediacenter-addon-osmc

And the source code would be in src/. Running the above commands will build a Debian package which can be installed on your system with dpkg -i.

Areas that would be great to look at:

  • Crash when connecting to a WiFi network for the first time
  • Random slow performance in My OSMC -> Networking menu
1 Like

Thank you for the pointers, I got the latest version running from git now and I’m poking around.

I’ll see if I can catch that crash…