Index: branches/1.3/gui/apps/Makefile.in
===================================================================
--- branches/1.3/gui/apps/Makefile.in	(revision 4849)
+++ branches/1.3/gui/apps/Makefile.in	(revision 4850)
@@ -24,4 +24,5 @@
 		copy_rappture_examples \
 		encodedata \
+		$(srcdir)/execute.tcl \
 		$(srcdir)/launcher.tcl \
 		$(srcdir)/grabdata \
Index: branches/1.3/gui/apps/execute.tcl
===================================================================
--- branches/1.3/gui/apps/execute.tcl	(revision 4850)
+++ branches/1.3/gui/apps/execute.tcl	(revision 4850)
@@ -0,0 +1,107 @@
+#! /bin/sh
+# ----------------------------------------------------------------------
+#  RAPPTURE PROGRAM EXECUTION
+#
+#  This script implements the -execute option for Rappture.  It
+#  provides a way to run a specific Rappture simulation without
+#  invoking the Rappture GUI.  Instead, it takes a driver file with
+#  the required parameters, submits that for execution, and then
+#  returns the run.xml file.  If the -tool file is specified, then
+#  it double-checks the driver against the tool to make sure that
+#  the requested tool and version are compatible.
+#
+#  This is normally invoked by launcher.tcl, so it expects $driverxml
+#  and $toolxml variable to be already set.
+#
+#  USAGE: execute.tcl
+# ======================================================================
+#  AUTHORS:  Michael McLennan, Purdue University
+#  Copyright (c) 2004-2012  HUBzero Foundation, LLC
+#
+#  See the file "license.terms" for information on usage and
+#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# ======================================================================
+#\
+exec tclsh "$0" $*
+# ----------------------------------------------------------------------
+# tclsh executes everything from here on...
+
+# bring in the Rappture object system
+package require Rappture
+Rappture::objects::init
+Rappture::resources::load
+
+# load the XML info in the driver file
+if {[catch {Rappture::library $driverxml} result]} {
+    puts stderr "ERROR while loading driver file \"$driverxml\""
+    puts stderr $result
+    exit 1
+}
+set driverobj $result
+
+# If tool.xml is not specified, try to find it the way Rappture would.
+if {$toolxml eq ""} {
+    if {[file isfile tool.xml]} {
+        set toolxml [file normalize tool.xml]
+    } elseif {[file isfile [file join rappture tool.xml]]} {
+        set toolxml [file normalize [file join rappture tool.xml]]
+    }
+}
+
+# If there's still no tool.xml, then see if we can find tooldir in driver
+if {$toolxml eq ""} {
+    set tooldir [$driverobj get tool.version.application.directory(tool)]
+    if {$tooldir eq ""} {
+        puts stderr "ERROR: missing -tool option, and driver file doesn't contain sufficient detail to locate the desired tool."
+        exit 1
+    }
+
+    set toolxml [file join $tooldir tool.xml]
+    if {![file exists $toolxml]} {
+        puts stderr "ERROR: missing tool.xml file \"$toolxml\""
+        exit 1
+    }
+}
+
+set installdir [file dirname [file normalize $toolxml]]
+set toolobj [Rappture::library $toolxml]
+set TaskObj [Rappture::Task ::#auto $toolobj $installdir]
+
+# tasks in execute mode run quietly and don't try to save results
+$TaskObj configure -jobstats "" -resultdir ""
+
+# Transfer input values from driver to TaskObj, and then run.
+# ----------------------------------------------------------------------
+
+# copy inputs from the test into the run file
+$TaskObj reset
+foreach path [Rappture::entities -as path $driverobj input] {
+    if {[$driverobj element -as type $path.current] ne ""} {
+        lappend args $path [$driverobj get $path.current]
+    }
+}
+
+# run the desired case...
+foreach {status result} [eval $TaskObj run $args] break
+
+if {$status == 0 && [Rappture::library isvalid $result]} {
+    set runxml $result
+    $runxml put output.status ok
+} else {
+    # build a run file for the result output
+    set info "<?xml version=\"1.0\"?>\n[$driverobj xml]"
+    set runxml [Rappture::LibraryObj ::#auto $info]
+    $runxml put output.log $result
+    $runxml put output.status failed
+}
+$runxml put output.time [clock format [clock seconds]]
+
+$runxml put tool.version.rappture.version $::Rappture::version
+$runxml put tool.version.rappture.revision $::Rappture::build
+
+if {[info exists tcl_platform(user)]} {
+    $runxml put output.user $::tcl_platform(user)
+}
+
+puts [$runxml xml]
+exit $status
Index: branches/1.3/gui/apps/launcher.tcl
===================================================================
--- branches/1.3/gui/apps/launcher.tcl	(revision 4849)
+++ branches/1.3/gui/apps/launcher.tcl	(revision 4850)
@@ -12,4 +12,5 @@
 #    rappture -builder ?-tool <toolfile>?
 #    rappture -tester ?-tool <toolfile>? ?-testdir <directory>?
+#    rappture -execute driver.xml ?-tool <toolfile>?
 #
 #  The default option is "-run", which brings up the GUI used to
@@ -53,4 +54,22 @@
                 set reqpkgs Tk
             }
+            -execute {
+                # for web services and simulation cache -- don't load Tk
+                set reqpkgs ""
+                if {[llength $argv] < 1} {
+                    puts stderr "error: missing driver.xml file for -execute option"
+                    exit 1
+                }
+                set driverxml [lindex $argv 0]
+                set argv [lrange $argv 1 end]
+
+                if {![file readable $driverxml]} {
+                    puts stderr "error: driver file \"$driverxml\" not found"
+                    exit 1
+                }
+
+                set dir [file dirname [info script]]
+                set mainscript [file join $dir execute.tcl]
+            }
             -tool {
                 set toolxml [lindex $argv 0]
@@ -89,4 +108,5 @@
                 puts stderr "  rappture -builder ?-tool toolFile?"
                 puts stderr "  rappture -tester ?-auto? ?-tool toolFile? ?-testdir directory?"
+                puts stderr "  rappture -execute driver.xml ?-tool toolFile?"
                 exit 1
             }
