From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  3-OCT-1990 13:13:05.77
To:	MRGATE::"ARISIA::EVERHART"
CC:	
Subj:	Re: DECwindows:  creating remote displays

Received:  by crdgw1.ge.com (5.57/GE 1.73)
	 id AA23377; Wed, 3 Oct 90 12:49:41 EDT
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Wed,  3 OCT 90 02:27:53 PDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA21445; Wed, 3 Oct 90 02:17:46 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 1 Oct 90 22:59:59 GMT
From: news!cartan!ndmath!nstar!inland!allebrandi@iuvax.cs.indiana.edu  (Tom Allebrandi)
Organization: Inland Steel Research Labs; East Chicago, IN
Subject: Re: DECwindows:  creating remote displays
Message-Id: <110.2707ca6f@inland.com>
References: <4274@husc6.harvard.edu>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

In article <4274@husc6.harvard.edu>, joltes@husc9.harvard.edu (Richard Joltes) writes:
> A question for the DECwindows gurus out there...
> I run most of my applications on my trusty(?) VS2000 but have access to some
> more powerful (i.e. 8550 running VMS and 5400 running Ultrix) servers.  So I'd
> like to start remote sessions on those nodes and pop the displays back to my
> workstation.  VMS is easy, but the standard method is to create a DECterm, set
> host to the target node, and do
> $ set display/create/node=xxxxxx
> $ <invoke application>
> which seems a pain.  Has anyone worked up an easier way (i.e. local .exe or
> comfile that will establish the session and start up the application)? 
>....

Here is what we do. Put this somewhere and define it as a DECnet object
on each node where you wish to execute an application. You will need to
customize this for the applications in use at your site.

--- Tom
Tom Allebrandi             | Vice-char and mail guru, VMSnet WG, DECUS VAX SIG
Inland Steel Research Labs | Internet:  allebrandi@inland.com
East Chicago, IN           | UUCP:      ...!uunet!inland!allebrandi
219 399 6306               | DECUServe: allebrandi     BIX: ta2

$! DW_LAUNCH.COM
$!
$! Launch remote DECwindows/X client applications.
$!
$! If this procedure is invoked in an INTERACTIVE process:
$!	P1 = The name of an application
$!	P2 = The node to execute the application on
$!	P3 = The DECwindows client node (default: current node)
$!
$! eg: "@DW_LAUNCH DECTERM EAGLE" to create a DECterm on EAGLE using
$!     the current workstation display.
$!
$! If this procedure is invoked in a BATCH process:
$!	P1 = The name of an application
$!	P2 = The DECwindows client node
$!
$! eg: "SUBMIT DW_LAUNCH/QUEUE=EAGLE$BATCH/PARAM=(DECTERM,KRAZ) to
$!     create a DECterm on EAGLE using the display on node KRAZ.
$!
$! If this procedure is invoked in a NETWORK process:
$!	There are no parameters. The application name and DECwindows
$!	client node name are sent via DECnet to the process.
$!
$! When used interactively, the interactive side invokes this procedure
$! as a DECnet task. It sends over one message which contains the name
$! of the application and the node for the display.
$!
$ applications = "/DECTERM/NOTES/S2020/"
$
$ if ((f$mode() .eqs. "NETWORK") .or. (f$mode() .eqs. "BATCH")) then -
	goto launchit
$
$ if (p1 .eqs. "") then inquire/nopun p1 "Application? "
$ if (p2 .eqs. "") then inquire/nopun p2 "Node? "
$ if (p3 .eqs. "") then p3 = f$getsyi("NODENAME")
$
$ request = "/" + f$edit(p1,"UPCASE") + "/"
$ if (f$locate(request,applications) .eq. f$length(applications)) then exit
$
$ open/write/error=oops fyle 'p2'::"0=dw_launch"
$ write fyle p1,"|",p3
$ close fyle
$oops:
$ exit
$
$launchit:
$ set verify
$ if (f$mode() .eqs. "NETWORK")
$  then	open/read/error=oops fyle sys$net:
$	read/error=oops fyle string
$	p1 = f$edit(f$element(0,"|",string),"UPCASE")
$	p2 = f$edit(f$element(1,"|",string),"UPCASE")
$	endif
$
$ request = "/" + p1 + "/"
$ if (f$locate(request,applications) .eq. f$length(applications)) then exit
$
$ set display/create/node='p2'
$ goto 'p1'
$
$DECTERM:
$ xyzzy = f$getsyi("NODENAME")
$ create/terminal/detached/nologged/display='f$trnlnm("SYS$REM_NODE")'0 -
        /window_attributes=(title="''xyzzy'",icon_name="''xyzzy'")
$ stop/id=0
$NOTES:
$ notes/interface=decwindows
$ stop/id=0
$S2020:
$ setup 2020
$ s2020
$ stop/id=0
$!end of file

