Log In [secure]
Log In [http]

Anyterm

A Terminal Anywhere

Installation - 1.1 Branch

1. Prerequisites

Anyterm has been known to work with various Linux distributions, FreeBSD, and maybe Solaris and Mac OS X. Development is on Debian GNU/Linux, so if you use a different system you might need to do things a bit differently. If you find any significant differences please let me know and I will add a note to this page. Searching the forum for the name of your operating system or distribution is also recommened.

Anyterm is written for Apache2. I'm currently running Apache version 2.2.4; non-ancient 2.0.x versions should also be OK, but some early 2.2.x versions will not compile because of a C vs. C++ problem.

You'll need the Apache2 server already set up and running and a suitable -dev package installed. I'm using apache2-threaded-dev.

Anyterm uses some of the Boost C++ libraries. You may already have them on your system; if not, precompiled packages for most systems are available from the usual places. Installing a binary package is advised as Boost takes a long time to compile from source. I'm currently using version 1.34.1; versions 1.33 and newer probably work, but 1.32 doesn't.

Anyterm uses Ion Gaztañaga's Boost candidate shared memory library for communication between the Apache processes; again, I have included the necessary file so you don't need to download anything separately.

You need g++, the GNU C++ compiler. Ancient versions (e.g. 2.95) will not work; version 4.x is recommended, though 3.x should be OK.

You need GNU Make. Other versions of Make, e.g. the FreeBSD Make, will not work.

2. Download and Unpack

See the download page for instructions on downloading and unpacking the Anyterm source code.

3. The Apache module

The source code for Anyterm's Apache module is in the apachemod directory.

The build process uses a utility called apxs that's distributed with Apache. Some distributions including Debian call the Apache2 version of apxs "apxs2", while others just call it "apxs". The build process attempts to find it using either of those names, but if it fails you may need to adjust apachemod/Makefile slightly. See the comments in that file for details.

In the apachemod directory, compile and install:

$ cd apachemod $ make $ su # make install

You should not see any errors or warnings while compiling. If you do see them it may mean that something is has gone wrong; please report them in the forums so that they can be investigated, even if everything seems to work.

Put something like the following in /etc/apache2/httpd.conf or similar so that the module is loaded:

LoadModule anyterm /usr/lib/apache2/modules/anyterm.so

Now restart Apache: (I think that restart, not just reload, is necessary.)

# /etc/init.d/apache2 restart

4. The Anyterm Web Page

Copy anyterm.html, anyterm.css, anyterm.js and .htaccess from the browser directory somewhere accessible to your web server. Or use a symbolic link.

The .htaccess file arranges for the URL anyterm-module to be handled by the Anyterm module; you may need to put something like "AllowOverride All" in your global Apache configuration to allow this .htaccess file to be effective.

You should review the notes in .htaccess about security. For initial testing on an unexposed machine you may want to comment-out some of the security features in .htaccess; as shipped, the file may be too secure to allow any access.

You can of course change anyterm.html to adjust the appearance of the page to suit your application.

5. Testing It

I use Mozilla Firefox 2.0 and also test ocassionally with IE6, IE7 and Opera 9. Feedback about how well it works on all browsers would be appreciated.

Visit the anyterm.html page. With luck you will see some output, e.g. a password prompt from ssh. Once you have logged in, interaction should be normal i.e. cursor and control keys should also work (e.g. ctrl-A and ctrl-E for start and end of line and tab completion). Applications that use more advanced terminal features may or may not work; "top" and "nano" both work for me. You should see bold and colours where they are used.

If it doesn't seem to work, first see the notes on the issues page. If you can work out what has gone wrong do please get in touch so that I can try to fix it.

If you can't work out why it doesn't work, try searching the forum for similar error reports.

Please see the configuration page for how to tune your new Anyterm installation, including setting the character set.

Be sure to read the security page before deploying Anyterm on a machine accessible from the internet or with untrusted local users.

6. Copy and Paste

Since version 1.1.14 Anyterm has experiental copy and paste buttons at the top left of the window. Feedback about how well these work would be appreciated.

You may need to adjust your browser's security settings to make these buttons fully functional. In IE, just go to Tools -> Internet Options -> Security, select "Custom Level" and enable "Allow paste operations via script". In Mozilla it is more complicated; see this page: http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard. Without changing the security settings a basic two-step paste functionality should still be available, and you can copy using your browser's Edit menu.

One problem with Copy is that the selection will be deselected each time the screen updates. In a similar vein, when pasting you need to be quick when any dialog boxes are presented, as the communication with the server could time out if the dialog box is open for too long.

7. The Standalone Daemon

Installation of the standalone daemon is described on its own page.