how to show 'exit' menu and quit kodi?

  • This is something I also would like to know. After adding <showexitbutton>true</showexitbutton> to the advancedsettings.xml file, I see the option to quit kodi, but when selecting it, it gets just ignored.

  • What would be the general purpose to simply exit Kodi? To get a commandline?

    To get a clean, well-defined state after doing changes for testing. A complete reboot of the box is overkill in most cases.

    To achieve that I would consider using SSH.

    Requires a second machine. Of course this is what I'm currently doing: Kill kodi (it will get restarted automagically anyway).

  • To get a clean, well-defined state after doing changes for testing. A complete reboot of the box is overkill in most cases.

    Requires a second machine. Of course this is what I'm currently doing: Kill kodi (it will get restarted automagically anyway).

    in ssh,"systemctl stop kodi",it will kill kodi and don't restart it

  • I know. But sometimes I want kodi to simply restart without needing to fully reboot the box. Will have a closer look at osmc to get this secret information.

    systemctl restart kodi

    I run that from a shortcut on my phone using ssh button (android app).

    If you want it in the kodi exit menu take a look at DialogButtonMenu.xml for the skin you use.

    Or add via favourites to work in any skin. You'll need (I think) to write a simple script to execute the command, and link to that script.

  • systemctl restart kodi

    I run that from a shortcut on my phone using ssh button (android app).

    Well, this is again via ssh only.

    If you want it in the kodi exit menu take a look at DialogButtonMenu.xml for the skin you use.

    Hmm, I tried it with various skins, so I assume it is disabled on some lower level...

    Or add via favourites to work in any skin. You'll need (I think) to write a simple script to execute the command, and link to that script.

    Sounds more like a hackish workaround :)

    I really love how OSMC is doing this: It allows to just quit kodi (like on a desktop) and then it will be restarted.

    Of course I do not know if the systemd files on libreELEC are suitable for this. And I'm mainly curious. After all, fully rebooting the box only takes some more seconds, so this is not really a high priority issue. I just would like to know how this is done :)

    Peace, love and chocolate. LOTS of chocolate!

    • Official Post

    Which kind of testings? mostly everything can be done via systemd

    If it's just for skinning for example you don't need to restart Kodi or reboot. You can easily setup some button which does ReloadSkin() and you are done.

  • Which kind of testings? mostly everything can be done via systemd

    If it's just for skinning for example you don't need to restart Kodi or reboot. You can easily setup some button which does ReloadSkin() and you are done.

    Just to give an example: When you install channel logos, kodi will pick them only after a restart. Of course rebooting is no big deal, but it's unnecessary.

    I simply wonder why this particular information is treated as a secret. I found several people asking for it and the answer always was something along the lines "you do not need to know that because it is not needed". This is disturbing. Even a simple "this will not work because the systemd unit files do not work as you expect" would be helpful.

    But never mind. The source is available and some day I might be bored enough to look it up myself :)

  • I personally use what DaVu suggested for skin testing.

    To add "ReloadSkin()" in the menu, edit DialogButtonMenu.xml by adding the following code;

    Code
    <item>
        <label>Reload skin</label>
        <onclick>Dialog.Close(all,true)</onclick>
        <onclick>XBMC.ReloadSkin()</onclick>
        <visible>!Library.IsScanning</visible>
    </item>


    The <visible> condition is simply to avoid bugs or crash.

    Edited 2 times, last by vitorp07: changer to "XBMC.ReloadSkin()" and added "Dialog.Close" (March 27, 2018 at 12:11 AM).