Index: package_branches/invirt-web/ajaxterm-rebased/code/main.py
===================================================================
--- package_branches/invirt-web/ajaxterm-rebased/code/main.py	(revision 2750)
+++ package_branches/invirt-web/ajaxterm-rebased/code/main.py	(revision 2751)
@@ -38,4 +38,5 @@
 
 from view import View, revertStandardError
+import ajaxterm
 
 
@@ -388,4 +389,21 @@
             else:
                 raise InvalidInput('back', back, 'Not a known back page.')
+
+        atmulti = ajaxterm.Multiplex()
+        atsessions = {}
+
+        @cherrypy.expose
+        @cherrypy.tools.mako(filename="/terminal.mako")
+        def terminal(self, machine_id):
+            machine = validation.Validate(cherrypy.request.login, cherrypy.request.state, machine_id=machine_id).machine
+
+            status = controls.statusInfo(machine)
+            has_vnc = hasVnc(status)
+
+            d = dict(on=status,
+                     has_vnc=has_vnc,
+                     machine=machine,
+                     hostname=cherrypy.request.local.name)
+            return d
 
     machine = MachineView()
Index: package_branches/invirt-web/ajaxterm-rebased/code/static/ajaxterm/ajaxterm.css
===================================================================
--- package_branches/invirt-web/ajaxterm-rebased/code/static/ajaxterm/ajaxterm.css	(revision 2750)
+++ package_branches/invirt-web/ajaxterm-rebased/code/static/ajaxterm/ajaxterm.css	(revision 2751)
@@ -59,5 +59,4 @@
 pre.term span.b7  { background-color: #bbb; }
 
-body { background-color: #888; }
 #term {
 	float: left;
Index: package_branches/invirt-web/ajaxterm-rebased/code/templates/info.mako
===================================================================
--- package_branches/invirt-web/ajaxterm-rebased/code/templates/info.mako	(revision 2750)
+++ package_branches/invirt-web/ajaxterm-rebased/code/templates/info.mako	(revision 2751)
@@ -18,9 +18,9 @@
 % if on:
  % if not machine.type.hvm:
-  Console access: type
+  Console access: <a href="machine/${machine.machine_id}/terminal">Web Terminal</a> or type
   <tt>ssh ${machine.name}@${config.console.hostname}</tt>
   on Athena. <a href="https://xvm.scripts.mit.edu/wiki/SerialConsole">(more info)</a>
  % elif has_vnc:
-  <strong><a href="machine/${machine.machine_id}/vnc">Get Console</a></strong>
+  <strong><a href="machine/${machine.machine_id}/vnc">Get Console</a> or <a href="machine/${machine.machine_id}/terminal">Web Terminal</a></strong>
  % else:
   VNC console not enabled; still booting?
Index: package_branches/invirt-web/ajaxterm-rebased/code/templates/skeleton.mako
===================================================================
--- package_branches/invirt-web/ajaxterm-rebased/code/templates/skeleton.mako	(revision 2750)
+++ package_branches/invirt-web/ajaxterm-rebased/code/templates/skeleton.mako	(revision 2751)
@@ -62,4 +62,5 @@
 <li><a href="machine/${machine.machine_id}">Info</a></li>
 <li><a href="machine/${machine.machine_id}/vnc">Console</a></li>
+<li><a href="machine/${machine.machine_id}/terminal">Terminal</a></li>
 % endif
 <li><a href="help">Help</a></li>
Index: package_branches/invirt-web/ajaxterm-rebased/code/templates/terminal.mako
===================================================================
--- package_branches/invirt-web/ajaxterm-rebased/code/templates/terminal.mako	(revision 2751)
+++ package_branches/invirt-web/ajaxterm-rebased/code/templates/terminal.mako	(revision 2751)
@@ -0,0 +1,28 @@
+<%page expression_filter="h" />
+<%inherit file="skeleton.mako" />
+
+<%def name="title()">
+Terminal for ${machine.name}
+</%def>
+
+<style type='text/css'>body { max-width: none }</style>
+% if not on:
+<p> Your machine appears to be off.</p>
+% elif has_vnc:
+<p> Your machine appears to be an HVM; you will need to specially configure a serial console before you can use this terminal.</p>
+% endif
+
+<%def name="header_extra()">
+${parent.header_extra()}
+<link rel="stylesheet" type="text/css" href="static/ajaxterm/ajaxterm.css"/>
+<script type="text/javascript" src="static/ajaxterm/sarissa.js"></script>	
+<script type="text/javascript" src="static/ajaxterm/sarissa_dhtml.js"></script>	
+<script type="text/javascript" src="static/ajaxterm/ajaxterm.js"></script>
+<script type="text/javascript">
+window.onload=function() {
+	t=ajaxterm.Terminal("term", 80,25);
+}
+</script>
+</%def>
+
+<div id="term"></div>
