Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!bloom-beacon!dont-send-mail-to-path-lines From: kobuchi%hoover.DECnet@win1.ims.abb.COM ("HOOVER::KOBUCHI") Newsgroups: comp.windows.x Subject: DECwindows DisplayString Message-ID: <9101222319.AA10945@uc.msc.edu> Date: 22 Jan 91 23:19:00 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 62 OK, hope this message gets through OK--this is my first attempt at sending a message to any Internet address... I've just encountered a problem with obtaining the display name, using DisplayString. We just upgraded our VAXes to VMS 5.4. In this upgrade, DEC changed DECwindows so that DisplayString returns a VAX/VMS device name instead of a string like "nodename::0.0". This change caused my code to fail and the only way I can think of to fix my code seems to be extremely un-X. Basically, my DECwindows code is designed to use two CRTs (when available). I'm currently using a VAXstation 3100 with a color monitor and a black and white monitor. The first thing my code does is to open a temporary connection and determine how many monitors are on the workstation: display = XOpenDisplay(""); num_screens = ScreenCount(display); It then gets and stores the display name so I can use the name to open up connections to each screen (monitor) on the workstation: display_name = DisplayString(display); I then close this temporary connection: XCloseDisplay(display); Then I start doing the DECwindows initialization stuff: XtToolkitInitialize(); app_context = XtCreateApplicationContext(); Finally, I enter a loop for each screen (monitor) on the workstation and I open a connection for each screen using XtOpenDisplay. Now this is where I use the display name I got beforehand: every time I call XtOpenDisplay, I give it the display name with the last character modified to be the screen number. For example, if the workstation's node name is NODE1, and it has two screens, I call XtOpenDisplay twice, the first time giving it the display name of "NODE1::0.0" and the second time giving it the display name of "NODE1::0.1". This used to work on VMS 5.3: DisplayString would return the string "NODE1::0.0". Now, on VMS 5.4, DisplayString returns a string containing a VAX/VMS device name like "WSA1:". Well, ok, I've found out that I can use this device name by appending the server number and screen number to it (e.g., "WSA1:0.0"), but it doesn't look like X anymore. Also, I don't think I can determine the actual node name anymore (so I could include it in messages to the user). Did DEC screw up? Did I screw up? Is this the "correct" way to handle multiple monitors on a single workstation? Kent Kobuchi ABB Engineering Automation Internet: kobuchi%pasceg.decnet@win1.ims.abb.com Voice: (415) 748-4791