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

    Run Retropie From A Running X Session

    Scheduled Pinned Locked Moved Help and Support
    raspbianemustation
    7 Posts 4 Posters 9.9k 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.
    • E
      EddieHartman
      last edited by EddieHartman

      I'm having trouble running Emulationstation from an existing X session in raspbian. I just want to be able to select it from the menus in raspbian and launch. I don't want to have to log out and then launch emulationstation from the terminal. I also want to go straight back to a raspbian desktop when I close out of emulation station. Thanks for the help. (I'm using a controller so changing the source code to allow launching with an active x session may be ok, but didn't know if I would run into issues.)

      Pi Model: 3
      RetroPie Version Used: 4.0 BETA 2
      Guide: Here

      E 1 Reply Last reply Reply Quote 0
      • E
        EddieHartman @EddieHartman
        last edited by

        I tried to comment out the code about stopping emulationstation from launching if an x session is running and I just got

        Error Creating SDL window!
        Could not get EGL display
        Renderer failed to initialize!
        Window failed to initialize!
        

        I'm using the official 7 inch touchscreen display. I want to be able to just touch the emulationstation program in the menu so I don't have to have a keyboard plugged in. I can just go straight from running an amazon alexa program and google calendar to playing games. Also, the screen keeps going to sleep while playing and I have to use the keyboard to wake it back up.

        1 Reply Last reply Reply Quote 0
        • K
          Kumpfi
          last edited by

          You can write in the Terminal:
          sudo serivce lightdm stop && emulationstation
          ( u stop the xserver with that and than you start the emulationstaion)

          Use Strg + C to get back to the Terminal and write:
          sudo service lightdm start
          (u start the xserver again)

          1 Reply Last reply Reply Quote 0
          • E
            EddieHartman
            last edited by

            Thanks for the reply. I already know that I can do it this way and this is how I've been doing it currently, but what I want is to be able to just click on an icon or script from within a raspbian X session. I currently have to log out then go to the terminal and type those commands in. I want to be able to launch emulationstation with nothing but a touchscreen and controller and then be able to run startx once I close emulationstation (which I think I can just modify it's closing script and add startx at the end).

            1 Reply Last reply Reply Quote 0
            • BuZzB
              BuZz administrators
              last edited by BuZz

              I don't think there is a simple solution, unless you are confident with scripting. You would need a background task that waited for something (eg a file being created), that was running outside of X. You could then trigger it from within X, and it would then close X, and launch ES etc.

              You could also remove the login manager, and launch the desktop with startx, so that you could then just exit to ES (eg - disable starting the desktop on boot, and make it start ES), then edit /opt/retropie/configs/all/autostart.sh and add startx first. (retropie 4.x required)

              To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

              1 Reply Last reply Reply Quote 0
              • E
                EddieHartman
                last edited by EddieHartman

                For the second part of your post, autostart.sh already included startx. This was the entire file

                startx
                

                So I've tried some other things with someone who was helping me on reddit, but they didn't work. How would I go about removing the login manager? I would also want to startx and login automatically. Here is a link to what we tried if you are interested or know what may have gone wrong. Thanks.
                Edit: I also wanted to mention that my screen will dim after playing for a long time and requires me to press a button on my keyboard. Any idea what is happening there? I'm using an xbox controller with the driver and the official raspberry pi touchscreen.

                1 Reply Last reply Reply Quote 0
                • Z
                  zithro
                  last edited by zithro

                  Hey Eddie,

                  I think I did what you needed, can you please check and try this post ?

                  PS: for the dimming screen, did you add "consoleblank=0" to your cmdline ?

                  ++

                  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.