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

    Restart attactmode via command line (or reload attract.cfg)

    Scheduled Pinned Locked Moved Help and Support
    attractmodebash commandscriptrestartreload
    5 Posts 2 Posters 521 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.
    • S
      superdan
      last edited by

      Hi,

      sounds easy but isnt.
      How can i restart attractmode and only attractmode (so without rebooting my raspberry) via bash commandline?
      Just restart.

      in autostart.sh the command is 'startx' and no more 'attract'.

      when i try

      pi@retropie:~ $ pkill attract
      pi@retropie:~ $ attract
      

      it gives me the error

      Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
      

      also, if i run

      ./runattract
      

      it gives me

      Error: Couldn't connect to XServer passing null display
      xterm: Xt error: Can't open display:
      xterm: DISPLAY is not set
      Xorg: no process found
      

      I can also avoid to restart attractmode if there is a way to reload attract.cfg after I edit it via script

      Thanks

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

        attractmode doesn't need an X server to run on a Pi and it's not configured as such in RetroPie. I'm also not aware of any runattract script - is this something you created or it's from the image you're using ?

        S 1 Reply Last reply Reply Quote 0
        • S
          superdan @mitu
          last edited by

          @mitu in the new version of retropie for raspberry pi 4 attractmode uses X server.
          Here more details how it works
          https://pastebin.com/mAmEERyG

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

            @superdan said in Restart attactmode via command line (or reload attract.cfg):

            @mitu in the new version of retropie for raspberry pi 4 attractmode uses X server.

            The package included in RetroPie-Setup doesn't use any X server and it works just like EmulationStation. Not sure where those instructions are coming from (and when they were written), but they're obsoleted by the package included in RetroPie.

            1 Reply Last reply Reply Quote 0
            • S
              superdan
              last edited by

              @mitu thanks foru tour answer, in fact i compiled manually attractmode when 'attractmode' was not available in retropie downloads script for raspberry pi 4 but anyway it's working like a charm.
              So i guess if is there a way

              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.