[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron and kmessage



Þann 2006-06-24, 19:51:58 (-0400) skrifaði Kamaraju Kusumanchi:
> My actual problem is that I want to display a message at specific times (every 
> 0th, 30th minute of hour) on the user's screen. I thought I can do this with 
> cron and kmessage.
> 
> I edited the crontab entry as
> 
> 0,30 * * * *    kdialog --msgbox "test message"
> 
> But then it does not display the dialog on the screen. Instead it sends an 
> email to the user's address with the following message
> 
> kdialog: cannot connect to X server
> 
> How can I solve this problem? 

This is a typical X permission problem. The same as if you su in an
xterm and try to run a graphical program and cant because you dont
have permissions to do so.
I am not sure about how to solve this but I would search for two
things. First try to run the kdialog command as the use who you want
the message to be sent to, I dont know if cron can do this. Second you
can try to give cron permission to connect to your X session by
somehow using .Xauthority of the user who is running X.

> I also had a look at korganizer, but it can only repeat tasks on a day-by-day 
> basis, not on a minute-by-minute basis. Is there any other way?

Have you tried out the at command?

HTH

Oli



Reply to: