From 03488a4a0d411ee3140b7de53a9455811f8202b6 Mon Sep 17 00:00:00 2001 From: Tom Bettany Date: Fri, 25 Aug 2017 12:28:19 +0100 Subject: [PATCH] Screensaver: Pause tracking during the screensaver Prevent tracked session times from overlapping with the screensaver tracking session by pausing those sessions while the screensaver is running. --- kdesk/icon-hooks.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kdesk/icon-hooks.sh b/kdesk/icon-hooks.sh index 1f1f99b..e607a31 100755 --- a/kdesk/icon-hooks.sh +++ b/kdesk/icon-hooks.sh @@ -2,8 +2,8 @@ # icon-hooks.sh # -# Copyright (C) 2014-2016 Kano Computing Ltd. -# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 +# Copyright (C) 2014-2017 Kano Computing Ltd. +# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 # # KDesk Icon Hooks script - Dynamically update the desktops icons attributes. # @@ -110,8 +110,9 @@ case $icon_name in if [ "$rc" == "0" ]; then if [ "$debug" == "true" ]; then - echo "starting kano-sync and checking for updates" + echo "Pausing tracking, starting kano-sync and checking for updates" fi + kano-tracker-ctl pause-sessions kano-sync --skip-kdesk --sync --backup --upload-tracking-data -s & sudo /usr/bin/kano-updater download --low-prio & fi @@ -127,6 +128,7 @@ case $icon_name in echo "resume" >> $pipe_filename fi + kano-tracker-ctl resume-sessions # kanotracker collects how many times and for long the screen saver runs length=$2 now=$(date +%s)