### B USING WWW BROWSERS WITH HTX

#### B.1 Specifying a WWW Browser

HTX commands that need to display documents do so using a WWW browser and will try to make use of one that you already have running, if possible. Otherwise a new one will be started. By default, one of the browsers in the list firefox, mozilla, netscape, and mosaic will be used (in that priority order). On Mac OS X the default browser will be used.

You can change the browser that is used by means of the HTX_BROWSER environment variable. Thus, if you normally use the command “mozilla” to invoke your browser (and also have “firefox” installed), you could put the following into your .login file:

setenv HTX_BROWSER mozilla

Note that this command should not be an alias (e.g. if you normally use the C shell).

Currently, HTX can work only with the browsers listed above.

#### B.2 WWW Browser Communication

HTX communicates with your WWW browser using a remote control mechanism which is different for each browser.

In general, if you use only one machine at a time and never start up more than one copy of your browser, you are unlikely to have problems. However, if you use multiple machines or multiple browsers, the following describes some of the browser-specific behaviour you may need to be aware of.

##### B.2.1 Netscape, Mozilla and Firefox Behaviour

HTX communicates with these browsers using the remote control commands, which work by means of X resources, in essence looking for an existing window on your X display. If there is more than one of these, the first one will generally be used. If it cannot find such a window, HTX will start a new instance.

One problem with this arrangement is that HTX may detect an instance running on a different machine but displaying on the same X display. In this case, attempts to communicate with it will succeed, but the browser may not necessarily be able to access the local files that HTX asks it to view (but see §B.3). The best way around this problem is to ensure that the browser to be used by HTX is started first.

#### B.3 Inter-Machine Browser Communication

Often, your file system will be shared by more than one machine so that communication between different machines is possible via files. Such an arrangement provides an opportunity for HTX to pass information to WWW browsers which are already running on other machines. With the Netscape family of browsers, this can make working on multiple machines considerably easier by reducing the number of browser invocations you require. For it to work successfully, however, the files you are accessing must be known by identical names on all the machines involved.

If your file system is suitably set up, then HTX will normally be able to take advantage of this without any further action on your part. To achieve this, the temporary files which HTX creates to communicate with the browser will be placed in the directory $HOME/.htxtmp7. Therefore, if you use the same login directory (and$HOME translates to the same name) on each machine, these temporary files will be accessible to the browser wherever it is running.

If your login directory is not the same on each machine, then you can set the environment variable HTX_TMP to give the name of a suitable alternative directory to hold these temporary communication files. The directory you use should be accessible (for both reading and writing) and be known by identical names on all the machines which will use it.

7This directory is created automatically when needed.