I'm attempting to use "anacron" to start a Perl/Tk script
which I wrote "remind_to_backup". When I'm starting it from
a terminal (as root) - it opens OK. But when I didn't see it open
by "anacron" I looked in "/var/spool/mail/root" and saw the following
From firstname.lastname@example.org Mon Mar 12 14:31:02 2012
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by localhost.localdomain (8.14.4/8.14.4) with ESMTP id q2CCV226005184
for <email@example.com>; Mon, 12 Mar 2012 14:31:02 +0200
Received: (from root@localhost)
by localhost.localdomain (8.14.4/8.14.4/Submit) id q2CCV1DY005183
for root; Mon, 12 Mar 2012 14:31:02 +0200
Date: Mon, 12 Mar 2012 14:31:02 +0200
From: Anacron <firstname.lastname@example.org>
Content-Type: text/plain; charset="ANSI_X3.4-1968"
Subject: Anacron job 'remind_to_backup' on localhost.localdomain
No protocol specified
couldn't connect to display ":0" at /usr/lib64/perl5/Tk/MainWindow.pm line 55.
MainWindow->new() at /root/bin/remind_to_backup line 23
After searching the net for this error I understand that the issue
here is lack of permission for "root" to access the X windows
server (If I understand correctly).
What I don't quite understand is why I can open this window
from an ordinary root shell but "anacron" can't open it?
The shell I prefare to use is "tcsh", the appropriate line
in /etc/passwd file is:
which is different from the original shell (bash) after the
installation (FC14). How can I know, in what shell the "anacron"
runs? What's the difference (from the standpoint of X server
access) between programs called by "anacron" and same programs
called from the command line (by root)?
While searching the net I saw suggestions like:
but I have none of such commands in my /root/.tcshrc file
but still, I can open the Perl/Tk window as root from the command line.
TIA for any ideas,