Exit impress at end of slideshow

I’d like to run Impress like this from a script:

libreoffice --impress --show --norestore show1.pptx
libreoffice --impress --show --norestore show2.pptx
libreoffice --impress --show --norestore show3.pptx

with each slideshow exiting at the end and allowing the next slideshow to start. In the past we’ve done this with Powerpoint, but I can’t find any mechanism to make Impress exit when the slideshow is done, rather than displaying the black “click to exit” screen.

This is for a hallway display, and I won’t have any control over how the slideshows are created. They’re made by other people and dropped into place.

I have the same problem. I could not find a way to finish the presentation without human intervention

indeed, not so many responses around here … like How to make Impress exit after auto-play slideshow?
Auto Play presentations for unattended kiosk

maybe because of this FAQ : Starting an ODP presentation automatically - The Document Foundation Wiki

otherwise, seems a macro could do the trick :

Global oController as Object
Global oPresentation as Object

sub runPresAndClose(myFile as String)
  Dim args(0) as new com.sun.star.beans.PropertyValue
  StarDesktop.loadComponentFromURL(ConvertToUrl(myFile), "_blank", 0, args) 

  oPresentation = ThisComponent.getPresentation()
  Listener = createUnoListener("EV_","com.sun.star.presentation.XSlideShowListener")

  oPresentation.Start()

  oController=oPresentation.Controller
  oController.addSlideShowListener(Listener)
end sub

Sub EV_slideEnded(oEv)
  if  oController.getCurrentSlideIndex =  (oController.SlideCount - 1) then 
   oPresentation.end
   'ThisComponent.close(false)
   'StarDesktop.terminate
  end if
End Sub

to be launched with :
libreoffice "macro:///Standard.Module1.pres(your_doc_path.odp)"