My ability to fix your issues is entirely dependent upon knowing what the errors are. Also, you have the ability to open that script and read the line for yourself, don’t forget that.
So, if you haven’t run anything that uses X on your RetroPie, it’s possible that the Xorg server has not been setup to allow other users to run it, something we require.
As root (or through sudo), run dpkg-reconfigure x11-common. It will ask you who should be allowed to run X, select “Anyone” and you should be good afterwards.
I’m not sure why that message would not be seen as it’s supposed to be in a dialog box with an OK button so….?