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
  #15  
Old 11-08-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by deaconf19 View Post
... like on windows...
As an aside and for comparison, the way this works on Windows is it has a "Messenger" service that is sitting waiting for messages on the LAN. This is woken up by messages sent with "net send".
Reply With Quote
Forum Sponsor
  #16  
Old 11-08-2007
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 734
Quote:
Originally Posted by deaconf19 View Post
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
...
rsh test004 `cd /h/test/bin`; DISPLAY=0.0; export DISPLAY; ./Msg "message here";&
The above command has the end quote in the wrong place to execute the export command on test004.
Try moving it to the end of the line?

[edit]
Also, if you can open it on display 0 just by logging in over there - why not open it remotely? (ie DISPLAY=test004:0 ; export DISPLAY ; Msg "message here" &)
[/edit]
Reply With Quote
  #17  
Old 11-08-2007
Registered User
 

Join Date: Sep 2007
Location: EX-PAT in Taipei, Taiwan
Posts: 105
see that is what i was looking for something like what you posted. thanks i will give that a try
Reply With Quote
  #18  
Old 11-08-2007
Registered User
 

Join Date: Sep 2007
Location: EX-PAT in Taipei, Taiwan
Posts: 105
ok this is what i have this far
#!/bin/sh
LAST=`/etc/hosts | awk '{print $1}'`
for x in $LAST ; do
rsh ${x} `cd /h/test/bin`; DISPLAY=test004:0; export DISPLAY; Msg "message here" &
Reply With Quote
  #19  
Old 11-08-2007
Registered User
 

Join Date: Sep 2007
Location: EX-PAT in Taipei, Taiwan
Posts: 105
this is what is am getting now

sh: DISPLAY=test004:0.0: is not an identifier

what does that mean
this is what i did

list="01 02 03 04"
for x in $list ; do
echo $x
rsh test0${x} export DISPLAY=test0${x}:0.0
rsh test0${x} /h/test/Msg "test test"
done

and it returns the line above with that error
Reply With Quote
  #20  
Old 11-08-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by deaconf19 View Post
list="01 02 03 04"
for x in $list ; do
echo $x
rsh test0${x} export DISPLAY=test0${x}:0.0
rsh test0${x} /h/test/Msg "test test"
done
You do realise the "rsh" has run to separate shells?

wouldn't the following be better?

Code:
for x in $list
do
         echo $x
         rsh test0${x} <<EOF
DISPLAY=test0${x}:0.0 /h/test/Msg "test test"
EOF
done
also you are assuming the screen is 0.0.
Reply With Quote
  #21  
Old 11-08-2007
Registered User
 

Join Date: Sep 2007
Location: EX-PAT in Taipei, Taiwan
Posts: 105
how do i check if it is 0.0?
$DISPLAY ?

what is EOF?
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:31 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