View Single Post
Posts: 95 | Thanked: 66 times | Joined on Mar 2012
#2169
Originally Posted by Scorpius View Post
Sadly with the new encryption protocol WhatsApp servers ping the clients every 5 seconds, and Yappari has to answer that or it gets disconnected. That didn't happen in previous protocols. 0.4 (the first one) was the best with pings every 5 minutes.
reinob, typing this offhand: perhaps you might something along lines of following commands in a script & let it run:

while:
do
if [ "replace this with command to check screen turned off" ]; then
kill -STOP `ps -ef | grep '/usr/bin/Yappari' | awk '{ print $1}'`
sleep 900 # yappari suspended for 15 mins
kill -CONT `ps -ef | grep '/usr/bin/Yappari' | awk '{ print $1}'`
sleep 300 # yappari alive for 5 mins
fi
done

you'd also need to hook up to dbus messages that send kill -CONT when screen is turned on.

kh