@mitu Ah, that scuppers those plans then. I think I'll give this up as a failed experiment. I did manage to get Kodi to launch from my green button by importing psutil and check_output and changing the code to

espid = int(check_output(["pidof","-s","emulationstation"])) es = psutil.Process(espid) es.suspend() Kodi = subprocess.Popen("/home/pi/RetroPie/roms/ports/Kodi.sh") Kodi.wait es.resume()

But then the script would no longer start from my crontab on boot so not really usable.