1

I am exploring OSMC and OpenELEC for RaspberryPi. Menu options available in OSMC are:

  • Videos
  • Music
  • Pictures
  • My OSMC
  • Favorites
  • Programs etc..

Please help me how can I remove any of the menu options without affecting the rest of functionality. For e.g. I am interested in removing Music, and Pictures.

2 Answers 2

2

From what I know OSMC is based upon Kodi.

The hard way

You can remove features using skinning. If you're trying to remove a feature from an embedded skin such as Confluence the file system on which it resides might be read-only (this is true with OpenELEC, for instance). In that case, you'll have to re-package the skin in a ZIP file with your modifications and install the modified skin from a USB stick, for instance.

Kodi skin addons have a file named Home.xml, which defines the controls, animations and styles of the home page. Run the following instruction to get a grasp of how windows are activated from the home page:

# grep -Rni ActivateWindow Home.xml
37:                <onclick>ActivateWindow(Videos)</onclick>
123:                <onclick>ActivateWindow(Music)</onclick>
164:                <onclick>ActivateWindow(Programs)</onclick>
255:                <onclick>ActivateWindow(1102)</onclick>
307:                <onclick>ActivateWindow(Settings)</onclick>
336:                <onclick>ActivateWindow(Favourites)</onclick>

In Home.xml find the line where window Music is shown. You'll probably find something like this:

    <control type="group" id="4250">
        <include>Window_OpenClose_Animation_Zoom</include>
        <posx>560r</posx>
        <posy>165</posy>
        <include>VisibleFadeEffect</include>
        <control type="button" id="4251">
            <onup>Control.SetFocus(4241)</onup>
            <ondown>Control.SetFocus(4261)</ondown>
            <onleft>Control.SetFocus(4201)</onleft>
            <description>Music Button</description>
            <posx>0</posx>
            <posy>0</posy>
            <width>540</width>
            <height>130</height>
            <font>-</font>
            <texturenofocus >home_4.png</texturenofocus>
            <texturefocus border="5">home_4_p.png</texturefocus>
            <onclick>ActivateWindow(Music)</onclick>
        </control>
        <control type="image">
            <description>Music Button Image</description>
            <posx>140r</posx>
            <posy>30</posy>
            <width>80</width>
            <height>80</height>
            <texture>music2.png</texture>
        </control>
        <control type="label">
            <description>Music label</description>
            <posx>170</posx>
            <posy>22</posy>
            <height>90</height>
            <width>250</width>
            <label>Music</label>
            <align>center</align>
            <aligny>center</aligny>
            <font>font40_title</font>
            <textcolor>FFFFFFFF</textcolor>
        </control>
    </control>

In the above excerpt the "Music" button is part of a group, which is to be removed. Add an XML tag <visible>false</visible> to the group, like this:

    <control type="group" id="4250">
        <include>Window_OpenClose_Animation_Zoom</include>
        <posx>560r</posx>
        <posy>165</posy>
        <include>VisibleFadeEffect</include>
        <visible>false</visible>
        <control type="button" id="4251">
        ...

Also note that in the above example <include>VisibleFadeEffect</include> is meant to apply visibility effects, which is useless here and can safely be removed.

Where to add the <visible>false</visible> tag depends on what skin you're modding. For example, in OpenELEC, you will find Confluence skin's Home.xml in directory /storage/.kodi/addons/skin.<skin name>/720p/. You can also search through OSMC for that file:

find / -name Home.xml

The file location includes the active skin name. Use nano or any available editor on OSMC to edit the file and apply your modifications.

EDIT: If you modify a skin that is currently in use you'll have to reload the skin for your changes to take effect:

kodi-send --action="ReloadSkin()"

The above command needs to be run on the Pi itself.

The easy way

Some skins, such as Amber have additional settings to configure which home buttons are visible.

1

to make it short and easy:

if you use the default (kodi-)skin Confluence, you can simply choose via skin-settings which options should not appear. Conf Skin Home window 1

this settings may also be present at some other skins...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.