The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to get xterm myura AIX 2 11-21-2007 06:32 PM
xterm legato UNIX for Dummies Questions & Answers 3 04-28-2005 06:09 PM
xterm help? douknownam Shell Programming and Scripting 1 12-10-2004 02:58 PM
xterm? Ivo UNIX for Dummies Questions & Answers 1 07-15-2002 07:14 AM
xterm af6 UNIX for Dummies Questions & Answers 1 05-31-2002 11:49 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-24-2001
Registered User
 

Join Date: Jul 2001
Location: Philippines
Posts: 9
xterm trivia

Thanks Livin Free...


Here's another one... Why is it that I always get the error message "Error: Can't open display:" in my mail whenever I execute or try to call an xterm command using cron to activate the command. What did I miss? Thanks in advance UNIX gurus...
Forum Sponsor
  #2  
Old 07-25-2001
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
This indicates that cron does not have permission to access your X display. Maybe if you set the DISPLAY variable explicitly from cron? I'm not sure why you would need to run an X term from cron anyway...X apps are inherently interactive, they are not really designed to be run non-interactively from cron.
  #3  
Old 07-25-2001
Registered User
 

Join Date: Jul 2001
Location: Philippines
Posts: 9
Quote:
Originally posted by PxT
This indicates that cron does not have permission to access your X display. Maybe if you set the DISPLAY variable explicitly from cron? I'm not sure why you would need to run an X term from cron anyway...X apps are inherently interactive, they are not really designed to be run non-interactively from cron.
Would you suggest that we customize an X-application for this purpose? Are there other options? Thanks for your reply.
  #4  
Old 07-25-2001
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
I think PxT is correct in saying that the DISPLAY variable is not set. You can set the $DISPLAY in cron, or in your srcipt / application.

If you just want some quick, simple notification, you could pop up an xterm on, say, $DISPLAY=":0", with a few lines of code:
Code:
#!/bin/sh
DISPLAY=":0"
Pay_Attention () {
echo "It is time for you to pay attention!"
echo "Press {Enter} when you are done..."
read _dummy_response
  case $_dummy_response in
     *) exit 0 ;;
   esac
}

xterm -e Pay_Attention
exit
I'm sure there's a better way of doing that, but thats the first one that popped into my head... Heck, that as-is probably won't work, but it given you an idea of what I'm thinking, right?
Either way - the xterm will close when someone presses the enter key...

added code tags for readability --oombera

Last edited by oombera; 02-18-2004 at 08:26 AM.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 02:56 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0