Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Disable screen blanking while specified program is running

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
Josh66
Posts: 16
Joined: 2013-08-20 15:02
Location: Columbus, OH

Disable screen blanking while specified program is running

#1 Post by Josh66 »

Is there a way to disable the screen lock, but only when certain (user specified) programs are running?

For example, when I'm calibrating my monitor - it takes a long time and there's not really anything else I can be doing while it's running. If the screen locks while it's running, the spectrometer is taking readings from a blank screen...

If there's a way to do this (I feel like there must be), I haven't been able to figure it out.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Disable screen blanking while specified program is runni

#2 Post by bw123 »

I've been looking for the best way to do this too. There is a script solution called lightsonplus that runs as a daemon and detects when video players are in fullscreen:
https://github.com/devkral/lightsonplus
but I haven't really used it yet. Looks like it will need some editing for what I want to do.

I think it depends on what app is doing the blanking/locking/screensaving and how it can be interacted with. This would be a great feature for all of them to support.
resigned by AI ChatGPT

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Disable screen blanking while specified program is runni

#3 Post by debiman »

there's a proper way of doing this, but depending on your setup it can involve many different applications, starting with systemd, power management, Xorg's own rudimentary screensaver, other screensavwers...

it might be easier to simply write a little script that will wiggle the mouse regularly.
look at xdotool.

pendrachken
Posts: 1394
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: Disable screen blanking while specified program is runni

#4 Post by pendrachken »

Why are you doing things the hard way?


Just disable screen blanking when you don't want the screen to blank, and re-enable it again when you want screen blanking. It will literally take you half a second to do this versus who knows how long to cobble a bunch of crap together to do it in only certain instances.
fortune -o
Your love life will be... interesting.
:twisted: How did it know?

The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches :-P

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Disable screen blanking while specified program is runni

#5 Post by bw123 »

pendrachken wrote:Why are you doing things the hard way?


Just disable screen blanking when you don't want the screen to blank, and re-enable it again when you want screen blanking. It will literally take you half a second to do this versus who knows how long to cobble a bunch of crap together to do it in only certain instances.
That should work fine disabling screensaver manually. This is very easy to do, no matter what method. Unfortunately people forget. In my case it's when watching movies, which I love. When I watch a movie, I like to get it cued, get the sound set just right, get the snacks together, sit down and stay there. Having to get up and pause the movie, disable the screensaver, and sit back down ruins the whole movie for me. It just isn't the same, and why should I have to remember something that my computer can easily do for me, with proper instruction?

I set my screensaver for ten minutes, which is JUST when a lot of movies are getting good. Here is where the movie is interrupted after ten minutes in some of my favorites.

Blade Runner (Director's Cut) - Harrison Ford eating noodles, "He say you Brade Lunnah."
Godfather (Coppola Restoration)- Wedding Scene, "Twenny, Thirty Grand, Small bills cash..."
Apocalypse Now (Redux) - The mission, "Captain, have you ever seen this gentleman before?"
2001: A Space Odyssey - End of day, awaken to monolith (first appearance).
The Mechanic - Rigging the first murder, plastic explosives in the book.

This exclusion by app idea would be a very welcome feature for me in any screen blank/saver/locking doodad. This wouldn't really be ideal though, because I do like the screensaver to work when I am playng music. That is the idea behind the lightsonplus script. It tried to detect fullscreen on several different media players. I think it's a decent idea, and I'm going to tweak it and give it a try.
resigned by AI ChatGPT

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Disable screen blanking while specified program is runni

#6 Post by debiman »

i never have any problems with screenblanking when watching movies. i.e., my media player disables screenblanking automatically.

but op describes a quite different situation.

i wonder how they are getting on?

Josh66
Posts: 16
Joined: 2013-08-20 15:02
Location: Columbus, OH

Re: Disable screen blanking while specified program is runni

#7 Post by Josh66 »

I haven't found a solution other than temporarily setting the blanking time to 'never'.

But, yes, it also does not blank while watching videos for me - so clearly it's possible.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Disable screen blanking while specified program is runni

#8 Post by debiman »

Josh66 wrote:I haven't found a solution other than temporarily setting the blanking time to 'never'.
and i don't think you'll find a better solution for your calibrating software.
so is this topic solved now?

Josh66
Posts: 16
Joined: 2013-08-20 15:02
Location: Columbus, OH

Re: Disable screen blanking while specified program is runni

#9 Post by Josh66 »

debiman wrote:
Josh66 wrote:I haven't found a solution other than temporarily setting the blanking time to 'never'.
and i don't think you'll find a better solution for your calibrating software.
so is this topic solved now?
I don't know if "solved" is the right word, haha! Anyway, it appears that there isn't an easy fix.

Looks like the title of the thread is already too long to add 'solved' to it - it will only let me add two more characters.

Post Reply