This is my workaround:-
my /opt/retropie/configs/all/autostart.sh:-
python ~/MFRC522-python/rfidlaunch.py &
emulationstation
my rfidlaunch.py contains:
subprocess.call("/home/pi/nesmario.sh &" , shell=True)
when a corresponding RFID card is detected
this nesmario.sh
contains :
/opt/retropie/supplementary/runcommand/runcommand.sh 0 SYS nes '/home/pi/RetroPie/roms/nes/Super Mario Bros..zip'
emulationstation
this means my RFID script runs all the time, when the RFID card is detected in emulationstation it kills emulationstation, runs the rom as user pi and when the rom has quit relaunches emulationstation.
Thanks for all your help everybody