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.
    • NobodyfamousN
      Nobodyfamous
      last edited by

      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.

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @Nobodyfamous
        last edited by

        @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/.

        NobodyfamousN 2 Replies Last reply Reply Quote 1
        • NobodyfamousN
          Nobodyfamous @mitu
          last edited by Nobodyfamous

          @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.

          mituM 1 Reply Last reply Reply Quote 0
          • NobodyfamousN
            Nobodyfamous @mitu
            last edited by

            @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
            • NobodyfamousN
              Nobodyfamous
              last edited by Nobodyfamous

              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
              • mituM
                mitu Global Moderator @Nobodyfamous
                last edited by

                @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.

                NobodyfamousN 1 Reply Last reply Reply Quote 0
                • NobodyfamousN
                  Nobodyfamous @mitu
                  last edited by

                  @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.

                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @Nobodyfamous
                    last edited by mitu

                    @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
                    
                    NobodyfamousN 1 Reply Last reply Reply Quote 1
                    • NobodyfamousN
                      Nobodyfamous @mitu
                      last edited by Nobodyfamous

                      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
                      • NobodyfamousN
                        Nobodyfamous
                        last edited by Nobodyfamous

                        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
                        • First post
                          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.