Pop up dialog box on remote computers

how do i check if it is 0.0?
$DISPLAY ?

what is EOF?

You have to capture that when the user logs on.

It's a way of putting data to be used as stdin inline.

command <<tag
data
tag

I personally use EOF as the tag.

i ran your command and this is what i got

01
tcgetattr: Inappropriate ioctl for device
ioctl I_FIND ttcompat: Inappropriate ioctl for device

rsh can not be a redirected command correct?

$ echo "echo hello" | rsh somehost
tcgetattr: Invalid argument
ioctl I_PUSH ttcompat: No such device or address

It would seem so! I often redirect the output from rsh, so am surprised you can't do the input. You will have to do it as an argument.

rsh host "all those things I want to do"

By the way, what are you rsh'ing to and as who?

a binary file in the remote computers /h/test/bin directory.

this is how i would do it manually
from my local machine i open a terminal and type the following

telnet test004
user: joe
pass: xxx

once in i cd /h/test/bin
the i type setenv DISPLAY:0.0
once done i do ./Msg "hi"

then it will show a dialog box on that remote machines screen saying hi with an ok button to close it.

what i want to do is what it typed above but to multiple computers at once using that Msg program

then users are not root. so when i log in the terminal it looks like this

test004%

i figured it out. i was doing setenv DISPLAY:0.0 i needed to do setenv DISPLAY unix:0.0

But your intention is to log into the server as each of the users?

Imagine this....

  1. when the user logins in CDE or Gnome will run a login script of some kind (don't know what at the moment). This needs to capture the DISPLAY variable and put it somewhere.
echo $DISPLAY >$HOME/.CURRENT_DISPLAY
  1. then each of the users needs in their $HOME/.ssh/authorized_keys a line which lets you run a small script (TellMe) on their behalf as them.

  2. the "TellMe" script will then pull out the DISPLAY variable value from where ever it was hidden and then call your /h/test/bin/Msg, eg

TellMe:

#!/bin/sh
DISPLAY=`cat $HOME/.CURRENT_DISPLAY`
export DISPLAY
/h/test/bin/Msg $@
  1. You call the program using
ssh -i my_identity person@server "\"Time for bed\" said Zeberdee"

sweet that worked perfect thank you very much.

sorry it did not work. the code for the display works. i created a login script and it creates the info and in there it is 0.0

the i created tellme. but when i run it. It tells me what the Msg program is for and how to use it.

and the ssh i am not that familiar with

i tried this with my user that is on all machines
ssh -i sysadmin oc01@test004 "\"time for bed\" said Bob"
ssh -i sysadmin oc01 "\"time for bed\" said Bob"

none of them worked thanks though

one more thing when i sub in "test" for the $@ the pop up dialog shows on my local screen

Did you

(a) set up a key pair without password using sshkeygen?

(b) add an entry into $HOME/.ssh/authorized_keys with the public key and the name of the script to run (/some/path/TellMe)

(c) pass the private key filename as the -i parameter?

http://www.cit.gu.edu.au/~anthony/info/apps/ssh.hints

thanks but that is getting way to technical for what i want to do. if i figure it out i will post it here thanks for all your help.

Ok here is a screen shot of me on the local client launching that application i am talking about.

see how when insert the message then click enter it will display that pop up dialog. I now need to get that application to run and display the message locally on each machine.

i am logged on as a normal user account. fyi

.... and I suggest that you run the application as each user (using ssh)

(a) in order comply with the X security model.

(b) to get the true DISPLAY variable that the user is using

... and in order to run as each user you should use an authorized_keys entry

(a) to let you run something as that person

(b) as those people wouldn't want you running any old command on their behalf.

If you are thinking about using rsh then consider using ssh instead.

you could use zenity, I use ubuntu linux, not sure if it works on solaris.