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
PAM_ENV.CONF(5) 						 Linux-PAM Manual						   PAM_ENV.CONF(5)

NAME
pam_env.conf - the environment variables config file DESCRIPTION
The /etc/security/pam_env.conf file specifies the environment variables to be set, unset or modified by pam_env(8). When someone logs in, this file is read and the environment variables are set according. Each line starts with the variable name, there are then two possible options for each variable DEFAULT and OVERRIDE. DEFAULT allows and administrator to set the value of the variable to some default value, if none is supplied then the empty string is assumed. The OVERRIDE option tells pam_env that it should enter in its value (overriding the default value) if there is one to use. OVERRIDE is not used, "" is assumed and no override will be done. VARIABLE [DEFAULT=[value]] [OVERRIDE=[value]] (Possibly non-existent) environment variables may be used in values using the ${string} syntax and (possibly non-existent) PAM_ITEMs may be used in values using the @{string} syntax. Both the $ and @ characters can be backslash escaped to be used as literal values values can be delimited with "", escaped " not supported. Note that many environment variables that you would like to use may not be set by the time the module is called. For example, HOME is used below several times, but many PAM applications don't make it available by the time you need it. The "#" character at start of line (no space at front) can be used to mark this line as a comment line. EXAMPLES
These are some example lines which might be specified in /etc/security/pam_env.conf. Set the REMOTEHOST variable for any hosts that are remote, default to "localhost" rather than not being set at all REMOTEHOST DEFAULT=localhost OVERRIDE=@{PAM_RHOST} Set the DISPLAY variable if it seems reasonable DISPLAY DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY} Now some simple variables PAGER DEFAULT=less MANPAGER DEFAULT=less LESS DEFAULT="M q e h15 z23 b80" NNTPSERVER DEFAULT=localhost PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin :/usr/bin:/usr/local/bin/X11:/usr/bin/X11 Silly examples of escaped variables, just to show how they work. DOLLAR DEFAULT=$ DOLLARDOLLAR DEFAULT= OVERRIDE=$${DOLLAR} DOLLARPLUS DEFAULT=${REMOTEHOST}${REMOTEHOST} ATSIGN DEFAULT="" OVERRIDE=@ SEE ALSO
pam_env(8), pam.d(5), pam(8) AUTHOR
pam_env was written by Dave Kinchlea <kinch@kinch.ark.com>. Linux-PAM Manual 09/19/2013 PAM_ENV.CONF(5)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy