f. OpenVMS FAQ -&- page 17)b @5z

HP OpenVMS Systems Documentation

 q> $"b,
Content starts here"D

The OpenVMS Frequently Asked Questions (FAQ)


 l n  
PreviousContentsIndex




>

Chapter 11
DECwindows


@

If you are searching for something here, please(consider using the text-format FAQ.

z

11.1 How do I let someone else display something on my workstation?



EOn a workstation, you will want to use the "Customize" menuDof the session manager utility and select "Security". WhenCthe pop-up box appears, you can select the host node, username, andFtranport that will allow you to launch an application that targets theworkstation display.

CIf this does not provide you with access to the display, You need achecklist of sorts:

    G
  • Make sure that you've specified the X-windows "display"I correctly on the remote host. For a DECnet transport, the specificationG uses two colons, while the TCP/IP transport typically uses one. The XH Windows server and the X Windows screen follow the host specification,% delimited by a period. For example:

    f  "                       
    Table 11-1 X Windows Display Commands
    Shell Command
    csh
      % # setenv DISPLAY vms.domain:0.0
     sh and ksh
      1 # $ DISPLAY=vms.domain:0.0 ; export DISPLAY
    DCL
      , $ SET DISPLAY/CREATE/NODE=vms.domain -7
    /TRANSPORT=TCPIP/SERVER=server/SCREEN=screen
    F

  • If you have verified the command is correct and things are stillI not working, ensure the Security settings on the OpenVMS host side willG allow the incoming connection: Pull down the "Options" menuG in the Session Manager, and select "Security...". If you do@ not find your host and username and transport listed among the2 authorized users, you will need to add an entry.
      H
    • There are various transports available, including LOCAL, DECNET,D LAT, and TCPIP. You must Select the transport appropriate to the incoming connection.G
    • If the transport is "DECnet", do NOT add the' double colon (::) to the node name.C
    • If the transport is "TCPIP", "Username"E must be an asterisk (*). Why? Because unlike DECnet, theK TCP/IP protocol does not provide the remote username information in the incoming connection.H
    • If the connection is "TCPIP", it is best to use a fullI domain name (e.g. Node.Subd.Domain). However, you may have to use theF IP address itself, if your host does not have a way to resolve theK address via DNS. If you have the luxury of fixed addresses (eg: you areK not using DHCP), then it can be helpful to add two entries forC each TCP/IP host, one that specifies the host name and one that specifies the host address.G
    • There are various TCP/IP packages for OpenVMS, and you must use2 syntax appropriate to the transport installed.D
    • If a TCP/IP connection is still not working, ensure that theF transport you want has been activated for use with DECwindows. Seex Section 11.14 for details of configuring TCP/IP as a transport.
    D
  • There is a log file created in SYS$MANAGER: which can tell youF which transports are loaded, and also tell you what connect attemptsG were rejected, including showing what the presented credentials were.H This file is SYS$MANAGER:DECW$SERVER_0_ERROR.LOG, although the 0 couldF be another number if you have multiple servers on the workstation. IH have found this file to be very useful for tracking down what needs to1 be put in the Session Manager Security entries.
m

11.2 How do I create a display on another workstation?



GTo create a display from an OpenVMS host to a remote X Windows display,&use one of the following DCL commands:

 

"
@$ SET DISPLAY /CREATE /TRANSPORT=net_transport /NODE=remote_node6$ SET DISPLAY /CREATE /TRANSPORT=LAT /NODE=remote_node9$ SET DISPLAY /CREATE /TRANSPORT=DECnet /NODE=remote_node8$ SET DISPLAY /CREATE /TRANSPORT=TCPIP /NODE=remote_node




ANote that LAT is typically used only for the VXT series X WindowsEterminals, but it can also be used from OpenVMS to OpenVMS systems onFvarious OpenVMS releases, such as on OpenVMS Alpha V6.1 and later. Fortdetails on configuring the TCP/IP transport, see Section 11.14.

>If you are interested in X Windows terminals and have an olderFVAXstation system around, please see the EWS package on Freeware V5.0.z

11.3 How can I get the information from SHOW DISPLAY into a symbol?



@Use the undocumented SHOW DISPLAY/SYMBOL, and then reference theCsymbols DECW$DISPLAY_NODE, DECW$DISPLAY_SCREEN, DECW$DISPLAY_SERVERand/or DECW$DISPLAY_TRANSPORT.

DAn example of calling the underlying (and also undocumented) sys$qio&programming interface for the WSDRIVER(WSAn:) is available at:

 

"
A- http://www.hp.com/go/openvms/freeware/  


FLook in the Freeware V4.0 directory /srh_examples/DECUS_UNDOC_CLINIC/.d

11.4 How do I get a log of a DECterm session?



GIf you are working from a DECwindows DECterm terminal emulator, you canFuse the AutoPrint feature. Choose the "Printer..." menu itemFfrom the "Options" menu, set the printing destination to theGname of the file you want, and set "Auto Print Mode". You arenow free to continue.

FIt should be noted that all of the characters and escape sequences areFcaptured, but if you display the resulting log file on a DECterm, then3you will see exactly what was originally displayed.

FYou can also use the "Print Screen" screen capture availableGin the DECwindows session manager menus, if you simply wish to snapshot.a particular portion of the X Windows display.

If you are using the FreewareAVTstar terminal emulator package, you will find a similar logging$mechanism is available in the menus.a

11.5 Why is DECwindows Motif not starting?



FFirst check to see if there is a graphics device, usually a G* device.G(eg: On a DEC 2000 model 300, use the command SHOW DEVICE GQ) If you donot find a graphics device:

    G
  • OpenVMS has failed to find the appropriate IRQ information for anE EISA graphics card (on the DEC 2000 series) such as the HP (Compaq)G QVision, and did not autoconfigure it. Run the correct ECU (for Tru64D UNIX and OpenVMS) and reboot. This is necessary only on EISA-based systems.H
  • You have an EISA-based system (such as the DEC 2000 model 300) andG do not have a HP (Compaq) QVision video card. This EISA graphics cardI should have Compaq printed on it, and identifies itself as a CPQ3011 orE a CPQ3111. If it is not one of these two EISA devices, then OpenVMSB does not support it. (There are no other supported EISA graphicsG controllers, and EISA graphics are normally used with DECwindows only" on the DEC 2000 series systems.)G
  • You have a PCI-based system, and do not have a supported graphicsG controller---examples of supported controllers include the following:
      
    • Radeon 7500(
    • PowerStorm 3D30, PowerStorm 4D20
    • 3DLabs Oxygen VX1
    
    See Section 5.16 for further information on some of these graphics controllers.F
  • You have booted the system minimally, or have otherwise disabled' the device autoconfiguration process.


)If there is a G* graphics device present:

    H
  • There may have been a severe error in the DECwindows startup. TypeI the contents of SYS$MANAGER:DECW$SERVER_0_ERROR.LOG for any information on errors starting the server.H
  • The system parameter WINDOW_SYSTEM is not set to 1. While this wasC a common way for system managers to disable the DECwindows server@ startup, it is not particularly reliable as DECwindows can now# "correct" this setting.D
    If you really do not want an OpenVMS system with workstationH hardware to bootstrap and configure itself as a workstation, add the+ following definition to SYLOGICALS.COM:

     

    "
    1$ DEFINE/SYSTEM/EXEC DECW$IGNORE_WORKSTATION TRUE
    
    
    H

  • You may not have a valid DECwindows Motif license loaded. To checkC for the two most common types of Motif product authorization keys) (PAKs), use the following DCL commands:

     

    "
    $ LICENSE LIST DW-MOTIF/FULL $ LICENSE LIST NET-APP-SUP*/FULL
    
    
    J
    and examine the information displayed. Make sure that one of theseA licenses is present, valid and active.
    For information onK registering software license product authorization keys (PAKs) when youw cannot log into the system directly, please see Section 5.6.2.E

  • Check that the DECW$PRIVATE_SERVER_SETUP.COM is correct for theI graphics controller in use. For instance:
    The following is from theI 9FX Vision 330 Owners Guide, EK-V330G-OG pg 2-9. Place the following inA DECW$PRIVATE_SERVER_SETUP.COM, creatibng .COM from .TEMPLATE if= necessary. Locate the DECW$PRIVATE_SERVER_SETUP.COM file inE SYS$SPECIFIC:[SYSMGR] or in SYS$COMMON:[SYSMGR] as appropriate; theI former file is used for this system within a cluster configuration, andG the latter is used for all systems that do not also have a local copy( of this file in SYS$SPECIFIC:[SYSMGR].

     

    "
     $ DECW$XSIZE_IN_PIXELS == xvalue $ DECW$YSIZE_IN_PIXELS == yvalue3$ DEFINE/SYSTEM DECW$SERVER_REFRESH_RATE rate_in_Hz
    
    
    |
    Also see Section 11.11. Details of the PowerStorm 3D30 and 4D20> settings are available in the OpenVMS Ask The Wizard area.

g

11.6 How do I set the title on a DECterm window?



/If you are creating a new DECterm window, check

 

"
*$ HELP CREATE /TERMINAL /WINDOW_ATTRIBUTES




>If you want to change the title of an existing window, use theFfollowing control sequences, where [esc] is the ANSI escapeFcode, value decimal 27, and "text label" is what you want todisplay:

=To set the DECterm title, send the escape character, then theDcharacters "]21;", then the text label string, and then an3escape character followed by a backslash character.

ETo set the icon label, send the escape character, then the characters@"]2L;", then the icon label string, and then an escape,character followed by a backslash character.

GTo set both the DECterm title and icon to the full device name, you canuse the following DCL commands:

 

"
$  esc[0,7] = 27E$  fulldevnam = F$Edit(F$GetDVI("TT","FULLDEVNAM"),"UPCASE,COLLAPSE")8$  write sys$output esc+ "]21;" + fulldevnam + esc + "\"8$  write sys$output esc+ "]2L;" + fulldevnam + esc + "\"




FYou can also change the title and the icon using the Options-Window...menu.

Also see Section 12.1 and Section 8.13.w

11.7 How do I customize DECwindows, including the login screen?



CTo customize various DECwindows Motif characteristics including theEdefaults used by the SET DISPLAY command, the DECwindows login screenFbackground logo used (the default is the DIGITAL, Compaq, or HP logo),various keymaps (also see Section 11.7.2 and Section 11.7.1), theAFileView defaults, session manager defaults, the DECwindows login.=processing, DECwindows log file processing, and various other ,DECwindows attributes, see the example file:

v 
i
"
.$ SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.TEMPLATE

l


sCThis example template file is typically copied over to the filenamecCSYS$COMMON:[SYSMGR]DECW$PRIVATE_APPS_SETUP.COM and then modified tog meet site-specific requirements.

mFAdditionally, various X tools such as xsetroot, bitmap and xrdb---someFthese can be useful in customizing the appearance of an application orGof the DECwindows Motif display---are provided in the DECW$UTILS: area.0

aDWhen using DECwindows V1.2-4 and later on OpenVMS Alpha, the defaultDdesktop is the Common Desktop Environment (CDE). You can select yourGpreferred desktop (CDE or DECwindows Motif) when logging in, or you canCGchange the default to the DECwindows Motif desktop using the DCL symboltBdecw$start_new_desktop in the DECwindows private application setupGcommand procedure. See SYS$MANAGER:DECW$PRIVATE_APPS_SETUP.TEMPLATE forf?further details, and how to create DECW$PRIVATE_APPS_SETUP.COM.g

eFNote that with DECwindows CDE, the root window is no longer visible by-default. The root window is hidden behind thegnE"backdrop" window of the current CDE workspace. To make theaGroot window visible, use the CDE style manager selection "backdropeFnone", and use information such as that in the OpenVMS FAQ to setthe root window.

aETo add a new backdrop to the DECwindows CDE environment, the backdropa>must first be in or be converted into X11 pixmap format. (This5conversion is often possible using tools such as xv.)>reu>9Then (if necessary) create the default backdrop directorytCSYS$COMMON:[CDE$DEFAULTS.USER.BACKDROPS]. Place the X11 pixmap fileaFcontaining the desired image into the backdrops directory, ensure thatFit has a filename extension of .PM. (The xv default filename extensionDfor the X11 pixmap file is .XPM, while CDE expects only to see filesFwith .PM.) Now invoke the CDE style manager and select a new backdrop.AYou will find your image will be placed at the end of the list oftbackdrops available.

GIf you require a message be included on the initial display---where theaFstart session display and the logo appears---you can use either of thefollowing approaches:t

    E
  • The simplest approach requires OpenVMS V7.3-2 or later, and theII corresponding DECwindows V1.3-1 kit or later. You will want to create as@ file named SYS$COMMON:[SYSMGR]DECW$GREET.TXT, and this will beB displayed in a popup---with an OK button---when the login box isE displayed. This is intended specifically for applications requiring> such a display.sG
  • The second approach involves copying the file XRESOURCES.DAT from 

    l 

    "
    7SYS$SYSDEVICE:[VMS$COMMON.CDE$DEFAULTS.SYSTEM.CONFIG.C]
    
    l
    into the directory

     

    "
    5SYS$SYSDEVICE:[VMS$COMMON.CDE$DEFAULTS.USER.CONFIG.C]h
    
    /
    ;and editing the copy. Specifically, look for the following:

    > 
    /
    "
    Dtlogin*greeting.labelString:
    
    /
    G
    The line is normally commented out, and by default contains the string: 

    I 
    /
    "
    Welcome to %localhost%
    
    t
    D
    You can change this text to something akin to the following:

    n 
    o
    "
    2Dtlogin*greeting.labelString:  Welcome to Heck \n\BThis is a Trusted System owned by the Rulers of the planet Zark\n\\n\aWe Come In Peace\n\d\n6If you want Privacy, you've come to the wrong place\n\\n
    
    p
    J
    The lines of text will be centered for you.
    In most DECwindowsG versions, you will be able to onbtain only about eight (8) lines oftI text. Changes have been implemented in DECwindows V1.3 and later thatt6 permit up to about twenty-five (25) lines of text.

&

e@The login logo is stored as an XPM bitmap image in the text fileHSYS$SYSROOT:[SYSCOMMON.CDE$DEFAULTS.SYSTEM.APPCONFIG.ICONS.C]DECDTLOGO.PM,i( and it can be changed. Copy the file toI SYS$SYSROOT:[SYSCOMMON.CDE$DEFAULTS.USER.APPCONFIG.ICONS.C]DECDTLOGO.PM,SD as DECwindows upgrades can replace the system version of this file.

rFOn DECwindows V1.3-1 and later (and possibly on V1.3), both DECwindows>CDE and DECwindows Motif displays use this logo file. On olderEreleases, only the DECwindows CDE displays used this logo file, whileTAthe logo used for the Motif login display was hard-coded into thecEpackage and the only available override is the DECW$LOGINLOGO command 8procedure mechanism within the customized, site-specific!DECW$PRIVATE_APPS_SETUP.COM file.T

oFLook at the contents of the DECDTLOGO.PM file and at other *.XPM files!and tools for additional details.iR

11.7.1 How do I customize DECwindows keymapping?



sAVarious keymaps can be implemented on OpenVMS and other X Windowsl?systems, allowing the implementation of a Dvorak-style or otherp?alternate keymappings. For details, see the available X WindowsrBdocumentation (this is the documentation associated with X WindowsCitself, and not the product documentation for the OpenVMS operatingdCsystem nor for the DECwindows X Windows implementation) and see the.DDECwindows *.DECW$KEYMAP (text-format) files found in the DECwindowsDECW$KEYMAP: directory.es>oo<

aiFor other keymapping information, see Section 11.7.2._

11.7.2 Why does the DELETE key delete forward instead of backward?

df

oASee the SET TERMINAL/BACKSPACE command on OpenVMS V8.2 and later./

mDThis behaviour involves the Motif virtual key bindings. When a MotifAapplication starts, it looks at the vendor string returned in theADdisplay connection information and attempts to match the string to atable of virtual bindings.

FYou can override the default bindings in your decw$xdefaults.dat file.AHere is the entry you would make to get the default VMS bindings.d

p 
h
"
*defaultVirtualBindings:\ " osfCancel :  [F11] \n\! osfLeft :  [Left] \n\  osfUp  :  [Up] \n\# osfRight :  [Right] \n\h! osfDown :  [Down] \n\u( osfEndLine :Alt  [Right] \n\) osfBeginLine :Alt  [Left] \n\n$ osfPageUp :  [Prior] \n\% osfPageDown :  [Next] \n\O* osfDelete :Shift  [Delete] \n\& osfUndo :Alt  [Delete] \n\( osfBackSpace :  [Delete] \n\' osfAddMode :Shift  [F8] \n\N! osfHelp :  [Help] \n\L osfMenu :  [F4] \n\R# osfMenuBar :  [F10] \n\n% osfSelect :  [Select] \n\)) osfActivate :  [KP]_Enter \n\R) osfCopy :Shift  [DRemove] \n\=$ osfCut  :  [DRemove] \n\  osfPaste :  [Insert]




l To merge: 

 
=
"
$ xrdb :== $decw$utils:xrdb.exee'$ xrdb -nocpp -merge decw$xdefaults.dato

e


sDAlso note that the DECW$UTILS:DECW$DEFINE_UTILS.COM procedure can be-used to establish the xrdb and other symbols.o

t?Also see the DECxterm directory of Freeware V5.0 for details oni2connecting to OpenVMS from various UNIX platforms.

snFor other keymapping information, see Section 11.7.1.i

11.8 Why doesn't XtAppAddInput() work on OpenVMS?

rs

eFYes, XtAppAddInput() does work on OpenVMS. The MIT definition of the XBWindows call XtAppAddInput() includes platform-specific arguments.l

lFOn platforms where C is the typically the primary programming languageEfor the platform, the file descriptor mask is one of the arguments towthe XtAppAddInput() call.l

iCOn OpenVMS, the platform-specific arguments to this call include anGevent flag and an IOSB, as these are the traditional OpenVMS constructsaGused to synchronize the completion of asynchronous operations. While itbEwould be easier to port non-OpenVMS C code that calls XtAppAddInput()DEover to OpenVMS if the arguments included the C file descriptor, thise e

fEOne restriction on the event flag: the event flag chosen must be from Bevent flag cluster zero. When using the traditional lib$get_ef and lib$free_efo  Gcalls to allocate and deallocate event flags, you must first explicitly Bcall lib$free_ef to free up some event flags in event flag clusterEzero. Please see the event flag documentation for specific details ontCthese calls and for specific event flags that can be freed in eventnflag cluster zero.

,FHere is some example code that covers calling this routine on OpenVMS:

i 

"
"    m->InputID = XtAppAddInput(        m->AppCtx,s        m->InputEF,        m->InputIosb,        the_callback, 1 );!    if ( !((int) m->InputID ))a	        {        XtAppErrorMsg(            m->AppCtx,D            "invalidDevice",            "XtAppAddInput",            "XtToolkitError",c"            "Can't Access Device",            (String *) NULL,             (Cardinal *) NULL );        ...t

h
w

11.9 Why do the keyboard arrow keys move the DECwindows cursor?

e

rDCongratulations, you have just stumbled into "dead rodent"Fmode. This DECwindows environment---where the keyboard arrow keys move@the mouse cursor and where the [SELECT], [PREV], and [NEXT] keysFemulate the three mouse buttons---allows rudimentary system operations'when the mouse is among the casualties.l

bCTo enter or exit "dead rodent" mode, enter the following:m[CTRL/SHIFT/F3]h

11.10 Why does half my DECwindows display blank?

t

FThis is likely a result of receiving an OPCOM or other console messageGon a system that shares the system console with the DECwindows graphicsoworkstation display.

b3You can toggle off the console display window usingE<[CTRL/F2] and you can enable a serial console perSection 14.3.6 or Section 14.3.3.3.

EAlso see the console message window application available with recentsFDECwindows versions---DECwindows versions V1.2-3 and later will enableGthis window by default. For details on this console message window, see>$the DECW$CONSOLE_SELECTION option in-SYS$STARTUP:DECW$PRIVATE_APPS_SETUP.TEMPLATE./

>On older releases, you can disable output using the following:

i 
n
"
*$ SET TERMINAL/PERMANENT/NOBROADCAST OPA0:$ DEFINE/USER SYS$COMMAND OPA0:i$ REPLY/DISABLEt

c


oAlso see Section 14.3.3.2, Section 14.17, and Also see Section 8.4,e




 i Rl n  [
PreviousNextContentsIndex

 

b#n6EIXELS == xvalue es./D(This is not recommended, but there are applications around that useFthis technique.) Thus the need to explicity specify whether or not theF"decc$" prefix should be prepended to the external symbol names by the compiler.t

GThe qualifiers, and most (all?) with associated pragmas, that may be ofh3interest when migrating VAX C code to HP C include:f

    H
  • Failure to specify the prefixing qualifier (on certain and usuallyI older versions of C) can cause the compiler to not add the prefixes forSG the names of the C library routines into the references placed in theeH object module, which can in turn cause problems resolving the external8 symbols in the library when the object code is linked:

    s 

    "
    /PREFIX=ALL_ENTRIESo
    
    r
    F

  • Some VAX C programs erroneously write to the string literals. By7 default, HP C does not allow the constants to change.t

    T 
    .
    "
     /ASSUME=WRITABLE_STRING_LITERALS
    
    n
    @

  • Enables sharing ("shr") of globals and of externH variables. HP C sets externs as non-shareable ("noshr"), VAX C as "shr".a

     
    u
    "
    /SHARE_GLOBALS
    
    p
    =

  • VAX C assumes common block model for external linkages.b

    g 
    g
    "
    /EXTERN_MODE=COMMON_BLOCKs
    
    s
    C

  • Refers to the padding placed between member elements within a E struct. Disabling member alignment packs the data more tightly intoaB memory, but this packaging has performance implications, both on8 OpenVMS VAX and particularly on OpenVMS Alpha systems.

    d 

    "
    /[NO]MEMBER_ALIGNMENT 
    
    l
    7

  • Enable all manner of useful compiler diagnostics:f

    m 
    e
    "
    D/WARN=ENABLE=(LEVEL4,QUESTCODE)/STANDARD=PORT/ACCEPT=NOVAXC_KEYWORDS
    
    
    B
    You can disable extraneous diagnostics with the following: