Page 1 of 1

Display a PNG image onscreen for x number of seconds? (Trying to figure out how to display a splash screen)

Posted: Tue Dec 01, 2020 1:08 pm
by mikewalsh

Afternoon, all.

I've been trying to research this one for the last 2-3 hours, and not getting anywhere with it.

We all know it's possible to display messages on-screen, which can timeout after x number of seconds; gtk-dialog, gxmessage, yaf-splash, etc. What I'm wondering is if it's possible to display an image in the same way.....not within a viewer window, but directly onto the JWM/Rox desktop, by itself, for so long.....and then timeout after your chosen number of seconds?

I'm attempting to figure out the simplest way possible to display a PNG image as a 'splash screen'. It's all ready to go; I just need an easy way to display it. Any suggestions, thoughts, ideas, etc, would be very much appreciated. (Esoteric ideas are NOT really what I'm looking for; I'm a total idiot when it comes to coding, so 'simple' is good!!)

TIA, guys.

Mike. ;)


Re: Display a PNG image onscreen for x number of seconds? (Trying to figure out how to display a splash screen)

Posted: Tue Dec 01, 2020 1:58 pm
by taersh

Maybe this is of some help?

launcher.tar.gz
(139.77 KiB) Downloaded 40 times

Extract, open the directory and click the launch script.
Image disappears after 14 seconds.


Re: Display a PNG image onscreen for x number of seconds? (Trying to figure out how to display a splash screen)

Posted: Tue Dec 01, 2020 3:31 pm
by mikewalsh

@taersh :-

Hey, cheers for that, Rainer. You's "the man"..! :D

That is indeed precisely what I've been looking for. I wasn't aware gtk-dialog could make use of icons, but now I am.

Taking your script as a starting-point, what I've done is to simplify it as far as I can, along with a couple of modifications. I stripped out the audio-related stuff, since I don't need that, and basically 'boiled-it down' to a single gtk-dialog line. Like so:-

Code: Select all

#!/bin/sh
#
# Display splash image
#
HERE="$(dirname "$(readlink -f "$0")")"
#
$HERE/gtkdialog-splash -icon $HERE/launch.jpg -placement center -bg black -fg white -close never -timeout 6 2>/dev/null
sleep 2

And here's the result (not the image I shall be using, but it serves to illustrate the point):-

Image

.....which is just what I wanted; nice'n'simple, and gives me the desired result. Thanks!

Mike. ;)


Re: Display a PNG image onscreen for x number of seconds? (Trying to figure out how to display a splash screen)

Posted: Tue Dec 01, 2020 4:22 pm
by mikewalsh

And this is what it was all in aid of.....my 'project' for the last day or two.

My 'daily driver' is the 64-bit variant of jrb's 'take' on BK's Quirky 'April' 7.0.1. After much patient upgrading/modernizing/customizing, it now does everything I could ask of it, including running Zoom (albeit from a chrooted Xenialpup64 'jail', along with a few other things).

The only thing it steadfastly refuses to do is to run radky's JWMDeskManager. Try as I might, every attempt to get this working screws up the 'X'-server to such an extent that I have to re-install from backup.....so I've given up on it, and built my own using YAD!

I call it "Quirky 'DeskApps'":-

Image

(PP-reset is a bunch of scripts I put together to copy the contents of the /root/Choices/ROX-Filer/PuppyPin file to a location in /mnt/home, prior to passing control back to either the shutdown or re-boot scripts. This button allows me to 'reset' the desktop in the - admittedly rare! - event that the PuppyPin file either doesn't load, or goes AWOL. Touch wood, it hasn't happened for some time now, but a year or two back, on the old hardware, I went through a spell when it was happening quite regularly; I got really fed-up with having to keep re-building my desktops, so I decided to do summat about it...)

There's absolutely no NEED for a 'splash screen' - it works fine without it! - but I just wanted one..... :roll: :D So; that's what it got..! :lol:

Mike. ;)


Re: Display a PNG image onscreen for x number of seconds? (Trying to figure out how to display a splash screen)

Posted: Tue Dec 01, 2020 5:18 pm
by taersh

I think I got this from fredx181 and I'm using it with a .gif file showing a sequence of a rocket launching.
The audio stuff I added is to add sound playing while the .gif's rocket is launching.
Audio is playing sound of a rocket launch.
I'm using this in front of the start of my QTR-Suite, which takes around 12 seconds to appear on the screen.
The QTR-Suite is my project management for all my music programs and musical compositions.

Great, that it does what you want.