Here is the code:
1. from command line type:
sudo nano /etc/rc.local
2. add the following text to the bottom:
sudo /opt/retropie/emulators/mame4all-pi/mame
3. Save the file and reboot.
I looked all over for this answer and most of the things I found were out of date, so specific folders or files were not where the forums directed. I got it to work for MAME using the code above; it puts the script for launching MAME emulator from command line into the rc.local file. I dont think each emulator launches the same way, so you may want to search for the code to launch whatever emulator you choose from command line, and put that into the rc.local file.
This will bypass emulation station going straight to the emulator. If i press esc on my keyboard (or the equivalent mapped button press for controllers) I can still get back to emulation station (if I really want to). That way I can still take advantage of the awesomeness of ES and all the ROM/controller/button configurations, or F4 to access command line.
I set up my pi this way so my arcade station boots just to mame where i only have 4 player games loaded for my 4 player arcade station i built for our church youth group. Since they are only interacting with a single emulator with no buttons for exiting, nobody can accidentally go into configuration menus and mess things up. I have a GPIO button for shutdown command so they dont have to use the emulation station “shutdown” menus. I really wish the ES menus for shutdown were configurable. :(