home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / vms / 18086 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  3.1 KB

  1. Path: sparky!uunet!think.com!ames!agate!ucbvax!TGV.COM!mcmahon
  2. From: mcmahon@TGV.COM (At the end of the long, dark tunnel)
  3. Newsgroups: comp.os.vms
  4. Subject: RE: DECwindows Motif 1.1 and creation of DECterms with RSHELL
  5. Message-ID: <921116170253.34400250@TGV.COM>
  6. Date: 17 Nov 92 01:02:53 GMT
  7. Sender: usenet@ucbvax.BERKELEY.EDU
  8. Organization: The Internet
  9. Lines: 73
  10.  
  11. > Under DECwindows Motif 1.0 there was a problem if windows were created from 
  12. > another node by doing an RSHELL, along the lines of:
  13. > $ set disp/create/tran=tcpip/node='p1'
  14. > $ create/terminal/detach
  15. >
  16. > If this was used several times, only the *first* window would be created.
  17.  
  18. Well, the original problem was that the SET DISPLAY/CREATE command would create 
  19. a new WS device (DECW$DISPLAY) for each invocation of the command procedure.  
  20. The problem was that only the first WS device would stick around to be used by 
  21. the created DECterm.  The reason the first hung around was that the DECterm 
  22. controller held a channel open to it.  What the REUSE-DISPLAY command procedure 
  23. did was find that original WS device and use that, instead of creating a new 
  24. one.
  25.  
  26. And then Motif 1.1 came along...
  27.  
  28. The DECterm Controller process no longer assigns a channel to the WS device.  
  29. The result is that every WS device created by the invocation of this command 
  30. procedure disappears.  So when you do a SHOW DISPLAY in your DECterm windows, it 
  31. comes back with DECW$DISPLAY being defined to a non-existant WS device.
  32.  
  33. I worked out a quick and dirty solution, which can be found below.  This 
  34. requires that the newly created DECterm assign a channel to the DECW$DISPLAY 
  35. device (e.g. OPEN $SAVE_THE_WS_DEVICE$ DECW$DISPLAY: in the LOGIN.COM file or 
  36. somesuch).  It's a crude hack, but it will work.
  37.  
  38. Cheers!
  39. John McMahon
  40.  
  41. $! P1 is the /NODE qualifier (default MULTINET_RSHELL_ADDRESS or 0)
  42. $ if p1 .eqs. "" then p1 = f$trnlnm("MULTINET_RSHELL_ADDRESS")
  43. $ if p1 .eqs. "" then p1 = "0"
  44. $! P2 is the /TRANSPORT qualifier (default TCPIP)
  45. $ if p2 .eqs. "" then p2 = "TCPIP"
  46. $! P3 is the /SERVER qualifier (default 0)
  47. $ if p3 .eqs. "" then p3 = "0"
  48. $! P4 is the /SCREEN qualifier (default 0)
  49. $ if p4 .eqs. "" then p4 = "0"
  50. $ write sys$output "Node=",p1," Transport=",p2," Server=",p3," Screen=",p4
  51. $ DeviceLoop:
  52. $    next = F$DEVICE("_WS*")
  53. $    if next .eqs. "" then goto endloop
  54. $    define/user sys$output nl:
  55. $    show display/symbol 'next'
  56. $    if ( (p1 .eqs. DECW$DISPLAY_NODE)      .and. -
  57.              (p2 .eqs. DECW$DISPLAY_TRANSPORT) .and. -
  58.              (p3 .eqs. DECW$DISPLAY_SERVER) .and. -
  59.              (p4 .eqs. DECW$DISPLAY_SCREEN) )
  60. $    Then
  61. $        Write Sys$Output "Using Device ''next'"
  62. $        Define Decw$Display 'Next'
  63. $        Goto The_Big_Exit
  64. $    EndIf
  65. $    goto deviceloop
  66. $ endloop:
  67. $ SET DISPLAY /CREATE /NODE='P1' /TRANSPORT='P2' /SERVER='P3' /SCREEN='P4'
  68. $ Write Sys$Output "Creating New Device ",F$TRNLNM("DECW$DISPLAY")
  69. $ The_Big_Exit:
  70. $ Create/Terminal/Detach
  71. $ Open $SAVE_THE_WS_DEVICE$ DECW$DISPLAY:
  72. $ BaseRefCnt = f$getdvi("DECW$DISPLAY","REFCNT")
  73. $ WaitLoop:
  74. $    RefCnt = f$getdvi("DECW$DISPLAY","REFCNT") 
  75. $    If RefCnt .Gt. BaseRefCnt Then Exit
  76. $    Write Sys$Output "Open a channel to DECW$DISPLAY in the new DECterm."
  77. $    Wait 00:00:15
  78. $    Goto WaitLoop
  79.  
  80.  
  81.  
  82.  
  83.