Hello
I use porteus 2.1-kde4. How can I prevent the suspension when viewing youtube video or doing a file download?
How to prevent the suspension of KDE?
- Slaxmax
- Contributor
- Posts: 408
- Joined: 03 Jan 2013, 09:51
- Distribution: KDE4
- Location: Campinas Brazil https://goo.gl/yrxwKi
How to prevent the suspension of KDE?
“DNA is like a computer program but far, far more advanced than any software ever created.”
― Bill Gates, The Road Ahead
― Bill Gates, The Road Ahead
- fanthom
- Moderator Team
- Posts: 5588
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: How to prevent the suspension of KDE?
please check: System Settings -> Hardware section -> Power Management
Please add [Solved] to your thread title if the solution was found.
- Slaxmax
- Contributor
- Posts: 408
- Joined: 03 Jan 2013, 09:51
- Distribution: KDE4
- Location: Campinas Brazil https://goo.gl/yrxwKi
Re: How to prevent the suspension of KDE?
Okay I want to continue the suspension, but not suspend these cases I said.
“DNA is like a computer program but far, far more advanced than any software ever created.”
― Bill Gates, The Road Ahead
― Bill Gates, The Road Ahead
- brokenman
- Site Admin
- Posts: 6104
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
- Contact:
Re: How to prevent the suspension of KDE?
I don't think this is possible without writing some script to look for youtube or download processes. It wouldn't be too hard to create such a script that switches off power options. You could look for an application called wigglemouse which 'wiggles' the mouse every 10 minutes or so to prevent sleepage.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
- fanthom
- Moderator Team
- Posts: 5588
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: How to prevent the suspension of KDE?
this is probably not what you are looking for but please try (in case it also disables suspension):
http://kde-look.org/content/show.php/Sc ... tent=93752
btw: will add this plasmoid to next porteus release.
http://kde-look.org/content/show.php/Sc ... tent=93752
btw: will add this plasmoid to next porteus release.
Please add [Solved] to your thread title if the solution was found.
- Slaxmax
- Contributor
- Posts: 408
- Joined: 03 Jan 2013, 09:51
- Distribution: KDE4
- Location: Campinas Brazil https://goo.gl/yrxwKi
Re: How to prevent the suspension of KDE?
I wrote this script to prevent the suspension of KDE or any desktop environment.
You need only xautomation (xte) package for use this script
For autostart in KDE4 put this script in /home/guest/.kde4/Autostart/
Enjoy! 
You need only xautomation (xte) package for use this script
For autostart in KDE4 put this script in /home/guest/.kde4/Autostart/
Code: Select all
#!/bin/sh
# This script disable power scheme if cpu usage greater than $cputarget or
# any process $process1,$process2... are active.
# Author: Slaxmax http://forum.porteus.org/
while :
do
process1="wget"
process2="uget-gtk"
process3="transmission-qt"
cputarget=7
##################################################################################################################
NUMCPUS=`grep ^proc /proc/cpuinfo | wc -l`; \
FIRST=`cat /proc/stat | awk '/^cpu / {print $5}'`; sleep 1; \
SECOND=`cat /proc/stat | awk '/^cpu / {print $5}'`; \
USED=`echo 2 k 100 $SECOND $FIRST-$NUMCPUS / - p | dc`
var=$(awk -v key=$cputarget -v result=$USED 'BEGIN{print result<key?1:0}')
echo CPU $USED%
if [ $var -eq 0 ] || [ $(ps aux | grep -E "($process1|$process2|$process3)" | grep -v grep | wc -l) -ge 1 ]; then
xte 'mousermove -1 0'
xte 'mousermove 1 0'
echo power on
else
echo power off
fi
sleep 50
clear
done

“DNA is like a computer program but far, far more advanced than any software ever created.”
― Bill Gates, The Road Ahead
― Bill Gates, The Road Ahead