Run Jobs in an xterm

This section applies only to UNIX. In Windows, it is not possible to run jobs in an xterm.

Using FlowTracer in UNIX, jobs can be run in four modes:
  • normal mode, i.e. in the background, with no stdin. We expect most jobs to be using this execution mode.
  • xterm_open mode, i.e. within an open xterm
  • xterm_icon mode, i.e. within an iconified xterm
  • xterm_none mode, similar to "normal" except this is using the same sequence of commands as the xterm_open and xterm_icon modes

The xterm is opened on the display specified by the X11_DISPLAY property, which can be set either on each job or on the object with ID 1.

When executing in xterm, you may specify the name of an additional log file using the property VXT_LOG. This property is ignored in "normal" run-mode.

The run-mode is honored by the wrapper (vw, vov, ...). If you have a job with no wrapper, then you cannot change its run-mode.

The run-mode can be changed from the GUI, or can be specified in FDL. Changing the run mode of a job, does not invalidate the job.
# Example of FDL
RUNMODE xterm_open
J vw run_some_job


# Alternative: use option -xt -xi -xn -xb  in T,J
J -xt run_som_job

The RUNMODE procedure sets the run-mode for all subsequent jobs, while the option -xt, -xi, -xn, -xb only affects one job.

Subtle Differences between Normal and xterm_none

In "normal" run-mode, the command is a direct child of the wrapper, while in "xterm_none" the command is processed by the script "vov_job_xterm". In general "normal" is a bit faster than "xterm_none" and the VXT_LOG property is ignored. Ideally, "xterm_none" should behave the same as "normal", but because of the additional processing, the command may behave differently in the presence of syntax characters like redirections, pipes and quotes.

To have full control on complex commands, we recommend you choose the shell that you want to use as part of the command. Example:
X11_DISPLAY my_workstation:0.0
RUNMODE xterm_none
N "complicated command with pipes"
T /bin/sh -c "perl myscript | awk '{print $2}' | sort -u"
P VXT_LOG some_log_used_when_the_runmode_is_xterm_something.log

Controlling the DISPLAY

You can set the X11_DISPLAY variable in your flow with the X11_DISPLAY procedure.
# Fragment of Tcl code.
X11_DISPLAY -help 


        Description:
        Set the X11_DISPLAY property on an object.
        This property is used by the jobs that have
        a runmode of xterm_icon or xterm_open.

        Usage:
        X11_DISPLAY  value  <objectSpec>

        If value is empty, the property is deleted.
        If objectSpec is -help, this message is shown.
        If objectSpec is empty or "main", the VovId 1 is used.
        If objectSpec is "lastjob", the most recent job is used.

        Examples:
        X11_DISPLAY localhost:0.0
        X11_DISPLAY localhost:0.0
        X11_DISPLAY localhost:0.0  main
        X11_DISPLAY mac01:0.0 lastjob