Sponsored Content
Full Discussion: xterm trivia
Top Forums UNIX for Dummies Questions & Answers xterm trivia Post 4534 by LivinFree on Wednesday 25th of July 2001 09:52:03 PM
Old 07-25-2001
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? Smilie
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 11:26 AM..
 

5 More Discussions You Might Find Interesting

1. What is on Your Mind?

Forum Trivial Pursuit - New Computer Science and Mathematics Trivia for UNIX.com

I have added a new experimental "Computer Science and Mathematics Trivia - True or False" section in the discussions, currently under the tags box. In the future, I plan to Expand this feature to add more trivia categories from math, science and technology. Keep track of correct and... (20 Replies)
Discussion started by: Neo
20 Replies

2. What is on Your Mind?

1000+ Computer Science Trivia Questions at UNIX.COM

The UNIX and Linux Forums now has over 1000 TRUE / FALSE computer science and computer related trivia question in our database. These questions are of relatively high quality (compared to similar sites on the web) and are fun (according to feedback by users). In the first week during the... (1 Reply)
Discussion started by: Neo
1 Replies

3. What is on Your Mind?

New Member and Country Computer Trivia Leaderboards

Thanks to Akshay, who helped me write the core MySQL queries, we now have two new draft leaderboards, by (1) member and by (2) country: https://www.unix.com/trivia_stats.php Currently milhan leads the members with a high score of 90%: ... (3 Replies)
Discussion started by: Neo
3 Replies

4. What is on Your Mind?

Debugging Our Computer Science Trivia Feature

Only a few days after I coded this new feature from scratch, we are seeing over 3000 entries in the database from members (mostly guests) playing CS trivia. I have spend a lot of time coding this (from scratch) and testing the API. From the logs, it seems to have an API bug which appears... (31 Replies)
Discussion started by: Neo
31 Replies

5. What is on Your Mind?

Computer Trivia Feature Tops 50,000 Questions Answered

Just noticed that our successful computer trivia feature (stats here) has surpassed over 50,000 questions answered by users: https://www.unix.com/trivia_stats.php This was a coding effort worth while and I'm pleased to see so many people enjoying it in such a short time since it was released... (3 Replies)
Discussion started by: Neo
3 Replies
All times are GMT -4. The time now is 05:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy