mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
393 stars 115 forks source link

x86_64: Can't use attract on command line without X running #666

Open substring opened 3 years ago

substring commented 3 years ago

Hi,

Say you just want to script building a romlist or scraping, starting AM from a console would produce:

Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
Abandon (core dumped)

I guess X is not necessary to scrape or build a rom list ? Would be great if argument processing could consider if X is required or not.

oomek commented 3 years ago

Would you post the debug log file please with commands that trigger the error you mentioned? I'm not seing a reason to initialize the window for commandline related tasks.

substring commented 3 years ago

Hey!

The only log is what I've posted above. My command line : attract --loglevel debug -b MAME

oomek commented 3 years ago

That's truly bizarre, I do not see anything suspicious before process_args() call. Can you enter some dodgy arg like -b NOTMAME and check what happens? maybe it's generated, but the FE is trying to start anyway.

substring commented 3 years ago

The same happens.

Also checked if the romlist file is created anyway: nothing. -b is a little verbose anf takes some time for mame as it invokes the mame binary with -listxml.