Ajaxterm

From wiki.vincentkong.com
Jump to: navigation, search

Paper icon.png Related: http://www.vincentkong.com/2009/11/ssh-with-ajaxterm

Contents

Password protect Ajaxterm

Edit /etc/apache2/httpd.conf

<Proxy *>
   AuthUserFile /path/to/passwordfile
   AuthName "Ajaxterm"
   AuthType Basic
   require valid-user
   Order deny,allow
   Allow from all
</Proxy>
ProxyRequests off
ProxyPass / http://localhost:8022/
ProxyPassReverse / http://localhost:8022/

Configure larger terminal window

Edit /usr/share/ajaxterm/ajaxterm.html

<script type="text/javascript">
window.onload=function() {
    t=ajaxterm.Terminal("term",80,25);
};
</script>

Edit /usr/share/ajaxterm/ajaxterm.py

def __init__(self,width=80,height=24):

Ajaxterm not working in Firefox 3.6

In Firefox, the toolbar is display without the console.
To fix edit /usr/share/ajaxterm/sarissa.js and change line 268:

XMLDocument.prototype.readyState = 0;

to

try {
    XMLDocument.prototype.readyState = 0;
} 
catch(e) {}

Restart ajaxterm

$ /etc/init.d/ajaxterm restart

Pasting in Ajaxterm with Firefox

  1. Go to about:config
  2. Filter for codebase
  3. Change the value of signed.applets.codebase_principal_support from false to true (double-click on it)

Set timeout

Edit /usr/share/ajaxterm/ajaxterm.py, and modify the line represented in seconds.

INACTIVE_PROCESS_TIMEOUT=300
Retrieved from "/wiki/Ajaxterm"
Personal tools
MY WEBSITES