Impress Show Runner Trivial on Linux

Update 11 April 2020: Using the xdotool method, the QtShowRunner works well on Linux, so there is a portable version for Windows and Linux. Get the latest at the github repo. I’m still investigating “Deployment” for Windows and Linux. Now, previously…

I have beat my head against the wall trying to fix the QtShowRunner program that works on Windows to work on Linux. None of the methods have worked.

  • Kernel uinput API calls never worked.
  • Using the X11 XSendEvent to send either Mouse clicks or Key events didn’t work.

Finally I found a command called xdotool which does many X things including sending mouse clicks and key presses. Here’s a shell script that uses the xdotool to launch soffice impress to show a slideshow and then terminates the show and then exits the script.

Screenshot from 2020-04-09 20-11-31.png

The script launches the show with the ending & to detach it. Then loops looking for the process using pgrep and if it’s still around, uses xdotool to click the mouse and waits for  5 seconds. When the process finishes the show, and the click ends the show, then pgrep fails and the script exits. Trivial.

Here’s the output of a run.

Screenshot from 2020-04-09 20-12-22.png

Looks like soffice tossed an error along the way, but who cares, it worked just fine.

I’m not sure how I’ll incorporate this into my QtShowRunner program. But one way to do that is to just create these short scripts on the fly and feed them to the shell program to execute to run each show. Here’s an example of how to run a series of shows in an infinite loop.

Here’s an example script of how to run some slideshows in an infinite loop.

Tomorrow is another day, but we have a solution.
:ww