0

I have a Raspberry Pi 3 running Raspbian via the NOOBS installer.

I recently installed RetroPie on top of Raspbian with the setup script retropie_setup.sh. This allows me to start EmulationStation from the terminal by running emulationstation.

Now I want to add a desktop shortcut to launch EmulationStation directly from Raspbian. I tried to create a shortcut myself as emulationstation.desktop, but running the shortcut had no effect.

[Desktop Entry]
Name=EmulationStation
Comment=Desktop shortcut for EmulationStation
Exec=emulationstation
Type=Application
Encoding=UTF-8
Categories=Application;Game;

A guide on RobbysWeb.com suggested closing the desktop with Exec=pkill Xorg. However, this method only works if EmulationStation is already running in the background.

How can I create a desktop shortcut to EmulationStation/RetroPie from Raspbian?

0

Why don't you create your own bash script that starts retropie in the background and then kills the desktop?

create a script, /home/pi/startES.sh which contains

#!/bin/sh
emulationstation
sleep 2
pkill Xorg

then make it executable by typing

sudo chmod +x /home/pi/startES.sh

then change the desktop shortcut line Exec=emulationstation so it reads

Exec=/home/pi/startES.sh

This will (hopefully) start your script startES.sh which will start ES then kill the desktop!

If that script doesn't work, you could try experimenting and adjusting it so it kills the desktop first then starts emulationstation, or starts ES then kills the desktop then starts ES again... or whatever works.

0

Killing the desktop first works, but required sudo in my case.

#!/bin/sh
sudo pkill Xorg
emulationstation

(this is in response to the answer provided above by scitronboy) QUOTE:

Why don't you create your own bash script that starts retropie in the background and then kills the desktop?

create a script, /home/pi/startES.sh which contains

!/bin/sh emulationstation sleep 2 pkill Xorg then make it executable by typing

sudo chmod +x /home/pi/startES.sh

then change the desktop shortcut line Exec=emulationstation so it reads

Exec=/home/pi/startES.sh

This will (hopefully) start your script startES.sh which will start ES then kill the desktop!

If that script doesn't work, you could try experimenting and adjusting it so it kills the desktop first then starts emulationstation, or starts ES then kills the desktop then starts ES again... or whatever works.

  • You may get more recognition for your answer if you can provide a bit more detail. The answer implies you have a bash script; if so, how do you run this script?, where is the script located?, etc. No need to "go overboard", but enough that another reader can understand how to use your answer to solve his issue. – Seamus Jul 28 '18 at 16:51
  • I wanted to add my reply as a comment, on the preceding reply by scitronboy, but was unable to reply. – Roogna_ Jul 29 '18 at 2:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.