Pop up dialog box on remote computers

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Pop up dialog box on remote computers
# 8  
Old 11-08-2007
yes they are.
# 9  
Old 11-08-2007
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?
# 10  
Old 11-08-2007
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).
# 11  
Old 11-09-2007
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
# 12  
Old 11-09-2007
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
# 13  
Old 11-09-2007
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.
# 14  
Old 11-09-2007
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Require input in bash dialog box

Hello. Any help would be greatly appreciated. Right now I have the following input box that works fine and well, however I would like to wrap this is a loop that requires input. Right now the script will happily continue on if the user just hits enter. I'd like to require a minimum of a 5... (5 Replies)
Discussion started by: woodson2
5 Replies

2. Web Development

Pop up confirmation box / perl cgi

Hi, I need to add confirmation pop up msg box before deleting the record from database, I have added following snippets to my code but its not working for me, your help will be much appreciated : print header; print <<EOF; <script type="text/javascript"> function confirmOk() { return... (0 Replies)
Discussion started by: terrykhatri531
0 Replies

3. Shell Programming and Scripting

Dialog box in korn shell scripting

Does dialog box works on all kind of shells? I am using korn shell in Linux . For me dialog is not working :) is there any particular syntax or do we need to have particular OS version or shell env? #!/bin/ksh dialog --title "create file" \ --backtitle "shell script practice" \... (1 Reply)
Discussion started by: NarayanaPrakash
1 Replies

4. UNIX for Dummies Questions & Answers

Dialog box

I know, I can run dialog command in my machine. But what I want to do is I wanna show the dialog box to some other Remote host. I connected to the remote system and used dialog command its shows the box in my terminal only. How can I display to that remote machine?? Any suggestions??? (3 Replies)
Discussion started by: Adhi
3 Replies

5. Shell Programming and Scripting

How to create multiple input box in same window using dialog

Hi All, I was trying to generate GUI using shell script. After long search I found the utility called “dialog”. Using this utility I am able to generate window to collect the input. dialog --inputbox "Input 1" 10 45 dialog --inputbox "Input 2" 10 45 dialog --inputbox "Input 3" 10 45 Using... (2 Replies)
Discussion started by: kalpeer
2 Replies

6. Red Hat

Authentication Failed Dialog Box on Redhat 4.7

For some reason i cannot login using root or other accounts on my Linux system. When logging in at the main console it says "Authentication failed" in a dialog box with an OK button. The Linux system is Redhat 4.7. I've already checked /etc/pam.d/login, /etc/security/access.conf and ... (27 Replies)
Discussion started by: redhatuser2012
27 Replies

7. Shell Programming and Scripting

Script to display a dialog box every 5 seconds

I want to create a script that displays a dialog box every interval of time and exits that loop when a user presses ENTER Any idies? (4 Replies)
Discussion started by: amitlib
4 Replies

8. Debian

Dialog box in debconf file.

Hi all, I am working with debconf file for packaging the projects. I have used the ". /usr/share/debconf/confmodule" file to do the packaging in debian standard. It worked fine. When ever I am installing the package in apt-get the dialogs are come as I mentioned in the templates file.... (0 Replies)
Discussion started by: Nila
0 Replies

9. Web Development

Pop up Confirmation Box

Hi, I was writing a simple web application using Perl -CGI. When users try to do some operations, I wanted like a pop-up confirmation box. Is this possible with Perl-CGI? Thanks in advance. Regards, garric (6 Replies)
Discussion started by: garric
6 Replies

10. Shell Programming and Scripting

Displaying a dialog box using terminal commands

Hello, I used the command osascript -e 'tell app "Finder" to display dialog "Hey!"' to display a dialog box..it works fine, it displays a dialog box with 'OK' and 'CANCEL' buttons..i want to get the button returned value how can i do that using terminal command? is there any command to get... (1 Reply)
Discussion started by: keshav.murthy@r
1 Replies
Login or Register to Ask a Question