$! Select X session type for XDM login $! sys$login:xdm_xsession.com $! is used by XDM login to select the session. $! if not existing, the default as defined by $! sys$system:tcpip$xdm_xsession.com is executed. $! Using a GUI menu Xsessionselect if available, $! uses the default from sys$manager:decw$private_apps_setup.com $! finally falls back to CDE,DECW,DECTerm. $! $ nodename=f$getsyi("NODENAME") $ if f$search("DCL$PATH:xsessionselect.exe").nes."" then goto xsessionselect $DEFAULT: $ ON ERROR THEN EXIT $ if f$search("sys$manager:decw$private_apps_setup.com").nes."" $ then $ if f$type( DECW$START_NEW_DESKTOP ).nes."" $ then $ if f$edit( DECW$START_NEW_DESKTOP,"UPCASE").eqs."TRUE" $ then goto doCde $ else goto doSession $ endif $ endif $ endif $ ! $ ! Run CDE (if available) $ ! $doCde: $ if f$search( "cde$path:xsession.com" ) .nes. "" $ then $ @cde$path:xsession.com $ else $ ! $! Run traditional DECWindows session manager $doSession: $ if f$search( "sys$manager:decw$startsm.com" ) .nes. "" $ then $ @sys$manager:decw$startsm.com $ else $doTerminal: $ spawn/nowait run sys$system:DECW$MWM.EXE !if Your X11 display server does not run a window manager $ create/term/wait/wind=(icon="''nodename'",title="''nodename'") $ endif $ endif $ exit $xsessionselect: $ set noon $! the xsessionselect menu is placed at the current pointer position: $! run decw MWN window manager to enable moving the menu position even if the $! remote X11 display server has no window manager running. $ prccnt1=f$integer(f$getjpi(0,"PRCCNT")) $! write sys$output "PRCCNT before spawn:",prccnt1 $!!! spawn/nowait run sys$system:DECW$MWM.EXE !if Your X11 display server does not run a window manager $ xsessiontype = "DEFAULT" $ run dcl$path:xsessionselect $ write sys$output "Xsessionselect result: $STATUS=",$STATUS," XsessionType=",xsessiontype $ prccnt2=f$integer(f$getjpi(0,"PRCCNT")) $! write sys$output "PRCCNT before stop:",prccnt2 $ if prccnt2 .gt. prccnt1 $ then $ write sys$output "Stopping decw$mwm before starting a new session ..." $! process name is always DECW$MWM $ stop/image DECW$MWM $ endif $! branch according to content of symbol XSESSIONTYPE set by xsessionselect program: $ on error then goto DEFAULT $ goto 'xsessiontype' $ EXIT $ DECW: $ write sys$output "Starting DECWindows traditional session manager..." $ @sys$manager:decw$startsm.com $ EXIT $ CDE: $ write sys$output "Starting CDE desktop ..." $ @cde$path:xsession.com $ EXIT $ DECTerm: $ write sys$output "Starting DECTerm ..." $ spawn/nowait run sys$system:DECW$MWM.EXE !if Your X11 display server does not run a window manager $ create/term/wait/wind=(icon="''nodename'",title="''nodename'") $EXIT: $ EXIT