Cxterm is a program for simulating a keyboard+LCD and interacting with CAJUN. There are two versions; one written in Perl (accessable via the shell), and one written in Java (accessable via any machine with a web browser). Instructions for each follow:
'cxterm' is a Java applet for both accepting user-input and displaying information while playing songs. Cxterm uses the InputSocket and OutputSocket devices for communicating with CAJUN. You'll find that setup is remarkably similar to setting up other CAJUN devices
To set up cxterm for use, follow these steps:
The InputSocket needs a keyStroke map, actionMap, and global actionMap just like any other devices does. Note that only keys that produce a single byte are supported (i.e., a-z, A-Z, 0-9, =,-,.,+, @,#,$, etc.), so you'll want to choose a keyboard layout accordingly. Assign keys as it would seem natural to you.
Make sure the size is 20x4 (the only size currently supported by cxterm), and that the 'sendSize' box is checked.
Cxterm is started from the main CAJUN administration screen in your web browser; it's the last menu item. When launched, the cxterm window will appear in a separate window. Note that if you browse to another page, cxterm will likely disconnect and disappear as the web browser deallocates the Java applet.
Choose 'Connect...' from the cxterm File menu. Enter the hostname and port numbers, and you should be connected. Note that due to the default security precations taken by most Java runtime engines, you won't be able to connect to any other machine other than the one with the web server (i.e., if you move the Java applet to another machine and run it, you won't be able to connect to CAJUN.)
Most browsers offer a way to change Java security, but since it differs for each browser, a description of how to do so is beyond the scope of this document.
When connecting, you'll likely need to specify the public IP address of your web server; 'localhost' may not work.
If you are unhappy with the fact that cxterm disappears whenever you browse to a new URL, download and install the Java runtime engine from http://java.sun.com. You may run cxterm from your windows box if you copy the contents of the /usr/share/cajun/www/cxterm directory to it. Launch cxterm from the shell on your machine (Unix/DosPrompt):
shell$ cd /usr/share/cajun/www/cxterm (or C:\Progra~1\cxterm) shell$ appletviewer index.html
Programs run from within appletviewer don't have the security restrictions of your web browser.
Cxterm supports the following options:
Options are specified in the /usr/share/cajun/www/cxterm/index.html file, and appear as follows:
<param name=fontsize value=14>
Note: most browsers cache the html file, so changes won't take affect until you clear your browser's cache.
'cxterm' is a console-mode cajun interface for both accepting user-input and displaying information while playing songs. It's normally found in CAJUN's bin/ directory. You'll find that setup is remarkably similar to setting up other CAJUN devices
To set up cxterm for use, follow these steps:
cxterm requires an installation of Perl with Thread support. The normal installation included on most releases of Linux don't come with Thread support; you'll have to recompile Perl to use cxterm.
Don't forget that you already likely have a copy of Perl installed; you'll want to either remove the old one, or possibly rename the 'perl' executable to avoid confusion.
To compile Perl, download a copy from http://www.perl.com, and extract the compressed tar archive onto your hard disk. You should read the included instructions, but to get you started, you do:
cd perl-5.x.0 sh Configure (answer many questions; make sure you say 'y' to Thread support) (it's also useful to answer 'y' to 'build libperl.so?') make make test make install
Note that the default installation of this copy of Perl is likely /usr/local; you may want to relocate it elsewhere so you can remove it if necessary. During the questions, you will be asked for the base directory to install into. Either accept the default (/usr/local), or supply your own. A good place is /opt/perl. This directory will be known as $THREADEDPERL for the rest of these instructions.
You may also chose to remove your existing copy of Perl and stick with the threaded version. It will be a tiny bit slower than the original installation, but you likely won't notice the difference.
After a successful installation, you may remove the build directory.
Using the standard device manager that comes with CAJUN, install two devices: an ATkeyboard for input, and a Xterm for output.
To save you the trouble of creating the keyStrokeMap, cxterm has the built-in ability to do this. Just run:
$THREADEDPERL/bin/perl /usr/share/cajun/bin/cxterm -k
Then, go to the keyStrokeMap page of the ATkeyboard's device. You'll find entries filled in for the lower case letters and some symbols.
Ensure that your audio devices have been created, and assign keyStrokes to actions as you normally would. Don't forget to assign global actions, too!
If you choose a non-standard screen size, you'll need to create displayFilter entries laid out as you'd like the screen to appear. CAJUN comes pre-packaged with displayFilter entries for a 20x4 screen.
Now start cxterm:
$THREADEDPERL/bin/perl /usr/share/cajun/bin/cxterm
Your current Xterm window will be replaced by a view of CAJUN. Keys that you press (and have action-mapped) will do what you want them to do; i.e., scroll the display, choose songs, etc. To exit the cxterm, hit the spacebar.