Back from XFCE to Emulationstation by systemd
-
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.targetpiMy 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=falseAnd 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 stationI have no idea why.
-
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. -
@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.
-
@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.
-
@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.
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.