Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now

a31modela
Posted on: Oct 23 2006, 04:26 PM


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 23-October 06
Member No.: 7,555


Hello All,

I am trying to run a cron job that will restart an application every morning @ 5:10 on SuSE 8. The script runs fine from a non x window command line. The 1st thing the script is supposed to do is pop up an xmessage about the pending restart of the app. i am runing the script as root & the XWin is running as a specific user account. My script has the following in it at the top :
export DISPLAY=`hostname -i|cut -d " " -f 1`:0.0


xmessage -center " Terminal needs to reboot & will reboot in 5 minutes " -timeou
t 300 -buttons OK:1,CANCEL:2
ANS=$?

The entire script works as written when run from the command line as root BUT if running as root from cron.d it never shows the xmessage, just starts the recycle of the application.

Is there any way that I can have this job run as a cron job & export the Display as needed?

Thanks
Steve
  Forum: Programming in Linux · Post Preview: #28249 · Replies: 0 · Views: 3,750


New Posts  New Replies
No New Posts  No New Replies
Hot topic  Hot Topic (New)
No new  Hot Topic (No New)
Poll  Poll (New)
No new votes  Poll (No New)
Closed  Locked Topic
Moved  Moved Topic
 

RSS Lo-Fi Version Time is now: 17th October 2017 - 09:11 PM