Strange Java Issue

Update

See below for the solution. Spoiler – It’s a typo.

Back in April 2020, I wrote a little program to run a sequence of LibreOffice Impress Slide shows. For ease of deployment on Windows and Linux, I built the program in Java. And it worked just fine. Here’s what the program looks like:

You can follow the whole Saga of its development using this link. The program has been working very well on Linux Mint 19 and 20 and Windows 10 for a couple of months now. I’ve not changed anything since May 16. Here’s the github repository.

Continue reading “Strange Java Issue”

ImpressShowRunner Released

ImpressShowRunner is running well on both Windows 10 and Linux Mint 19.

Go here to get the Jar file.

Here is a complete description of the program and how to use it.

The program is distributed as a JAR file and requires Java SE 11 or later to run. OpenJDK 11 is built in to Linux Mint 19 and the normal windows SE release is currently Java 8.  This will not work to run the program since it was developed for the JDK 11 version of Java. Actually. Let me get back to you on that. I have JDK 14 installed on the system I use to test on Windows 10. I need to sort out these Java version numbers and confirm that the program works on Java 8. Are Java JDK versions different from the RunTime environment versions? Let’s see.

Continue reading “ImpressShowRunner Released”

Java – We have the Technology

ShowRunnerOnLinux_2020-04-20 13-36-24
Java App running on Linux

We recently proved that Java desktop programs can be easily deployed to Windows and Linux. Now we have proved that other complex parts of the program to run a series of Impress Shows in a loop.

  1. Running the command line to launch the Impress program to show the slide show.
  2. Finding out when the show is complete.
  3. Clicking the mouse repeatedly so that the show ends when it finally reaches the black screen.

1 and 2 are pretty easy. In Qt there is a class that executes a command in another process. And you can wait on it or check to see if it is complete. We can’t wait of course since Impress just waits forever for a click on a black screen at the end. Soooo.

3 is not so easy on Qt. The solution differs by OS. On windows you need to call the Kernel to send events to be dispatched through the event handler. UINPUT calls. On Linux, the easiest solution I found was to launch the “xtodo click 1” command to perform a mouse click. The xtodo command is easily installed on Linux, but this is another step to make the program work. But the Java solution is much easier.

Continue reading “Java – We have the Technology”

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.

Continue reading “Impress Show Runner Trivial on Linux”

QtShowRunner Runs Shows in Impress

You recall my previous post about using LibreOffice Impress to show artwork?

Well that’s a problem if you have lots of artwork you want to show. The slide shows get very large and so you have a few shows, and then you want to loop them all, right? Impress does not support that. So I wrote a program to help.

SlideShows.png
Lots of Artwork Slide Shows

RunningMan.pngQtShowRunner runs a sequence of LibreOffice Impress slide shows one after the other in a loop. Currently it runs on Windows but soon the plan is to move it to Linux Mint.

See my original question about this problem here:

Chaining Impress Slide Shows Together?

After no solution appeared, I wrote a program to do it.

Here is a shot of the program dialog and the Impress Slide Show settings. You need to uncheck Change Slides by Clicking on background for QtShowRunner to work without skipping through your slides.

Here is the SourceForge page for the program.

Continue reading “QtShowRunner Runs Shows in Impress”