Add attract mode front end?

Hello! A firmware update allowing 240p composite was released last week! Woohoo! Time to continue pi project. I decided to try lakka. I love it so far. XMB is really nice and simple, and looks well at 480i, but you can’t read the tiny text at 240p. Another member here suggested I try RGUI. It works well for 240p!

I created a really nice layout for the attract mode front end to use on my arcade machine with a full pc. It would be neat to run the same layout on my tv. Does anyone have any insight on how to get attractmode installed with lakka?

My attract mode layout - “flavors”

My TV running lakka with 240p firmware. Tv needs some adjusting in service menu. Not an easy task on this tv.

Don’t have a Pi but this might work for you.

use a USB drive or use samba share and put the Attract mode binary and its needed libs inside a writable folder (like /storage/attract or something) you can find what libs are needed by running “ldd attract”

SSH to your Lakka PI and test that is works by running

systemctl stop retroarch LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib ./storage/attract/attract

if it loads then edit/create an autostart.sh file inside /storage/.config:

nano /storage/.config/autostart.sh

put something like this inside:

( export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib ./storage/attract/attract ) &

Now reboot and if everything is correct, attract should start at boot.

1 Like

Thank you for your help. I have an option for attract mode, download a deb and a git repo for aur. Which should I be performing? Sorry, but I have always used linux but am more of a mac power user.

Can you explain to me what the LD_LIBRARY_PATH environment variable is and does?

On my mac, I inserted the disk I made and set up. Run in terminal cd/Volumes/LAKKA/.config, and ls -a yields some files, but no autostart.sh. Should I create it?

The LD_LIBRARY_PATH is just to point to the library files that might be needed for attract that are not included with Libreelec, like the SFML library.

I do not know which one you should be downloading, sorry. My instructions where if you had the executable binary handy. I don’t think you can install a .deb package nor compile from source in Libreelec, so you are going to have to extract the executable from it. it also has to be compatible with the arch you use in your device, if its for the PI its arm most likely.

if the autostart.sh file does not exists you can create it.

2018-12-13%2018_07_22-Error I copy attract executable and the rest of the application in /storage/attract

After doing ldd attract, i get 27 libraries. I copy them all in /storage/attract/lib/

ld-linux-armhf.so.3
libarmmem.so
libasound.so.2
libavcodec.so.58
libavformat.so.58
libavutil.so.56
libbcm_host.so
libbrcmEGL.so
libbrcmGLESv2.so
libbsd.so.0
libc.so.6
libdl.so.2
libexpat.so.1
libfontconfig.so.1
libfreetype.so.6
libgcc_s.so.1
libjpeg.so.62
libm.so.6
libmmal_core.so
libmmal_util.so
libmmal_vc_client.so
libopenal.so.1
libpng16.so.16
libpthread.so.0
librt.so.1
libsfml-graphics.so.2.4
libsfml-system.so.2.4
libsfml-window.so.2.4
libsndio.so.6.1
libstdc++.so.6
libswresample.so.3
libswscale.so.5
libudev.so.1
libvchiq_arm.so
libvcos.so
libvcsm.so
libz.so.1

and

systemctl stop retroarch LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib ./storage/attract/attract

And he answers the error message of the image. Has anyone achieved anything else?

MY ERROR: “;” missing…

systemctl stop retroarch; LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib /storage/attract/attract

Without “.” runs, and attract mode shows in pi.

But, this:

(export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/attract/lib /storage/attract/attract) &

in /storage/.config/autostart.sh

not boot with attract mode, only shows retroarch.

Apparently in lakka there is a retroarch-autostart.service that prevents autostart.sh from running and keeps always running retroarch, if you execute the option of the retroarch menu Quit Retroarch, that service activates it again. The problem is that I have no idea how to prevent that service from being launched when starting lakka.

I already got it, the “export” was not necessary.

Did you manage to make AttractMode work on Lakka? I love the smooth way Lakka boots up, but I need a simpler interface for my arcade cabinet, so… any success?