PROC rap$define_desktop_environment (
  status : var of status = $optional
  )

*IF $variable(wev$proc_doc,declared)<>'UNKNOWN'
"   This request defines the desktop environment.
*IFEND

  create_variable command_file k=string v='$local.'//$unique
  create_variable ignore_status k=status
  create_variable local_status k=status

  COLLECT_TEXT $fname(command_file) until='  collect_end'
    $system.manage_network_applications
      define_client client=desktop_ve protocol=cdna_virtual_terminal
      end_define_client
      activate_client client=desktop_ve
    quit
  collect_end

  include_file $fname(command_file) status=local_status
  detach_file $fname(command_file) status=ignore_status

  IF local_status.normal THEN
    put_line ' The desktop environment is defined.' o=$response
  IFEND

  EXIT_PROC WITH local_status

PROCEND rap$define_desktop_environment
