Could you paste the contents of your retropie.sh file?
It sounds like emulationstation gets started multiple times…
That should not happen.
Did you create the menu shortcut manually or in the script?
Sure, the contents are as follows (excluding the opening comments) I manually created the shortcut. I told the script to create it but then I couldn’t find where it was anywhere in OSMC:
sudo openvt -c 7 -s -f clear
sudo openvt -c 7 -s -f echo “Running emulationstation from KODI”
sudo su osmc -c “sh /home/osmc/retropie_watchdog.sh &” &
sudo su osmc -c “nohup openvt -c 7 -f -s emulationstation >/dev/null 2>&1 &” &
sudo openvt -c 7 -s -f clear
sleep 2
sudo su -c “systemctl stop mediacenter &” &
exit
Hmmm. Maybe this script is started twice.
Could you post the contents of the following file please:
/home/osmc/.kodi/userdata/addon_data/script.skinshortcuts/mainmenu.DATA.xml
Maybe I have messed something up in the automatic shortcut setup.
This is the connects of mainmenu.DATA.xml.
I’m assuming the “es” is the shortcut I manually created?
<?xml version='1.0' encoding='UTF-8'?>
<shortcuts>
<shortcut>
<defaultID>movies</defaultID>
<label>342</label>
<label2>Common Shortcut</label2>
<icon>DefaultMovies.png</icon>
<thumb />
<action>ActivateWindow(Videos,MovieTitles,return)</action>
</shortcut>
<shortcut>
<defaultID>tvshows</defaultID>
<label>20343</label>
<label2>Common Shortcut</label2>
<icon>DefaultTVShows.png</icon>
<thumb />
<action>ActivateWindow(Videos,TVShowTitles,return)</action>
</shortcut>
<shortcut>
<defaultID>videos</defaultID>
<label>10006</label>
<label2>Common Shortcut</label2>
<icon>DefaultVideo.png</icon>
<thumb />
<action>ActivateWindow(Videos,root)</action>
</shortcut>
<shortcut>
<defaultID>music</defaultID>
<label>10005</label>
<label2>Common Shortcut</label2>
<icon>DefaultMusicAlbums.png</icon>
<thumb />
<action>ActivateWindow(Music,root)</action>
</shortcut>
<shortcut>
<defaultID>pictures</defaultID>
<label>10002</label>
<label2>Common Shortcut</label2>
<icon>DefaultPicture.png</icon>
<thumb />
<action>ActivateWindow(Pictures)</action>
</shortcut>
<shortcut>
<defaultID>myosmc</defaultID>
<label>My OSMC</label>
<label2>Custom shortcut</label2>
<icon>home/DefaultOSMC.png</icon>
<thumb />
<action>RunScript(service.osmc.settings)</action>
</shortcut>
<shortcut>
<defaultID>1036</defaultID>
<label>1036</label>
<label2>Common Shortcut</label2>
<icon>home/DefaultFavourites.png</icon>
<thumb />
<action>ActivateWindow(Favourites)</action>
</shortcut>
<shortcut>
<defaultID>programs</defaultID>
<label>10001</label>
<label2>Common Shortcut</label2>
<icon>DefaultProgram.png</icon>
<thumb />
<action>ActivateWindow(Programs,Addons,return)</action>
</shortcut>
<shortcut>
<defaultID>weather</defaultID>
<label>12600</label>
<label2>Common Shortcut</label2>
<icon>home/DefaultWeather.png</icon>
<thumb />
<action>ActivateWindow(Weather)</action>
</shortcut>
<shortcut>
<defaultID>livetv</defaultID>
<label>32022</label>
<label2>Common Shortcut</label2>
<icon>home/DefaultLiveTV.png</icon>
<thumb />
<action>ActivateWindow(TVGuide)</action>
</shortcut>
<shortcut>
<defaultID>radio</defaultID>
<label>32087</label>
<label2>Common Shortcut</label2>
<icon>home/DefaultRadio.png</icon>
<thumb />
<action>ActivateWindow(RadioGuide)</action>
</shortcut>
<shortcut>
<defaultID>settings</defaultID>
<label>10004</label>
<label2>Common Shortcut</label2>
<icon>home/DefaultSettings.png</icon>
<thumb />
<action>ActivateWindow(Settings)</action>
</shortcut>
<shortcut>
<defaultID>power</defaultID>
<label>33060</label>
<label2>Common Shortcut</label2>
<icon>home/DefaultPower.png</icon>
<thumb />
<action>ActivateWindow(shutdownmenu)</action>
</shortcut>
<shortcut>
<defaultID />
<label>es</label>
<label2>Custom shortcut</label2>
<icon>DefaultShortcut.png</icon>
<thumb />
<action>System.Exec(/home/osmc/retropie.sh)</action>
</shortcut>
</shortcuts>
MOD EDIT: Please use code formatting or pastebin so as keep things neat and easily readable by others.
@mcobit : I’ve the same problem and installed 2 times a completely new “osmc rc4” with osmc skin on my raspberry pi2. After that, i started your script with osmc user and reboot the pi. When i start the advanced launcher addon with command “retropie.sh”, then start the emulation station with the controller config. It looks like everything is ok, but if i quit the emulation station, then comes the following message: shutdown command not found - EmulationStation will restart in 5 seconds. Do have any ideas how i can fix it?
Looks fine to me. Anybody else has this problem?
Maybe your remote is sending the start signal twice?
You have to quit emulationstation (last entry in the quit menu), not reboot and not shutdown.
Hmm, i use the quit function (last entry) to exit the emulationstation. that’s strange…
Maybe they changed something in RetroPie.
I will redownload all Binaries myself and try again. Stay tuned.
Could someone post the contents of /usr/bin/emulationstation please?
contents of /usr/bin/emulationstation
!/bin/bash
es_bin=“/opt/retropie/supplementary/emulationstation/emulationstation”
if [[ $(id -u) -eq 0 ]]; then
echo “emulationstation should not be run as root. If you used ‘sudo emulationstation’ please run without sudo.”
exit 1
fi
if [[ -n “$(pidof X)” ]]; then
echo “X is running. Please shut down X in order to mitigate problems with loosing keyboard input. For example, logout from LXDE.”
exit 1
fi
key=“”
while [[ -z “$key” ]]; do
$es_bin “$@”
echo “EmulationStation will restart in 5 seconds. Press a key to exit back to console.”
IFS= read -s -t 5 -N 1 key
done
Yeah, great. They changed their script by adding this strange bahviour.
I’ll ship my own version then sigh
Ok, please run the Install script again to update it and then again to make the needed changes.
If you already installed the Binary emulators, choose cancel in The RetroPie dialog and let it finish.
Fantastic!
Works now, when I exit emulationstation it goes back into OSMC.
Now I just need to work out how to import all my settings from my standalone emulation station install so it all works seamlessly in OSMC.
Thanks for the fantastic work and effort.
You’re welcome. This was something I personally wanted to do for a long time and thought it wouldn’t hurt to share.
I really like that it is of use for others, too.
@mcobit: Great job!
Now it works fine and i can finish my setup.
Thanks for your help and for the really great script
@mcobit has anybody else had the problem of their dac changing I have a iqaudio dac and now it has changed to alsa bcm 2835 I think ive re imaged the sd card so im gonna install it all again when you say install script again do you mean the whole thing as in wget https://raw.githubusercontent.com/mcobit/retropie-osmc/master/INSTALL_RETROPIE_ON_OSMC_RC.sh
Run the script:
chmod +x INSTALL_RETROPIE_ON_OSMC_RC.sh
sudo ./INSTALL_RETROPIE_ON_OSMC_RC.sh
Just run the script again. It will download the newest version automatically.
these 2 you mean chmod +x INSTALL_RETROPIE_ON_OSMC_RC.sh
sudo ./INSTALL_RETROPIE_ON_OSMC_RC.sh
I also tried to install the ps3 controller software but it wouldn’t work how do I go about doing that mate