From 4938092205f0a73ee950f8684c5fb883316d808b Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 26 May 2011 12:41:39 -0400 Subject: [PATCH] set DISPLAY before running gnome-screensaver-command --- cron-rest-eyes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cron-rest-eyes b/cron-rest-eyes index 2fa5bf8..02ea924 100755 --- a/cron-rest-eyes +++ b/cron-rest-eyes @@ -1,5 +1,7 @@ #!/bin/sh +export DISPLAY=:0 + # no message if one is displayed already if [[ "$(ps -efww | grep -v grep | grep gxmessage)" != "" ]]; then exit @@ -13,5 +15,4 @@ if [ "$(gnome-screensaver-command --query | grep is.active)" != "" ]; then exit fi -export DISPLAY=:0 gxmessage 'Rest your eyes!'