Starting Janus

Assuming that you have an executable (say it is named "janus"), that was built for the computer architecture that you want to use, there are two preferred ways to start Janus:

        janus
Will just start the program, display a copyright message, and an X-window titled "janus" will appear.

The other way to start Janus is by typing:

        janus -f script
When you enter just janus you will the the following on the screen
# ==================================================
#  JANUS-SR  Version 3.0b [Aug 26 1996 17:15:09]
#            ---------------------------------------
#            University of Karlsruhe, Germany       
#            Carnegie Mellon University, USA        
#                                                   
#            (c) 1993-96 - Interactive Systems Labs 
# ==================================================
% 
or something similar. The percent character at the bottom is the regular prompt. Now you can type any Tcl command or Janus command. This mode of running Janus is also called "interactive".

If you want to run a Janus/Tcl script named "script" just type

	source script
After the commands in the script have been executed, or the command return has been executed on the top stack level, you will get back at the prompt. When the command exit is executed at any level, or if you type the command at the prompt, janus will terminate (no questions asked).

When you are running Janus interactively, you can stop the execution of the current script by hitting control-C. Since this will not take effect until the currently executed Tcl-command has finished. Since some commands can take quite a while to fionish, the reaction to control-C can also take a while (this is to make sure that Tcl will not end up in an inconsitent state). After hitting control-C you will end up in interrupt mode. You will see two percent signs as the prompt, to remind you of it. In interrupt mode you can also enter Janus or Tcl commands, but you can not interrupt these any more. Leave the interrupt mode by issuing the command CONT or BREAK to either continue with what was interrupted or to stop that. If BREAK does not work as expected, you can do it the hard way by typeing CONTERR which will make the currently executed command return an error code, that should make the script stop.

For running Janus as a background process you have to start it in the janus -f script style, which will not produce a prompt, instead the script script will be executed immediately. Make sure that your script has an EXIT command somewhere, otherwise, the process will never stop, and will have to be killed manually.

When janus is started either way, the file ~/.janusrc will be sourced if it exists. This is useful to have some frequently needed commands executed automatically, e.g. the definition of Tcl's auto_path variable.