Author Topic: Need Help compiling attractmode without x11  (Read 395 times)

Calvin

  • Newbie
  • *
  • Posts: 8
    • View Profile
Need Help compiling attractmode without x11
« on: October 25, 2021, 11:09:24 AM »
Hi all,

this is my first time posting here. I hope this is the right place to ask such a question.

I am trying to run attractmode with no desktop environment. I started on a clean ubuntu-server image and then installed all the dependencies.

After running make
Code: [Select]
USE_DRM=1 (also tried
Code: [Select]
USE_GLES=1 in addition) the compile finishes with some warnings, but no errors.

Running
Code: [Select]
attract now results in following error message:

Code: [Select]
Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
Thanks in advance!

« Last Edit: October 25, 2021, 11:13:49 AM by Calvin »

hermine.potter

  • Hero Member
  • *****
  • Posts: 769
    • View Profile
Re: Need Help compiling attractmode without x11
« Reply #1 on: October 25, 2021, 11:24:31 PM »
It's a problem of your OS.
to start a graphical application, you need a display environment.
on Ubuntu Server, you can't start the attract gui (command attract).
See here
See minimal GUI
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

Calvin

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Need Help compiling attractmode without x11
« Reply #2 on: October 27, 2021, 10:06:48 AM »
Hi, thank you for the answer.

I think I may have phrased my question wrong. But I got the solution for everyone that is also trying to achieve something similar.

I was trying to run attractmode directly from the console with no Desktop/GUI installed. This is possible with the latest attractmode thanks to DRM/KMS settings. You have to build the sources yourself with the USE_DRM flag. Check https://github.com/mickelson/attract/blob/master/Compile.md for instructions on how to compile.

This is, however, only one part as I found out you also have to build sfml-pi with DRM enabled (instructions for compiling: https://github.com/mickelson/sfml-pi). Instead of the regular sfml. This lets you then start attractmode with no desktop insalled.

Together with retroarch (also DRM/no X11) this gives you a console like experience for dedicated arcade machines. (kinda like retropi).