question about a shell

question about a shell

 

  

I want to telnet from my Solaris server(192.168.1.160) to another server(192.168.1.163)
and run a GUI program named pro1.
How should I do?
Can I do like this?

#!/bin/ksh
xhost + 192.168.1.163
telnet 192.168.1.163 <<!
lazydba
lucky
setenv DISPLAY:0.0 192.168.1.160
pro1&
exit
!
exit
Oracle LazyDBA home page