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 Tue 18 Dec 2018, 21:00
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Tahr, VLC and Screen Control
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
nic007


Joined: 13 Nov 2011
Posts: 2698
Location: Cradle of Humankind

PostPosted: Sun 09 Sep 2018, 03:43    Post subject:  Tahr, VLC and Screen Control  

Those of you who are running VLC in Tahr will know that disabling the screensaver in VLC preferences does not work, one needs to run the screen control utility to turn the screen saver off. Now, this is very annoying. I was thinking of a script that would turn the screensaver off whenever VLC is running and on when it's not running. Perhaps something that could be run once at startup to control the behaviour throughout a session and also after standby to MEM. Any ideas?
Back to top
View user's profile Send private message 
mikeslr


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

PostPosted: Sun 09 Sep 2018, 15:28    Post subject:  

Hi nic007,

Sorry I can't be much help as to what to do about this as my knowledge of bash is on a "primary level". But I tracked down the "config" file Screensaver control uses. It's a bash script: /root/Startup/ss-on. Desktop>ScreenSaver Control, other than enabling/disabling, only permits setting the delay before the screensaver activates in 5 minute increments.

When set to 5 minutes, ss-on reads:
#!/bin/sh
xset s 300 dpms 0 0 300

When set to 10 minutes, ss-on reads:
#!/bin/sh
xset s 600 dpms 0 0 600

When the interval is changed via the GUI, the change is immediately written to ss-on.

So, rather than trying to turn Screensaver off entirely, why not a script which stores ss-on's current arguments to variables, sets the ss-on delay to 18000 (seconds= 5 hours), Starts VLC, then restores the original values when VLC ends.

Or perhaps, just modify ss-on so that it first tests whether VLC is running. Not sure how to do that; nor whether doing that will mess-up "Startup" --requiring a restart-x. Don't think the latter as changes via the GUI are immediate. But, I'm guessing.

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


Joined: 13 Nov 2011
Posts: 2698
Location: Cradle of Humankind

PostPosted: Mon 10 Sep 2018, 07:33    Post subject:  

Thanks mikeslr for the response. There's probably a better solution but for now I did the following: changed the script for defaultmediaplayer in /usr/local/bin by adding ss-off to the script (so screensaver is turned off when vlc starts). Made an additional script which I have on the desktop now (a button in the tray) to kill vlc and turn ss-on. Bit clumsy but does the job nevertheless.
Back to top
View user's profile Send private message 
mikeslr


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

PostPosted: Mon 10 Sep 2018, 09:15    Post subject:  

Actually, nic007, yours was the better solution. Keep it simple. Cool

Like almost everyone else, I have a tendency to over complicate. Rolling Eyes
Back to top
View user's profile Send private message 
nic007


Joined: 13 Nov 2011
Posts: 2698
Location: Cradle of Humankind

PostPosted: Mon 10 Sep 2018, 10:37    Post subject:  

Works quite well actually. Clicking the button for my script in the tray closes the program automatically so no need to exit from the program in the "normal way"..., so there are no extra steps (clicks).
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
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.0549s ][ Queries: 12 (0.0131s) ][ GZIP on ]