nicOS-PowerTimeout

Moderator: Forum moderators

HerrBert
Posts: 329
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 17 times
Been thanked: 110 times

Re: nicOS-PowerTimeout

Post by HerrBert »

Let me explain:

Your script does what it should do. It edits /etc/eventmanager and /usr/local/pup_event/autoshutdown_daemon
In Slacko 7.0 the manipulated files are in place and edited as desired.
The commands are the same as for other Puppies.

The reason, why it does not work OOTB, is that pup_event_frontend_d works different from (most) other Puppies.

I recall the mechanism from Slacko 5.7, where a function script was triggered every 4 seconds by a binary called pup_event_frontend_d and executed commands periodically.

Slacko 7.0 still has similar function scripts, but they are not executed by pup_event_frontend_d
In fact, pup_event_frontend_d is now a script that starts autoshutdown_daemon, which is a standalone script to process powertimeout of eventmanager.

pup_event_frontend_d:

Code: Select all

#!/bin/ash

if ! /usr/local/pup_event/frontend_startup $@ ; then
	exit 1
fi

if ! pidof autoshutdown_daemon >/dev/null 2>&1 ; then
	/usr/local/pup_event/autoshutdown_daemon &
fi

So the changes done with NicOS-PowerTimeout are made but do not take effect, because autoshutdown_daemon does not recognize them 'on the fly'

User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout

Post by amethyst »

So what happens if you disable autoshutdown? Are there other timeout scripts which can be used instead? I'll make a note in the first post that the utility does not work OOTB with Slacko Puppy because the shutdown mechanism works differently.

HerrBert
Posts: 329
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 17 times
Been thanked: 110 times

Re: nicOS-PowerTimeout

Post by HerrBert »

I don't know about any other shutdown/timeout scripts in Slacko 7.0

TBH i don't use eventmanager's autoshutdown at all. I use a 'homebrew' construct with crond and xautolock.
It was this thread, that just made me curious: viewtopic.php?t=5808

The point here is to let know that, (i repeat) at least in Slacko64 7.0, it needs a trigger for autoshutdown_daemon, be it a restartwm (ugly) or setting period or inactivity in Puppy Eventmanager (inconvenient).

User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout

Post by amethyst »

HerrBert wrote: Mon May 02, 2022 5:12 pm

I don't know about any other shutdown/timeout scripts in Slacko 7.0

TBH i don't use eventmanager's autoshutdown at all. I use a 'homebrew' construct with crond and xautolock.
It was this thread, that just made me curious: viewtopic.php?t=5808

The point here is to let know that, (i repeat) at least in Slacko64 7.0, it needs a trigger for autoshutdown_daemon, be it a restartwm (ugly) or setting period or inactivity in Puppy Eventmanager (inconvenient).

I've made a note about the Slacko issue in the first post, thanks.

User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout (New release 23/5/2022)

Post by amethyst »

New release of this utility. See opening post.

User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout (New release 23/5/2022)

Post by amethyst »

Okay, so going a bit retro today. Added a zip file containing some traditional Windows screensavers (the pipes one is cool!!!) that you can use with this utility. You need WINE installed/loaded. Attached to first post. Also read the first post for instructions.

User avatar
rockedge
Site Admin
Posts: 5719
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1997 times
Been thanked: 2099 times
Contact:

Re: nicOS-PowerTimeout (New release 23/5/2022)

Post by rockedge »

I have Xmplayer going so well on a Bionic64 with a well functioning WINE (got lucky) that also runs all kinds of XP stuff nicely I'm thinking I should try out the screensavers for a real retro blast.

User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout (New release 23/5/2022)

Post by amethyst »

@rockedge
Check out this 10 second video of a fireplace. Great for a screen saver in loop mode. https://vod-progressive.akamaized.net/e ... -+1971.mp4

User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout (New release 23/5/2022)

Post by amethyst »

The utility has two options for running the screen saver. The one is for scheduling (under the Set Power State Options section) and for that a screensaver script is installed to /usr/local/bin as mentioned in the first post which script can be edited as mentioned in that post. There is also a Screen Saver option (under the Run Now Options section). If you click that, the screen saver will run immediately (by default the one set by the screen saver script). I use a second screen saver launcher script for running a screen saver under the Run Now Section. So I link this second's script command to the main nicOS-PowerTimeout utility script (editing the screen saver option under the Run Now Section so that the second script will pop up). Now I can play around watching any of my screen savers immediately by selecting them from a list. This is how it looks, see attached image.

Attachments
Screen Saver Launcher.png
Screen Saver Launcher.png (32.52 KiB) Viewed 1171 times
Last edited by amethyst on Thu Jun 16, 2022 8:11 am, edited 2 times in total.
User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout

Post by amethyst »

Utility updated, see first post. Change log:
1. Included a menu item to access the ScreenSaver script for editing.
2. The 'Help" instructions have been amended. Click the utility's 'Help' button to access and read.
3. A few traditional Windows screen savers have been included in the package (need Wine installed for it to run).

User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout

Post by amethyst »

Made a small change and re-uploaded the .pet

User avatar
greengeek
Posts: 1200
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 340 times
Been thanked: 145 times

Re: nicOS-PowerTimeout

Post by greengeek »

Hi Nic, i have just downloaded the latest pet and given it a try but still can't get a timeout to activate.

For now I have dispensed with my "switching desktop" trials and am simply doing the following:

1) Load timeout pet
2) Load testvideo.mp4 into /root
3) Modify /usr/local/bin/ScreenSaver as follows:

Code: Select all

#! /bin/bash
exec /usr/bin/cvlc --fullscreen --volume=50 /root/testvideo.mp4

4) Bring up timeout dialog and tick the following boxes then click OK:
- Screensaver
- Disable/Reset timeouts
- 5 minutes

But I am still not seeing the test video come to life after 5 minutes of inactivity (the video playing syntax works perfectly when I run it from cli, or if i use a terminal to run /usr/local/bin/ScreenSaver).

Any tips or info I should collect for troubleshooting? (Testing on Tahr32)
cheers!

NOSPTO.png
NOSPTO.png (45.23 KiB) Viewed 1301 times
User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout

Post by amethyst »

@greengeek
Strange, I can't replicate your problem. I've done a fresh frugal install of Tahr and duplicated the steps you followed (which seems correct to me). Even used the same command and name for the screensaver. Works for me without any issues. If your screen blanking is set to "on", make sure that the delay is more than 5 minutes (default is 10 minutes). If it's 5 minutes like your timeout settings, it could cause conflict. Also change the VLC command to vlc instead of cvlc. cvlc may still be running in the background following previous attempts if not killed.

User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout

Post by amethyst »

I made a little standalone utility which I use to play around with my screen savers. Attached a .pet which you can install (Note: this is an example script, you need to edit this ScreenSaver1 script in /usr/local/bin with the correct information for your screen saver items). You can also use this utility script in conjunction with the nicOS-PowerTimeout utility. To do this: Edit the nicOS-PowerTimeout script by changing the command of item G to /usr/local/bin/ScreenSaver1). Now you can access it via the nicOS-PowerTimeout utility by running the Screen Saver option in the 'RUN NOW OPTIONS' section of the utility.

Attachments
Screen-Saver-Launcher.pet
(7.57 KiB) Downloaded 57 times
Screen Saver Launcher.png
Screen Saver Launcher.png (41.13 KiB) Viewed 1231 times
User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout

Post by amethyst »

Attached two additional Windows Screen Savers (3D Kaleidoscope and Dodecahedrons).

Attachments
Screenshot(2).png
Screenshot(2).png (38.52 KiB) Viewed 1186 times
Screenshot(1).jpg
Screenshot(1).jpg (57.21 KiB) Viewed 1186 times
ScreenSaversMore.zip
(350.37 KiB) Downloaded 52 times
Governor
Posts: 433
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 110 times
Been thanked: 11 times

Re: nicOS-PowerTimeout

Post by Governor »

I installed the .pet. What is the simplest way to get it to work? If there is no simple way, then I will drop the idea.
Thanks.

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout

Post by amethyst »

Governor wrote: Sat Mar 30, 2024 11:25 am

I installed the .pet. What is the simplest way to get it to work? If there is no simple way, then I will drop the idea.
Thanks.

Did you click the help button of the utility to read the instructions?

Governor
Posts: 433
Joined: Sat Nov 12, 2022 7:11 pm
Has thanked: 110 times
Been thanked: 11 times

Re: nicOS-PowerTimeout

Post by Governor »

I installed the .pet file:

Code: Select all

https://forum.puppylinux.com/download/file.php?id=9741&sid=177f31adaba07cb9de570ccd2fbb52f1

Ok, I couldn't find the utility at first, I see it now in the system menu, I'll read the help text.
If an app does not create a menu item on installation, how would I find it?
Thanks.

amethyst wrote: Sat Mar 30, 2024 3:13 pm
Governor wrote: Sat Mar 30, 2024 11:25 am

I installed the .pet. What is the simplest way to get it to work? If there is no simple way, then I will drop the idea.
Thanks.

Did you click the help button of the utility to read the instructions?

Distro: fossapup64 9.5
Window Manager: JWM v2.4.0
Desktop Start: xwin jwm
Firefox portable: 115.5.0esr (64-bit)

User avatar
amethyst
Posts: 2355
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 55 times
Been thanked: 473 times

Re: nicOS-PowerTimeout

Post by amethyst »

If an app does not create a menu item on installation, how would I find it?

If it was an installed package, you can open the package install .file in /var/packages which lists where the application was installed. You can also search for a file with the pFind utility in the menu.

Post Reply

Return to “System”