2

I am using Kubuntu 12.10 and have 10 min. screen timeout for reducing the brightness. I just migrated from Windows and now I have a problem with "idle mode". I've also read this and this.

But for example, when I am also talking via skype or any video conference software, I have the same problem. I do not want to move my mouse every time since this is annoying.

How can I write a script to prevent screen sleeping or dimming if there is a sound, for example?

wakeup
  • 945
  • 1
    See if the answers here help: http://askubuntu.com/questions/244044/prevent-screen-turning-off-when-watching-video-in-xbmc/246551#246551 –  Feb 24 '13 at 15:30
  • 1
    But in this case when Skype is running without conversation it still remains on and moves the mouse while I am working on something. – wakeup Feb 24 '13 at 15:54
  • @user1754665: In the answer linked by vasa1, modify the sleep_period variable to 599 instead of 60. That should reduce the frustration to a great extent. Also let me check if we have other options :) – Aditya Feb 24 '13 at 16:33
  • what are thee settings in 14.04? settings you mention do not exist in 14.04. thanks –  Apr 19 '14 at 17:09

3 Answers3

2

I found a solution for my problem: caffeine...

Add repository:

sudo add-apt-repository ppa:caffeine-developers/ppa

Update package list:

sudo apt-get update

Install caffeine:

sudo apt-get install caffeine python-glade2
wakeup
  • 945
0

Not Necessary editing the script, but By Pressing Ubuntu Key, then type in start menu screensaver then disable these, ur welcome! Screensaver

Screensaver2

0

I'm quite sure that the exact thing you want to do would not worth the hassle. However, as sounds are usually related to a single app why would not you write a script for just that application to turn off power savings while you keep it running?

(example is for VLC)

#!/bin/bash

#Disable modes
/usr/bin/xset -dpms &
/usr/bin/xset s off &

#Open VLC
/usr/bin/vlc "$@"

#Re-enable modes
/usr/bin/xset dpms
/usr/bin/xset s on
exit

Or you could just turn the 3 settings off that affect the display: "Dim Display" and "Screen Energy Saving" (in system settings->power management) and "Screen Saver" (in system settings->display and monitor).

But to run a background process to address the incompleteness of the power management daemon? Come on...

By the way this "feature" is present at least since Lucid (10.04, 29/04/2010). It is still present in Trusty (14.04) as of 25/01/2014, I tested it. How embarrassing would that be for me if I was an Ubuntu developer?

Szasz
  • 1
  • 1
  • Exactly, I am still wondering why this cannot be implemented by default and we need to use those kind of things. I think this script should be duplicated for all other applications also. Can we modity this to check more then one app (vlc, dragon, spotify, clementine) and execute the same things? – wakeup Jan 25 '14 at 19:10