Ok thanks a lot, I see what was wrong.
In fact I was lauching emulationstation from the .xinitrc file because I wanted to avoid using openbox. But is seem not to be possible. To make it as clean as possible I edited my files like so:
This will start an openbox session in X and trigger the autostart file that i edited like so:
This will lauch emulationstation in a black xterm terminal in fullscreen which is used to display the file manager or retropie setup.