• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

use keyboard for ES nav, or start Kodi on startup

Scheduled Pinned Locked Moved Help and Support
keyboardkodi
10 Posts 2 Posters 894 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    Nobodyfamous
    last edited by 30 Dec 2020, 12:43

    I am running an X86 system running on an Ubuntu Server build. The system is just as much for watching movies as playing games. Currently if I want to watch netflix, I have to boot up and plug in a game controller to start kodi, which then starts Google Chrome, at which point I need the keyboard/mouse (I use a k400) to use netflix.

    I'd like to do either;
    a. Have Kodi start on boot rather than ES, exiting Kodi will bring up ES as it does now
    b. Allow my keyboard to navigate the ES menus, so I can launch Kodi with the keyboard

    I have been unable to make the keyboard work in ES.

    M 1 Reply Last reply 30 Dec 2020, 13:06 Reply Quote 0
    • M
      mitu Global Moderator @Nobodyfamous
      last edited by 30 Dec 2020, 13:06

      @nobodyfamous said in use keyboard for ES nav, or start Kodi on startup:

      a. Have Kodi start on boot rather than ES, exiting Kodi will bring up ES as it does now

      https://retropie.org.uk/docs/FAQ/#how-do-i-boot-to-the-desktop-or-kodi

      b. Allow my keyboard to navigate the ES menus, so I can launch Kodi with the keyboard

      Just configure the keyboard as you'd configure a controller in EmulationStation - press one key to start configure it, as explained in https://retropie.org.uk/docs/Controller-Configuration/.

      N 2 Replies Last reply 30 Dec 2020, 13:19 Reply Quote 1
      • N
        Nobodyfamous @mitu
        last edited by Nobodyfamous 30 Dec 2020, 13:19

        @mitu said in use keyboard for ES nav, or start Kodi on startup:

        Just configure the keyboard as you'd configure a controller in EmulationStation - press one key to start configure it, as explained in https://retropie.org.uk/docs/Controller-Configuration/.

        I tried that, but holding any key, or even the mouse buttons down, ES never triggers to configure the keyboard. Controllers no problem.

        Thanks for the link on starting Kodi at boot. I will just do that as 80% of the time it's where we go anyway. I thought I had seen that config but couldn't find it the other day.

        M 1 Reply Last reply 30 Dec 2020, 16:27 Reply Quote 0
        • N
          Nobodyfamous @mitu
          last edited by 30 Dec 2020, 13:36

          @mitu So I lloked in the config ->> autostart and it only lists autostart ES, nothing else. I can only disable autostart ES?!?!?

          I tried to edit autostart.sh, but the file does not exist. I am now lloking for an example of this file to edit.

          1 Reply Last reply Reply Quote 0
          • N
            Nobodyfamous
            last edited by Nobodyfamous 30 Dec 2020, 15:58

            so, because it is an X11 setup, I don't get the Kodi autostart option :(

            I see the logic here https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/supplementary/autostart.sh#L103

            1 Reply Last reply Reply Quote 0
            • M
              mitu Global Moderator @Nobodyfamous
              last edited by 30 Dec 2020, 16:27

              @nobodyfamous said in use keyboard for ES nav, or start Kodi on startup:

              I tried that, but holding any key, or even the mouse buttons down, ES never triggers to configure the keyboard. Controllers no problem.

              That's weird, this should work.

              so, because it is an X11 setup, I don't get the Kodi autostart option :(

              Use the DE to autostart kodi when the desktop starts - https://kodi.wiki/view/HOW-TO:HOW-TO:Autostart_Kodi_for_Linux#Configure_Kodi_to_autostart.

              N 1 Reply Last reply 30 Dec 2020, 17:13 Reply Quote 0
              • N
                Nobodyfamous @mitu
                last edited by 30 Dec 2020, 17:13

                @mitu That link to the Kodi DE stuff didn't help. I can boot into Kodi no problem, but it is not the same result as having launched Kodi from EM. When I exit Kodi, I get the blank desktop, it does not load back into ES.

                Anyhow, I tried programing the keyboard again, this time with the laptop keyboard, not my wireless k400, and it worked.

                This is good enough for me, it means I don't need to have the TV remote, Keyboard, and a game controller to watch netflix. Just the TV remote and keyboard will do.

                M 1 Reply Last reply 30 Dec 2020, 17:17 Reply Quote 0
                • M
                  mitu Global Moderator @Nobodyfamous
                  last edited by mitu 30 Dec 2020, 17:17

                  @nobodyfamous said in use keyboard for ES nav, or start Kodi on startup:

                  When I exit Kodi, I get the blank desktop, it does not load back into ES.

                  Then create a script that runs Kodi and then EmulationStation in a loop and run it from the autostart folder.

                  #!/usr/bin/env bash
                  while true; do
                  kodi-standalone
                  sleep 2
                  emulationstation
                  done
                  N 1 Reply Last reply 30 Dec 2020, 18:11 Reply Quote 1
                  • N
                    Nobodyfamous @mitu
                    last edited by Nobodyfamous 30 Dec 2020, 18:11

                    Interesting. I am not a bash wizard. Does the script wait on kodi-standalone until Kodi exits to run sleep, then emulationstation or is that running/looping in the background?

                    Second thought, what if you took it out of the loop? Once ES has started, it will launch & quit Kodi with the default behaviour. I feel like an error might occure when you

                    1. boot up into kodi
                    2. exit kodi, emulation station launches
                    3. launch kodi from emulationstation

                    at #3, would ES quit to luanch kodi, and then the script and ES would both start kodi?

                    I guess it's an easy test. Maybe later.

                    as per this thread, my ~/.config/openbox/autostart is

                    gnome-terminal --full-screen --hide-menubar -- emulationstation
                    

                    I could swap out emulationstation to run your bash script I think. just save the script in my home folder.

                    1 Reply Last reply Reply Quote 0
                    • N
                      Nobodyfamous
                      last edited by Nobodyfamous 30 Dec 2020, 18:25

                      Hey it WORKED!

                      ~/.config/openbox/autostart

                      gnome-terminal --full-screen --hide-menubar -- bash /home/pi/autostart.sh
                      

                      and
                      ~/autostart.sh (chmod +x)

                      #!/usr/bin/env bash
                      kodi-standalone
                      sleep 2
                      emulationstation

                      So on boot, Kodi launches. On first Kodi exit, the script will launch ES. From then on, ES does what it does when launching Kodi and returning to itself on exit.

                      Thanks for your help @mitu!

                      1 Reply Last reply Reply Quote 0
                      10 out of 10
                      • First post
                        10/10
                        Last post

                      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

                        This community forum collects and processes your personal information.
                        consent.not_received