1 - VMS DECwindows Brain Surgery - To Boldly Go Where No Documentation Has Gone Before - 1992 U.S. DECUS Spring Symposium - Session UI035 - Presented By - John "Fast-Eddie" McMahon - TGV, Incorporated - 603 Mission Street - Santa Cruz, California 95060 - 800-848-3440 - MCMAHON@TGV.COM 2 - VMS DECwindows Brain Surgery - The Usual Various Warnings That You Ignore Before Invoking VMSINSTAL - This talk deals with the 3 U words... Undocumented, Unsupported, Uneverything! - Although there is nothing in here that I feel is hazardous, use what you learn at your own peril! - All of the information for this talk was gathered from experimentation, Digital supplied software and the VMS V5.4 Listings CD-ROM (every System Manager's friend) 3 - VMS DECwindows Brain Surgery - More Warnings - OSF/Motif not spoken here - A few bits of this do appear in the documentation - Just not in the places you would expect 4 - VMS DECwindows Brain Surgery - SHOW DISPLAY - You are probably familiar with the logical name DECW$DISPLAY - This logical name is typically created by the command SET DISPLAY - Provides information on where your X windows should be created 5 - VMS DECwindows Brain Surgery - SHOW DISPLAY (example) - $ SET DISPLAY /CREATE /NODE=EISNER.DECUS.ORG - - /TRANSPORT=TCPIP - $ SHOW DISPLAY - Device: WSA36: [super] Node: EISNER.DECUS.ORG Transport: TCPIP Server: 0 Screen: 0 - $ SHOW LOGICAL DECW$DISPLAY "DECW$DISPLAY" = "_WSA36:" (LNM$PROCESS_TABLE) 6 - VMS DECwindows Brain Surgery - SHOW DISPLAY - Your X program calls the XOpenDisplay routine - The WSA device is accessed - Display information is fed to DECwindows to activate the appropriate network transports 7 - VMS DECwindows Brain Surgery - WS Devices (WS = WorkStation) - An interesting side note is that WSDRIVER is actually a duplicate (almost) of NLDRIVER - NL is the NULL device - The Read/Write $QIO calls between the two are identical - WSDRIVER has a few additional $QIOs to store/retrieve the DECwindows information 8 - VMS DECwindows Brain Surgery - What Happens If You Want To Manipulate The Display Variable Yourself ? 9 - VMS DECwindows Brain Surgery - Working With DECW$DISPLAY - DCL Command Procedure - Read Information - SHOW DISPLAY into a file and then parse the file (Ugh!) - Set Information - Use SET DISPLAY - High Level Language - SPAWN and do the steps above (Ugh! Tons of Overhead) - Or you could use the Undocumented Interface... 10 - VMS DECwindows Brain Surgery - SHOW DISPLAY /SYMBOL - Writes the DISPLAY information into four global DCL symbols - $ SHOW DISPLAY /SYMBOL - Device: WSA36: [super] Node: EISNER.DECUS.ORG Transport: TCPIP Server: 0 Screen: 0 - $ SHOW SYMBOL DECW$* DECW$DISPLAY_NODE == "EISNER.DECUS.ORG" DECW$DISPLAY_SCREEN == "0" DECW$DISPLAY_SERVER == "0" DECW$DISPLAY_TRANSPORT == "TCPIP" 11 - VMS DECwindows Brain Surgery - SHOW DISPLAY /SYMBOL - For high level languages, there is an undocumented $QIO interface - See the first cut at some documentation on the Spring 1991 Symposium (VAX SIG) DECUS Tape - It's under directory [MCMAHON] - Better guide: The source code for SET/SHOW DISPLAY on the VMS Listings Kit. - Disk 2, Directory: [V54.DECW$LIBS.PSEUDO.LIS] - File: SETSHODIS.LIS - The C code is a little tough to stomach, remember they are "typical" $QIOs buried under a few levels of pointers 12 - VMS DECwindows Brain Surgery - Restarting DECwindows - Rebooting is rarely necessary - Missing Session Manager - SET DISPLAY and then RUN SYS$SYSTEM:DECW$SESSION - If that Fails... try SPAWN RUN SYS$SYSTEM:DECW$SESSION - Getting A Login Window Again - Kill any active clients using STOP/ID - SET DISPLAY and RUN SYS$SYSTEM:DECW$STARTLOGIN - Needs CMKRNL 13 - VMS DECwindows Brain Surgery - Restarting DECwindows - Dead Server - @SYS$STARTUP:DECW$STARTUP RESTART - Don't do this from the VAXstation console since DECwindows will be unable to $ASSIGN a channel to an allocated device - All else fails, reboot it! 14 - VMS DECwindows Brain Surgery - Useful logicals used by DECwindows Loginout - DECW$LOGIN_LOG (in the DECW$LOGICAL_NAMES table) - Useful for finding out why DECwindows LOGINOUT is crashing. This directs the output of the image from the default (OPA0:) to a file. This also prevents a LOGINOUT crash from "taking over" your screen and requiring you to hit Control-F2 15 - VMS DECwindows Brain Surgery - Useful logicals used by DECwindows Loginout - DECW$LOGIN_MULTIPLE (LNM$SYSTEM) - DECwindows LOGINOUT checks to see if any active clients are running on the server to prevent LOGINOUT from taking over an active server. This logical overrides the check. Documented in the V5.5 Release Notes 16 - VMS DECwindows Brain Surgery - Useful logicals used by DECwindows Loginout - DECW$LOGIN_BACKGROUND (LNM$SYSTEM) - Points to a command procedure to create a custom logo for the Login window. This has been documented (in the release notes) for some time - A little known gotcha is that logos "malfunction" on system that support Xterminals or other "remote" uses of DECwindows LOGINOUT (e.g. running it on a Sun Workstation). This is due to the fact that the hardcoded Process Name "LOGO" is used to start the detached logo command procedure - This can be fixed with a "smart" command procedure 17 - VMS DECwindows Brain Surgery - A smart command procedure for LOGOs - $ Set NoON ! Keep going... $ Show Display/Symbol Sys$Error ! Grab the display info $ show process ! Debugging info $ show logical ! Debugging info - $! Truncate it at the first "." $ Node = F$Element(0,".",DECW$DISPLAY_NODE) - $ Pid = F$Getjpi(0,"PID") ! Get our PID $ Pid = Pid - F$Extract(0,4,Pid) ! Lower 4 digits $! New process name LOGO-- $ Process_Name = F$FAO("!15AS","LOGO-"+Pid+"-"+Node) $ Set Process/Name=""process_name'" $! $! Start Xaquarium as subprocess, priority zero... $! $ Spawn/Nowait @Kaos_Public:XAQ $! $! Start main TGV logo program... $! $ RUN KAOS_PUBLIC:TGV-LOGO.EXE 19 - VMS DECwindows Brain Surgery - Logical names that modify applications - DECW$SM_CREATE_LOG (DECW$LOGICAL_NAMES) - Performs double duty. If defined to FALSE will disable the following log files: Session Manager Log in SYS$LOGIN, DECwindows Server Log Files in SYS$MANAGER - DECW$WINMGREXE (DECW$LOGICAL_NAMES) - Points to the system default Window Manager - At least 4 available DXWM/DECW$WINMGR (XUI Window Manager), MWM/DECW$MWM (Motif Window Manager), VMS TWM (The Window Manager - Public Domain), OLWM (Sun OpenLook - Commercial) 20 - VMS DECwindows Brain Surgery - Logical names that modify applications - DBG$DECW$DISPLAY (Any Table) - Display variable for the DECwindows debugger. Defaults to DECW$DISPLAY. If you hate the DECwindows debugger, just define it to a space - DECW$MAIL_NEWMAILICON (Any Table) - Establish a new Icon when DECwindows mail receives mail. The input is a X11 Bitmap File (DECwindows Paint can draw these) - DECW$MAIL_NOMAILICON (Any Table) - New Icon when no mail in mailbox 21 - VMS DECwindows Brain Surgery - Logical Names that modify applications - DECW$PRINTER_FORMAT_ (Any Table) - Define list of valid printers for a particular format. Allows you to customize the DECwindows Print Widget - Formats that might work: TEXT, LINE, TERM, ANSI2, ANSI, PS, REGIS, TEK, DDIF - Formats that are commented out: MAIL, DDFF, DITROFF 22 - VMS DECwindows Brain Surgery - Logical Names that modify applications - DECW$USER_DEFAULTS - Points to user resource files (typically SYS$LOGIN) - Under XUI, some references to resource files were hardcoded to SYS$LOGIN. As a result, you cannot globally define DECW$USER_DEFAULTS to point to another directory and expect all of the resource files to work and/or be written there 23 - VMS DECwindows Brain Surgery - Logical Name Tables on a VAXstation - (LNM$SYSTEM_TABLE) - "DECW$BOOK" = "TGV_ROOT:[DECW$BOOK]" = "MULTINET_ROOT:[MULTINET.DOCUMENTATION]" = "TGV_ROOT:[DOC.XVIEW.V20]" = "DISK$SYSTEM:[PMDF.DOC]" = "DISK$CD_DOC_1:[DECW$BOOK]" = "DISK$ULTRIX_OLD:[000000]" - Bookreader Library disks. Keep in mind that Bookreader does not have to read all of it's data from one CD-ROM. Multiple disks can be defined. DECnet FAL (a little slow), DFS, NFS and copies on Magnetic Disk work just as well as a local CD drive 24 - VMS DECwindows Brain Surgery - Logical Name Tables on a VAXstation - (LNM$SYSTEM_TABLE) - "DECW$DECTERM_MAILBOX_CHIEF.TGV.COM::0.0" = "_MBA91:" - Communications mailbox for DECwindow Terminal Controller processes (DECW$TE_x). This mailbox is used by CREATE/TERMINAL to signal creation of a new terminal window 25 - VMS DECwindows Brain Surgery - Logical Name Tables on a VAXstation - (DECW$LOGICAL_NAMES) - "DECW$EXAMPLES" = "SYS$COMMON:[SYSHLP.EXAMPLES.DECW]" - Examples directory... always worth a look - "DECW$SYSTEM_DEFAULTS" = "SYS$COMMON:[DECW$DEFAULTS.USER]" = "SYS$COMMON:[DECW$DEFAULTS.SYSTEM]" = "SYS$LIBRARY:" - Location of System-wide resource files 26 - VMS DECwindows Brain Surgery - Logical Name Tables on a VAXstation - (DECW$LOGICAL_NAMES) - "VUE$LIBRARY" = "DECW$SYSCOMMON:[VUE$LIBRARY.USER]" = "DECW$SYSCOMMON:[VUE$LIBRARY.SYSTEM]" - Command procedures for FileView - "XDPS$EXAMPLES" = "SYS$COMMON:[SYSHLP.EXAMPLES.XDPS]" - Examples for Display PostScript Extension to DECwindows 27 - VMS DECwindows Brain Surgery - Other tables - On DECwindows servers there is an additional table called DECW$SERVER0_TABLE which typically does not show up when you SHOW LOGICAL - Use SHOW LOGICAL/TABLE=DECW$SERVER0_TABLE to view it 28 - VMS DECwindows Brain Surgery - DECW$SERVER0_TABLE - Contains configuration information about the server - Default fonts, keyboard maps, font file locations - Hardware devices (Pointer/Screen/Keyboard) - DECwindows RGB Color Table (stored as logical names) - Server Extensions List 29 - VMS DECwindows Brain Surgery - Resource Files - Files that describe aspects of a X windowing application - The files are loaded at process/image startup and can influence colors/fonts/geometry - User resource files are usually found in DECW$USER_DEFAULTS: they usually have the name DECW$.DAT - DECW$USER_DEFAULTS usually points to SYS$LOGIN - DECW$SYSTEM_DEFAULTS contains the DEC supplied defaults for applications - Unlike the user files, these files are usually commented! 30 - VMS DECwindows Brain Surgery - Resource File Formats - Text files containing lines of the format: "resource-name: value" - Resource-name is application specific - It is usually related to an application function (e.g. sm.pointer_shape is the pointer image that the session manager uses) - Or is related to a widget characteristic (e.g. Clock*background is the background color of the clock) 31 - VMS DECwindows Brain Surgery - Resource File Formats - Value: Can be an integer, string, hexadecimal number - Resource-name can be wildcarded (*background matches all the backgrounds in all the widgets in an application) 32 - VMS DECwindows Brain Surgery - Simple resource file hacking - Save a copy of your resources file (e.g. COPY DECW$BOOKREADER.DAT DECW$BOOKREADER.OLD in SYS$LOGIN) - Try changing the colors of the application by adding the following lines to DECW$BOOKREADER.DAT - *foreground: black *background: grey79 - Restart bookreader and... - black&grey text instead of the system manager defaults 33 - VMS DECwindows Brain Surgery - Simple resource file hacking - A good starting point is to read DECW$SYSTEM_DEFAULTS:DECW$CLOCK.DAT 34 - VMS DECwindows Brain Surgery - Some resources worth mentioning - sm.pointer_shape in DECW$SM_GENERAL.DAT - Positive values are DECwindows cursors - Try a negative value for a "standard" cursor. - sm.pointer_shape: -122 is the Spider cursor - Clock.Clock.alarm resources in DECW$CLOCK.DAT - Can be used to set a default alarm time/message 35 - VMS DECwindows Brain Surgery - Some resources worth mentioning - Mail*background/Mail*foreground resources in DECW$MAIL.DAT - Can be used to color individual windows in mail - *bigFontSetName/*littleFontSetName in DECW$TERMINAL.DAT - Can be used to change the fonts used by CREATE/TERMINAL 36 - VMS DECwindows Brain Surgery - Seeking Further Information - The DECwindows Startup command procedures - Disk 2 of the VMS Listings Kit - Hold onto this disk as DEC has decided not to ship Motif listings in future releases of the Listings disk - This is why you may never see a Motif based talk like this... NO SOURCES :-( - The Ultrix documentation covers resources in great detail. Many Ultrix resources are the same as their VMS equivalents. Three cheers for the common code pool! 37 - VMS DECwindows Brain Surgery - Seeking Further Information - DEC Professional - Kevin Barkes' DCL Dialogue column - VAX Professional - Patrick Mahan's X Views column - Internet - INFO-VAX e-mail list/comp.os.vms USENET group, and the Anonymous FTP Server on TGV.COM - DECUServe - User_Interface-Windows Conference - DECUS Symposium Session Notes (Check the UIUIG/GAPSIG Notes&Tapes for the past 1.5 years for interesting titles) 38 - VMS DECwindows Brain Surgery - Questions and Answers - Thank you very much for coming! 39 - Things Mom Never Told You - Questions and Answers - Thank you very much for coming! 40 - Things Mom Never Told You - (About VMS XUI DECwindows) - February 25th, 1992 - BAYVAX DECUS LUG Meeting - Palo Alto, California - - Presented By - John "Fast-Eddie" McMahon - TGV, Incorporated - 603 Mission Street - Santa Cruz, California 95060 - 800-848-3440 - MCMAHON@TGV.COM 41 - Things Mom Never Told You - Alternate Working Title: - - "VMS DECwindows Brain Surgery" - (External Field Test 1) - - Watch for the released version of Brain Surgery at the Spring DECUS Symposium (Atlanta) in May 1992. Time/Place TBD.