Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 17 Nov 2018, 13:25
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Slideshow into a ScreenSaver? SOLVED -- but Improving
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [38 Posts]   Goto page: 1, 2, 3 Next
Author Message
mikeslr


Joined: 16 Jun 2008
Posts: 2781
Location: 500 seconds from Sol

PostPosted: Sat 01 Sep 2018, 21:00    Post subject:  Slideshow into a ScreenSaver? SOLVED -- but Improving
Subject description: Adding "Bells & Whistles"
 

Hi All,

Edit: Mike Walsh has published versions which can be found from this post, http://murga-linux.com/puppy/viewtopic.php?p=1003866#1003866 but see his post immediately after it for adjustments you may want to make.

Thanks to the following, in no particular order Mike Walsh, musher0, MochiMoppel, fredx181, and anyone I failed to identify including the many who have provided tricks. tips, documentation and advise on employing Yad.

Coders needed. But, I think this may be easy even if above my paygrade.

Background: Recently tjosurplus queried about a screensaver for wary. Watchdog responded "I do not know about screensaver. For slideshow in wary I should use gpicview-0.2.3-w5.pet." Emphasis supplied.

Watchdog's post stimulated this train of thought: "Sceensaver applications in Puppies seem to be 'few and far between'. And each Puppy would need a version of gpicview appropriate to it. But,

it should be possible to write a bash-script which wraps it [screensaver] in a "Do While" loop, terminated when some (any?) key is pressed. As I'm not familiar with gpicview, it might also be necessary to include in that script the selection of a folder into which the photos to be displayed are located (symlinked?).

Such script would probably work in any Puppy that can use gpicview 0.2.2 or later. https://blog.lxde.org/tag/gpicview/"

Since then I installed gpicview in Xenialpup64, and did some further research.

Starting gpicview via terminal with the argument help [i.e. gpicview --help] revealed two significant arguments that can be used:
--slideshow Start slideshow
--display=DISPLAY X display to use

Additionally, if a folder is designated it will begin to display the images in that folder. Consequently, the command, code:

cd /mnt/home/pics && gpicview --slideshow ## I do not suggest this is the best command. My knowledge of bash leaves much to be desired. Offered only because it did the following:

opened gpicview and displayed the first jpg [I haven't checked yet what other file formats are supported] in the /mnt/home/pics folder.

Pressing any key can be dangerous. Press "d" and gpicview will offer to delete; "s" to save. But both "q" and the escape key will end the application; albeit the terminal remained open. Using a bash script, rather than a terminal, should avoid that.

Gpicview did not open "Full Screen". I suspect that the --display argument can somehow be used.

As part of gpicview's installation, the following script is written /root/.config/gpicview/gpicview.conf:

[General]
auto_save_rotated=0
ask_before_save=1
ask_before_delete=1
rotate_exif_only=1
open_maximized=0
bg=#ffffff
bg_full=#000000
slide_delay=5
jpg_quality=90
png_compression=9
show_toolbar=1

Note the "open_maximized=0" argument. I assume (any you know what they say about that Laughing ) that 0 = false and 1 would equal true. But you probably don't want it to open Full Screen except when being used as a ScreenSaver. Which brings us back to the --display=DISPLAY argument available when opening gpicview from the terminal or by a script. What Full Screen means on your computer will probably depend on your screen's resolution. And I'm fairly confident that there's a bash command to determine that; another to place it in a variable which variable could be used following --display=.

Gpicview's config file showed slide_delay=5. But gpicview never moved beyond the first graphic displayed. Something wrong with my installation? My usage? And if we can get it to actually slide will it loop back from the last graphic in the folder to the first? [If so, a Do-While loop wouldn't be needed]. How many of the arguments in the config file can be temporarily over-written/altered by arguments in a bash script and how? For example show_toolbar=1 (I assume =true) which you want when using gpicview as a graphic viewer, but you wouldn't want when using it as a screensaver.

gpicview's slideshow capability were developed by Puppy fans/devs. Can we now take it further by adding screensaver capabilities or calling on those capabilities already present but unknown?

mikesLr

Last edited by mikeslr on Sun 09 Sep 2018, 10:22; edited 3 times in total
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4374
Location: King's Lynn, UK.

PostPosted: Sun 02 Sep 2018, 19:35    Post subject:  

Interesting, Mike. Like you, however, my own knowledge of Bash scripting is minimal at best...

Didn't Geoffrey put together something like this for not only Carolina, but also rg66's X-series Pups (in fact, XFCE-based Pups in general)? I'm sure it had a screensaver thing in X-Slacko 2.3.2 that changed pictures at intervals which the user could select to suit themselves..... Not that I ever really used it, but I do remember trying it out.....just to see what it did.


T'other Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 12975
Location: Gatineau (Qc), Canada

PostPosted: Sun 02 Sep 2018, 22:18    Post subject:  

Hello, mikeslr and all.

Perhaps you'll find your profit on this thread.

However, if we are simply talking about a screensaver using pictures in an
images directory, -- and NOT changing ROX's backdrop into a slide-show --,
may I suggest:

-- first, install qiv (attached)

-- now enter any image directory, open a console and type:
Code:
ls -1 *.*g | grep -v svg > liste

-- here is the script to make qiv act as a slideshow viewer:
Code:
#!/bin/ash
# /root/my-applications/bin/diapo-qiv-lst.sh
# (c) musher0, Sept. 2, 2018. GPL3.
#
# Usage --
# Enter a directory of images and type:
# diapo-qiv-lst.sh 7
# The number at the end is the number of seconds
# during which we want to display the image.
# Please see note at end,
#
# You get the list of images to display by entering
# an image directory and typing in console:
# ls -1 *.*g | grep -v svg > liste
#
####
# qiv -s -d $1 -f -t -m -C -P -F liste

# Notes--
# -- You may wish to hard code the $1 variable to
# a number of seconds instead.
# Ex.: qiv -s -d 8 -f -t -m -C -P -F liste
#
# -- If you are always using the same images, you can
# hard code the liste of images too, like so:
DiR=/usr/share/backgrounds # put the name of your image directory here.
cd $DiR
qiv -s -d 8 -f -t -m -C -P -F $DiR/liste
# and drag the modified script on the ROX desktop, so you can
# simply click on it to view your slide show.
#

Please note that the above is preconfigured to show a slide show of the
images in /usr/share/backgrounds. It shouldn't be too difficult to adapt
to another directory of images.

One limitation is that qiv does not know what to do with svg files.

(Edit, 10 minutes later:)
Another is that qiv reacts differently with different window managers:
it may -- or not -- show a title bar even in full screen mode. In echinus
WM, e. g., it shows one.
(End of edit)

If you wish to know the meaning of the settings in the one-liner, type in
console
Code:
qiv --help
or hit F1 while qiv is displaying a picture.

I hope this fills your need.

BFN.

(Edited)
diapo-qiv-lst.sh.zip
Description  Unpack in /root/my-aspplications/bin, make executable, create the images list and run.
zip

 Download 
Filename  diapo-qiv-lst.sh.zip 
Filesize  681 Bytes 
Downloaded  21 Time(s) 
qiv-2.3.1.pet
Description  (32-bit version)
pet

 Download 
Filename  qiv-2.3.1.pet 
Filesize  81.72 KB 
Downloaded  23 Time(s) 

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)

Last edited by musher0 on Mon 03 Sep 2018, 14:56; edited 2 times in total
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 1680
Location: Italy

PostPosted: Mon 03 Sep 2018, 04:49    Post subject: Re: How to Turn gpicview into a ScreenSaver?  

mikeslr wrote:

Since then I installed gpicview in Xenialpup64, and did some further research.

Starting gpicview via terminal with the argument help [i.e. gpicview --help] revealed two significant arguments that can be used:
--slideshow Start slideshow
--display=DISPLAY X display to use

Additionally, if a folder is designated it will begin to display the images in that folder. Consequently, the command, code:

cd /mnt/home/pics && gpicview --slideshow ## I do not suggest this is the best command. My knowledge of bash leaves much to be desired. Offered only because it did the following:

opened gpicview and displayed the first jpg [I haven't checked yet what other file formats are supported] in the /mnt/home/pics folder.


You might use a FILE (not a DIR) in the command. For example:

Code:
gpicview --slideshow /root/Albano/PIC_0001.JPG


works for me to start gpicview in slideshow mode.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12975
Location: Gatineau (Qc), Canada

PostPosted: Mon 03 Sep 2018, 04:59    Post subject:  

Hello all.

I just discovered two settings of xlock that may be of interest for this
project:
-startCmd
and
-program
Reference: https://linux.die.net/man/1/xlock

I have not been successful yet, but it may be worth invertigating how this
works. Perhaps it is possible to have xlock call gpicview or a qiv script, and
have the benefit of locking the screen as well as the benefit of the picture
viewer.

Apparently you can have a line such as
Code:
xlock -program "gpicview"
and xlock will call gpicview instead of one of its own modes.

I'll keep you posted.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1678
Location: Japan

PostPosted: Mon 03 Sep 2018, 08:56    Post subject: Re: How to Turn gpicview into a ScreenSaver?  

mikeslr wrote:
Background: Recently tjosurplus queried about a screensaver for wary. Watchdog responded "I do not know about screensaver. For slideshow in wary I should use gpicview-0.2.3-w5.pet." Emphasis supplied.

Just curious: Why gpicview? Have you tried viewnior, Puppy's standard image viewer?
The only problem with viewnior I've found is that the interval setting for the slideshow does not work, but this may be caused by my set-up and hopefully is not a bug.

[Edit] OK, let's forget viewnior. It's a very old bug and until recently not yet fixed.
Of course if you are content with the 5sec. interval then everything is fine Laughing
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 2781
Location: 500 seconds from Sol

PostPosted: Mon 03 Sep 2018, 10:58    Post subject: Changed the Title/focus of this thread  

Hi All,

Thanks, musher0, for suggesting qiv. I didn't use the pet you provided as it may not be appropriate for all Puppies. Rather, currently running Xenialpup64, I downloaded a version via Puppy Package Manager. Although I selected "Download and all dependencies", there were none of the latter. The package downloaded was only 61 Kilobytes which included man & doc folders in /usr/share. After download it is possible that those could be discarded.

I checked. Packages are also available for Slackware; hence Slackos: most likely any version of Puppy.

The advantage of qiv over gpicview is that the former has clear instructions regarding what command-line arguments are available. Although the qiv package, itself, may differ from Puppy to Puppy, it may be easy to write a universal pet which will configure it as a Full Screen slideshow and invoke it and terminate it.

I'll be playing with it ASAP.

Thanks, again

mikesLr
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 1680
Location: Italy

PostPosted: Mon 03 Sep 2018, 11:02    Post subject: Re: How to Turn gpicview into a ScreenSaver?  

MochiMoppel wrote:
mikeslr wrote:
Background: Recently tjosurplus queried about a screensaver for wary. Watchdog responded "I do not know about screensaver. For slideshow in wary I should use gpicview-0.2.3-w5.pet." Emphasis supplied.

Just curious: Why gpicview? Have you tried viewnior, Puppy's standard image viewer?


I often used gpicview in other puppies in order to start a slideshow. I am not able to use viewnior for slideshow in every puppy.

EDIT: it's a my mistake. I am now in slacko 5.7 and viewnior has not a clear button to start a slideshow. But it does exist up right (a little button to open Properties). Allthough gpicview has a more friendly use in my opinion.
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 2781
Location: 500 seconds from Sol

PostPosted: Mon 03 Sep 2018, 18:09    Post subject: Do Take a Look at qiv  

Hi All,

Been doing a little exporation of qiv. It provides lots of documentation I haven't run thru, but the help file is really helpful. Very Happy

The command "qiv -slide /usr/share/backgrounds" is all that is necessary to start a slideshow of the images there. The documentations indicates it is able to display many common file formats including svg, and some I wasn't familiar with. Changing the command to "qiv -slide -f /usr/share/backgrounds" presents a full screen display. Esc exits qiv.

Adding -C to the command either loops to the beginning, or stops looping. I could read the help line either way, so will have to test. There's also an argument for changing the duration before moving to the next image from the default 3 seconds.

Probably a simple bash-script, icon and desktop file are all that is needed for a newby to initiate a slide show of images in /usr/share/backgrounds. But a GUI to enable a newby user to change the folder and customize some options would be great.

And, I really like musher0's idea of possibly having xlock call qiv.

mikesLr

p.s. Maybe simultaneously invoke a music file; 'though others have limited exposure to the images appearing on your desktop while sound waves have a tendency to travel. I recently caught a broadcast about some woman who was arrested for disturbing the peace (meaning that of her neighbors) because the music she played. However, it had taken some time before the authorities acted. She had been playing the same aria 24/7 the last 15 years.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1678
Location: Japan

PostPosted: Mon 03 Sep 2018, 19:32    Post subject: Re: How to Turn gpicview into a ScreenSaver?  

watchdog wrote:
EDIT: it's a my mistake. I am now in slacko 5.7 and viewnior has not a clear button to start a slideshow. But it does exist up right (a little button to open Properties). Allthough gpicview has a more friendly use in my opinion.

What do you need a buttom for? Aren't we talking about a slideshow started by script? For that viewnior offers the same command line options as the other programs mentioned. I agree that other programs might perform better. I only was curious why mikeslr started with gpicview, a program that obviously was not installed in his Puppy, while shunning viewnior, a program I assumed already existed.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4374
Location: King's Lynn, UK.

PostPosted: Mon 03 Sep 2018, 20:11    Post subject:  

Hi, Mike.

Neat little app. Neat, and simple.....like all the best Puppy apps should be.

In Slacko 560 this evening. Had a wee dig through pkgs.org, to see what I could find. Found a package for Slackware 13.37, the precursor to Slackware 14.0 (which 560 and 570 are based on). Works nicely.....so here's a .pet of qiv for 560 & 570 (attached below).

Code:
qiv -s -d x /path/to/your/directory


.....will give a slideshow of the contents of any directory (where 'x' is the delay in seconds between images).

I might have a play around with YAD, and see what I can come up with.....and teach myself about variables while I'm at it; it's high time I learnt how to use them.

Watch this space.


Mike. Wink
qiv-2.3.1-i686-s14.0.pet
Description  Q.I.V - Quick Image Viewer for Slacko 560 & 570
pet

 Download 
Filename  qiv-2.3.1-i686-s14.0.pet 
Filesize  81.42 KB 
Downloaded  21 Time(s) 

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 12975
Location: Gatineau (Qc), Canada

PostPosted: Mon 03 Sep 2018, 21:23    Post subject:  

Hello, mikeslr.

Concerning music, I believe all puppies have:
-- madplay (despite the name, it does not play crazy music! It plays mp3's,
quite competently, might I add);
-- wavplay (it should be obvious what music format this utility plays).

Some Pups may also have:
ogg123
flac123
opusdec

So to have a sound and picture show on your Pup, it is as simple as having
a script that starts whatever viewer with an ampersand at the end of the
line to background it, and then
madplay song.mp3

E.g.
Code:
qiv -s -d 8 -f -t -m -C -P /root/my-documents/my-pictures/HorrorMoviePosters & madplay /root/my-documents/my-music/Overweight-Diva-Trying-to-Sing-While-Being-Strangled-with-the-Phantom's-Punjab-Lasso.mp3
Laughing Wink

OR, more seriously:
Code:
qiv -s -d 8 -f -t -m -C -P /usr/share/backgrounds & madplay /mnt/home/Musique/jazz/John_Coltrane/The_Gentle_Side_of/*.mp3
(since madplay can play all mp3's in a music directory.)

BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 12975
Location: Gatineau (Qc), Canada

PostPosted: Mon 03 Sep 2018, 21:48    Post subject:  

Hello all.

Almost forgot:

-- thanks mikeslr, for the note on qiv and svg. I had not realized qiv was
able to show svg pictures as well. Strangely, I can't get qiv to show a svg
picture by clicking on it, but if I type
Code:
qiv /directory/*.svg
, they show properly.

-- It's not that important, but a list of pictures put together by
Code:
ls -1 *.jpg > list
might not be in the absolute same order as the list qiv creates for its own
use from the pics in a directory. Please see parms -M and -N on the qiv
man page at https://linux.die.net/man/1/qiv concerning this.

BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4374
Location: King's Lynn, UK.

PostPosted: Wed 05 Sep 2018, 10:48    Post subject:  

Hiya, Mike/all :-

Well, with a bit of help from Fred/MochiMoppel (thanks, guys!), here's a wee GUI app for a newbie to use QIV in 'slideshow mode'. Hopefully, it'll cover one of your criteria, anyway... As for converting to a screensaver, well, somebody'll probably come up with the code for it. I don't somehow think it'll be me, though according to the project's home page, a screensaver is one of its envisaged uses.....






You can select the directory you want, and set the 'timeout value'. It's currently fixed on full-screen & 'no-status-bar', but I may well have a play around and add these as options over the next few days (time permitting). An up-to-date version of YAD is included; it's fully backwards-compatible, so shouldn't create any conflicts with older apps, etc.

To quit at any time, hit 'Escape' or 'q'.

You can find 'em at my GDrive, here:-

https://drive.google.com/drive/folders/1V-Nd1ZSs7fEeuVXIpFGOgj41EbpMSlqQ?usp=sharing

Navigate through and download the one you want.

Enjoy!


Mike. Wink

Last edited by Mike Walsh on Wed 05 Sep 2018, 19:19; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
Mike Walsh


Joined: 28 Jun 2014
Posts: 4374
Location: King's Lynn, UK.

PostPosted: Wed 05 Sep 2018, 12:50    Post subject:  

Have discovered two important parameters to add to the exec line. I discovered these when viewing a directory of stuff, some of which showed in real-size, larger than the screen.....and others which were quite small, and stayed in the center of the screen.

Following musher0's link to the qiv man page:-

-m ; will expand smaller images to fit the screen, while preserving aspect ratio.

-t ; will scale down images which are larger than screen resolution to similarly fit the screen.

To make use of these after you've installed the .pet, go into /usr/local/bin, open qiv-gui.sh, and edit the exec stanza of the final line from:-

Code:
'qiv -s -f -i -d %2 %1'


...to :-

Code:
'qiv -s -f -i -m -t -d %2 %1'


.....adding '-m -t' after '-i', and before '-d'.

All images will now auto-resize to fit your screen correctly. This occurs simply because it appears that qiv reads every single image it displays at the original resolution.....what ever that might happen to have been.

I'll re-pack and re-upload these later, to include these changes. Remember; this is fully intended to be a simple, no-frills slideshow viewer.....only including the most basic of variables for the task at hand.

Currently running the 'i686' version in Racy 5.5. Works well.

Edit:- @ 9.30 pm-ish - Re-packed and re-uploaded with additional parameters added.


Mike. Wink

_________________
MY PUPPY PACKAGES | 'Thanks' are always appreciated!
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 3 [38 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1801s ][ Queries: 12 (0.0319s) ][ GZIP on ]