Ubuntu Shutdown menu overrides Kodi Shutdown menu
#1
Hello,

I have a problem regarding the Kodi Shutdown menu. I am using Kodi as an application inside Ubuntu. When I press the shutdown button on my wireless Minix remote, it shows the Ubuntu Shutdown menu.

I tried to override this behaviour by adding to my ~/.kodi/userdata/keymaps/keyboard.xml the following based on the combined informations contained on the Minix A2 page and the Keymap page on the Kodi Wiki:

Code:
<power>ActivateWindow(shutdownmenu)</power>

But the Ubuntu Shutdown Menu continues to show up instead of the Kodi Shutdown menu.

Could someone please help me ? Thanks a lot.

My system is the following:

1. Hardware:
Barebone: Intel NUC kit - NUC5I3RYH (Intel Core i3-5010U 2.1 GHz ; Intel HD Graphics 5500 ; BIOS Version RYBDWi35.86A.0350.2015.0812.1722)
OS stored on: Sandisk Ultra Fit USB 3.0 32 GB (because the internal M.2 SSD seems to have a problem as explained in an other post)
Media files stored on: Seagate Spinpoint M9T 2 TB HDD
RAM: Kingston HyperX DDR3L-1600 (PC3-12800) SODIMM 204 8 GB
Monitor: Acer X223W LCD
Connection to display: Hama HDMI to VGA/Jack 3.5 Adapter + VGA cable
Remote: Minix Neo A2 (via Wireless dongle)

2. Software:
OS: Ubuntu 15.10 Wily Werewolf
Kodi version: 15.1
Mode: as an application
Skin: Titan 3.4.1

3. keymap file: ~/.kodi/userdata/keymaps/keyboard.xml

Code:
<keymap>
  <global>
    <keyboard>
      <F2>NextSubtitle</F2>
      <home>AudioNextLanguage</home>
      <F1>Stop</F1>
      <escape>Back</escape>
      <power>ActivateWindow(shutdownmenu)</power>
    </keyboard>
  </global>
<FullscreenVideo>
   <keyboard>
     <return>OSD</return>
   </keyboard>
</FullscreenVideo>
<VirtualKeyboard>
   <keyboard>
     <return>Select</return>
   </keyboard>
</VirtualKeyboard>
</keymap>

Again, many thanks to anyone who could help me.
Reply
#2
remove the keymapping for the shutdown button in _ubuntu_
Reply
#3
Dear wsnipex,

Thank you for your answer. But if I do what you say, I will not be able to shutdown the computer with the Minix Neo A2 remote's power button anymore when I am outside Kodi. And this computer is used for other applications too.

Do you have any other solutions ?

Thanks.
Reply
#4
To anyone having the same problem,

That means:
1. you have a Media Center hooked to your TV (in my case: Intel NUC kit - NUC5I3RYH)
2. you use a Minix Neo A2 + USB dongle to send commands to your Media Center
3. you use your Media Center not only for running Kodi in standalone mode but for running a Desktop environment too (in my case: Gnome/Unity in Ubuntu 15.10 Wily Werewolf)
e.g. : you play games or surf the internet which is not possible from within Kodi yet without a lot of time consuming tweaking (I did for my other machine with Kodi + the Advanced Launcher plugin + some scripting closing Kodi/waiting for Kodi to close&asking an Enter to confirm that/launching the game/re-launching Kodi when the games closes)
4. by pressing the power button of the Minix Neo A2, you want to close Kodi and shutdown Ubuntu nicely by using the Kodi Shutdown Menu and not by shutting down Ubuntu without letting Kodi know it in a barbaric way
5. (next step): when you are in Gnome/Unity (outside Kodi) you want to keep the ability to shutdown Ubuntu by pressing the power button of the Minix Neo A2

Even if you do what wsnipex says (which renders the power button useless in the Desktop environment), the following line in the keymap file (~/.kodi/userdata/keymaps/keyboard.xml) is still not giving the desired result:

Code:
<power>ActivateWindow(shutdownmenu)</power>
(Got this on the Minix A2 page in the Kodi Wiki)

To reproduce this in Ubuntu 15.10 Wily Werewolf + Kodi you have to do the following:
1. Quit Kodi to get to Gnome/Unity
2. Install dconf-editor by an installer with a GUI (e.g. synaptic) or by running in a terminal:
Code:
sudo apt-get install dconf-editor

3. Tell Ubuntu/Gnome/Unity to associate the Minix Neo A2 power button with nothing by (got it from this post at askubuntu.com):
3.1 Running dconf-editor in the launcher or in a terminal by typing:
Code:
dconf-editor
3.2 Going to org -> gnome -> settings-daemon -> plugins -> power -> button-power
3.3 change its value to "nothing"

4. Modify or create a keymap file in ~/.kodi/userdata/keymaps/ that is named keyboard.xml so that it contains at least this (got it from combined informations contained on the Minix A2 page and the Keymap page in the Kodi Wiki):
Code:
<keymap>
  <global>
    <keyboard>
      <power>ActivateWindow(shutdownmenu)</power>
    </keyboard>
  </global>
</keymap>
To do this either
4A. open your favourite GUI text editor from the launcher (e.g. Gedit) and create/modify this file in the desired directory
4B. open your favourite command-line text editor (e.g. nano) and create/modify this file in the desired directory, for nano you need to type in a terminal
Code:
nano ~/.kodi/userdata/keymaps/keyboard.xml

I will further investigate this issue in the following days but I can't guarantee anything as I already feel I am in a dead-end.
Reply

Logout Mark Read Team Forum Stats Members Help
Ubuntu Shutdown menu overrides Kodi Shutdown menu0