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

    Back from XFCE to Emulationstation by systemd

    Scheduled Pinned Locked Moved Help and Support
    xfce systemd
    5 Posts 2 Posters 399 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.
    • T
      terror
      last edited by terror

      Hi

      I want to just made a easy systemd script to back from XFCE to EmulationStation by click one icon on desktop.

      Now I have ->

      pi@retropie:~/scripts $ cat /etc/systemd/system/rpi-emustation.service
      [Unit]
      Description=start retropie from xfce
      After=network.target
      StartLimitIntervalSec=0
      [Service]
      Type=simple
      Restart=always
      RestartSec=1
      User=pi
      ExecStart=/home/pi/scripts/xfce-emustation

      [Install]
      WantedBy=multi-user.targetpi

      My easy xfce-emustation script

      pi@retropie:~/scripts $ cat xfce-emustation
      echo "Starting emulationstation..."
      xfce4-session-logout -l ; /usr/bin/emulationstation &

      And my desktop icon / activator

      pi@retropie:~ $ cat Desktop/ES.desktop
      [Desktop Entry]
      Version=1.0
      Type=Application
      Name=ES
      Comment=
      Exec=/home/pi/scripts/xfce-emustation
      Icon=
      Path=
      Terminal=false
      StartupNotify=false

      And this not work. But my script works perfect when I run in terminal /home/pi/scripts/xfce-emustation (with FULL patch) when
      I do cd /home/pi/scripts/ && ./xfce-emustation then not works just quit xfce but not run emulation station

      I have no idea why.

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

        You don't need to create a systemd unit for the script to work if you wish to start it from your desktop only. If your system boots to XFCE, then it also starts LXDE, which is probably still running after you the logout from XFCE and will conflict with Emulationstation.
        What happens after you run your script ? Does it log you out of the desktop session.

        T 1 Reply Last reply Reply Quote 0
        • T
          terror @mitu
          last edited by terror

          @mitu my system boot direct into EmultionStation. I have menu item called 'XFCE'. When I want back to EmulationStation i need to logout and type emulationstation manualy. I want just click 'ONE ICON' on my desktop thats run script which close xfce and run emulation station. Thats all.

          I dont have LXDE.

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

            @terror If you install the desktop through the RetroPie-Setup - as explained in the [Docs] - https://retropie.org.uk/docs/FAQ/#where-did-the-desktop-go - then exiting the desktop would bring you back to ES. Did you create your own script to start Xfce from ES ? Maybe you can take a look at how the desktop start script created by the setup script and replicate it.

            T 1 Reply Last reply Reply Quote 0
            • T
              terror @mitu
              last edited by terror

              @mitu No matter. I wrote C daemon program

              case SIGUSR1:
              log_message(LOG_FILE, "Closing XFCE, running EmulationStation");
              system("/usr/bin/xfce4-session-logout -l");
              system("/usr/bin/emulationstation");
              break;
              }

              works perfect. Now when I send a signal SIGUS1 to my daemon then quit xfce (x.org) and start Emulation Station.

              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.