The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
dialog menu script. please HELP claudlu Shell Programming and Scripting 2 05-04-2008 07:11 AM
html problem: get file name dialog exists? f33ldead Shell Programming and Scripting 0 02-25-2008 05:48 PM
perl progress bar dialog fed.linuxgossip Shell Programming and Scripting 4 09-18-2007 07:40 AM
dialog output dhinge UNIX for Dummies Questions & Answers 2 11-30-2006 10:20 AM
two computers - one modem Pennywize UNIX for Dummies Questions & Answers 3 11-27-2002 02:37 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 11-08-2007
Registered User
 

Join Date: Sep 2007
Location: EX-PAT in Taipei, Taiwan
Posts: 105
yes they are.
Reply With Quote
Forum Sponsor
  #9  
Old 11-08-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Do they all login using CDE or Gnome, or are they running the program by some other means to get it on their screen?

Basically, how are you going to know who to send the messages to and which screens?

Are you then going to require a confirmation from each person or are you going to shutdown the server in the time period anyway?
Reply With Quote
  #10  
Old 11-08-2007
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 734
If you want to open an x-window on a remote machine uninvited, it's generally non-trivial.

If the users are not using Xauth security (eg MIT magic cookies etc) then it's not _too_ hard to determine the display to send to and fire a window at it.

This 'military software'; does it run with the display name (ie <hostname>:<display number>) in the commandline or do they rely on a $DISPLAY environment variable?
For that matter, does it even use X or is it run within a terminal session via X?

It's totally doable, but there are a lot of factors that will determine how to go about it.

High-level approach:
Produce a list of users to warn (probably from 'ps' or 'who' output)
Identify the X server they are connecting from
Obtain a copy of appropriate authorisation to send something to their X server
Send the message, taking care not to present them with an app that has elevated privilages.
Log the response to the message (if you need to).
Reply With Quote
  #11  
Old 11-08-2007
Registered User
 

Join Date: Sep 2007
Location: EX-PAT in Taipei, Taiwan
Posts: 105
CDE to login. yes we have a built in program that can run locally on the machine to show the pop up box. the dialog box no matter if they click ok or not does not dictate the reboot, it is more of a warning of what i am about to do.

this is what i have used in the past but i think i am missing some variables.

rsh test004 `cd /h/test/bin`; DISPLAY=0.0; export DISPLAY; ./Msg "message here";&

but it keeps outputting the pop up box on my local box not the remote machines.

hostname is in the terminal window when you open it
Reply With Quote
  #12  
Old 11-08-2007
Registered User
 

Join Date: Sep 2007
Location: EX-PAT in Taipei, Taiwan
Posts: 105
now the thing that is different is that the host name will be a variable from a list so it would be more like rsh test0${x}
list="01 02 03 04 05 06"
for x in $list ; do
echo $x
then the command will be here
Reply With Quote
  #13  
Old 11-08-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
When the user logins in you want to kick off a program that sits silently waiting for a message to be displayed.

This will effectively capture the user's DISPLAY and authority. It needs to wait on some IPC mechanism. When it gets triggered, it can then run your "display a dialog message" program with the correct context and environment.

When the user logs out this process needs to be cleaned up.

One way of knowing when client has gone is to have a program create a hidden window as the child of the root. When the X session dies you could capture the X error back. This would require some Xlib programming.
Reply With Quote
  #14  
Old 11-08-2007
Registered User
 

Join Date: Sep 2007
Location: EX-PAT in Taipei, Taiwan
Posts: 105
see the process for that program is launched already it is a child to other process that are running on the system for other functions. All i need to do is run the program and a dialog box will show up. i guess what i really need is a rsh to execute that program on every client and export the display locally to each machine with the message
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
export display, inappropriate ioctl for device

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 07:16 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