How to install Kodi in OS V0.21?

I try to install Kodi in my Gameshell, and I use comm-line like follow:
sudo apt-get update
sudo apt-get install kodi
cd /home/cpi/launcher/Menu/GameShell
echo ‘kodi’ > ‘kodi.sh’
when I finish all over this, and reboot my Gameshell, it has stuck at the loading screen. but after I deleted the kodi.sh,It’s normal again. So, how can I creat a shortcut in the Gameshell Menu.
Notice: the file structures of Os V0.21 is different from the OS V0.1.
THX

1 Like

I think your command to create the kodi.sh bash script is erroneous that’s why the launcher crashed.

It should have been:

echo kodi > kodi.sh

with no single quotes (’) around the file names

and then give execute permission to the kodi.sh file:

chmod +x kodi.sh

Can you try the above and tell us if it succeeds?

OK, I’ve try @elefas your suggest maybe for 3 ro 4 times, but still stuck at the loading screen, when I finish all the comm-line~

Now, I change the pathway to the /home/cpi/apps/Menu/21_Indie Games ,still stuck~

Are you sure that kodi runs under gameshell? what happens if you try to execute it from console? for sure it won’t launch since you have no UI from the console (ssh) but maybe an error is thrown which might lead you to what is wrong. Have you tried to search the community board here about kodi? has anyone else managed to run it in GameShell?

This is the Topic.

1 Like

Here what I just did and kodi works

sudo apt install kodi

then

cd ~/apps/Menu/

and then

echo kodi > kodi.sh

give execute permission

chmod +x kodi.sh

then reload the ui and launch kodi from the launcher menu

THX! it’s work! OMG!

Does Kodi actually work well

not really, resolution is not right, hardly read the info on screen

We really need to look into keymapping in Kodi.
You can download an alternate control scheme [Gameboy Advance, Super NES… etc]. But if you try to remap the keys… it either doesn’t detect your keypresses… or it brings up an error message about not having a PVR configured.

Currently the only thing Kodi recognizes as a valid [non PVR error] button is:
Menu: (which acts like a Back button)
Start: (Which acts like [Enter|Return|Use|])
DPad: (For Up, Down, Left, Right, Navigation)…
Also, at least Shift + Select and Start will let you adjust the Volume.

It’d be nice if we could make a simple FFPLAY or MPLAYER front-end with playlist support for the launcher… that way we wouldn’t need to install something like Kodi if we just want to watch locally stored Videos, Music, Pictures.

I noticed the Splashscreens and Backgrounds for Gameshell are loaded via Feh.
Would be cool to make a little Menu based frontend for displaying folders of images as well. I’d really much rather have a lightweight Feh/Mplayer/MPD frontend for Music/Images/GIFS/MP4s than Kodi anyway. Kodi was just a nice “quick” solution for being able to view local Video files

[I’ve been converting all my MP4s to VCD format before trasfering them to the Gameshell… since VCD is 352X240 which is fairly close to 320X240].

I’m sure someone has probably already done this… but here’s how to get some icons for Kodi.

wget -O ~/launcher/skin/default/Menu/GameShell/kodi.png https://i.imgur.com/SCXr2kW.png

wget -O ~/skins/OP1/Menu/GameShell/kodi.png https://i.imgur.com/OVYy0QF.png

If you used elefas’ instructions above… these two commands should give you a custom Kodi icon for the default… and OP-1 skins.

1 Like

A year later… no one fixed the keymapping… so I finally got around to it.

After you have Kodi installed and working, ssh into your gameshell and at the commandline type:

nano ~/.kodi/userdata/keymaps/keyboard.xml
copy and paste everything bellow these instructions into the nano window, and then press CTRL+x and answer “yes” to save. Then restart your GUI and launch Kodi.
It should’nt be too difficult to look at how I’ve mapped the keys bellow and adjust the .xml file to suit your preferences. As-is none of the keys I’ve mapped throw up the PVR error. And should be intuitive enough to navigate folder structures and play video files.

[copy/paste everything bellow this line]

<keymap>
  <global>
    <gamepad>
      <A>Select</A>
      [...]
    </gamepad>

    <remote>
      <select>Select</select>
      [...]
    </remote>

    <keyboard>
      <enter>PlayPause</enter>
      <i>OSD</i>
      <Space>Stop</Space>
      <y>BigStepBack</y>
      <u>XBMC.ActivateWindow(Home)</u>
      <l>BigStepForward</l>
      <h>StepBack</h>
      <!-- my numpad divide shows up as "forwardslash" -->
      <y>StepForward</y>
      <BackSpace>Info</BackSpace>
      <k>Select</k>
      <j>Back</j>
      <!-- + and - handle the volume by default -->
      <!-- BackSpace is "back" by default -->
      <!-- Enter is "select" by default -->
      [...]
    </keyboard>

    <mouse>
      <leftclick>Select</leftclick>
      [...]
    </mouse>

    <universalremote>
      <obc25>XBMC.ActivateWindow(MyMusic)</obc25>
      [...]
    </universalremote>

    <joystick name="PLAYSTATION(R)3 Controller (00:1B:FB:F6:E0:F2)">
      <button id="15">Select</button>
      [...]
    </joystick>
  </global>

  <Home>
    [...]
  </Home>

I thought I had posted this somewhere but I guess not, or maybe I missed this thread.

Rather than edit the KODI config file, I ended up just writing a custom shell script to run it which uses xmodmap to remap the keys to the KODI config defaults. The script also installs KODI from the repository if it’s not already installed.

#!/bin/bash
APPNAME="kodi"

# Install if necessary.
type $APPNAME >/dev/null 2>&1 || {
	x-terminal-emulator -e "printf '$APPNAME not installed. Installing...\n' && sudo apt-get -y install $APPNAME"
}

# Remap keys
xmodmap -e "keysym j = x"
xmodmap -e "keysym k = space"
xmodmap -e "keysym u = c"
xmodmap -e "keysym i = m"
#xmodmap -e "keysym Return = space"
#xmodmap -e "keysym space = x"
xmodmap -e "keysym KP_Subtract = minus"
xmodmap -e "keysym KP_Add = plus"
xmodmap -e "keysym Backspace= s"
xmodmap -e "keysym h = i"
xmodmap -e "keysym l = f"
xmodmap -e "keysym y = r"
xmodmap -e "keysym o = F8"

# Run application
$APPNAME

# Restore xmodmap keymappings.
# NOTE: Reboot or run this command manually if keymappings fail to restore due to crash, etc.
setxkbmap