Invoking W3Browse

The command line options of w3browse and some examples of invoking the application are given in the following sections.

Synopsis

w3browse [[-d] [-mn] --] [-tty | -termxsrv ip-address[:port]] [-config filename] [URL]

Command Line Options

The following command line options are recognized by w3browse:

-d
Puts w3browse into the background and detaches itself from its controlling tty. -d should not be used together with -tty since the latter needs the controlling tty.

The option -d has no effect on MS-Windows.

-mn
Determines the amount of memory reserved by w3browse. Useful values and their main memory usage are:
-m3
2 MByte
-m4
4 MByte (default)
-m5
5 MByte

Depending on the actual usage of w3browse, more memory may be allocated dynamically and is mainly used for buffering purposes.

--
Terminates the list of parameters for the low-level part of w3browse.

All following parameters are passed to the application proper.

-tty
This option instructs w3browse to use its controlling tty (/dev/tty) as display device instead of a GUI window or a termxsrv connection. After termination of w3browse, the terminal may be messed up, so be prepared to issue a command such as reset in order to return to a sane state.

The option -tty does not work on MS-Windows.

-termxsrv ip-address[:port]
This option instructs w3browse to use a termxsrv connection to the specified server for display. The default port is 8162.

For further information see the description of the TERMXSRV_HOST environment variable.

-config filename
This option instructs w3browse to use the file that is specified by filename as its configuration file instead of the default file w3browse.rdf. Modified settings are saved on demand to this file in the usual way.

The specified filename is interpreted relative to the home directory of the current user if it does not start with a slash (/) or a directory shortcut.

URL
Specifies the URL of a document that should be fetched and displayed directly after startup of the application. The saved settings of the dialog "Open URL Window" are used to create a request context that is subsequently used to fetch documents.

Another possibility to automatically open a URL window and fetch an initial document on startup is to make use of the parameters StartURL and Open on Startup within the dialog "Open URL Window".

Examples

All examples assume that w3browse can be found somewhere within the search path, otherwise just prepend /PATH/TO/W3BROWSE/ to w3browse.

A typical usage of w3browse that opens a GUI window is simply:

w3browse -d --

On a tty, starting w3browse with IBM437 block graphics and resetting the tty after termination may be performed by:

TERMTYPE=ibmpc w3browse -- -tty 2>/dev/null ; reset

A similar effect can be achieved on a tty by using the wrapper script w3browse-tty, which, besides setting TERMTYPE, also initializes the LINES and COLUMNS environment variables according to the tty settings:

w3browse-tty

Starting w3browse with more reserved memory, using an alternate configuration file named w3browse-test.rdf and immediately displaying the contents of the local directory /usr/share/doc/html can be achieved with:

w3browse -d -m5 -- -config w3browse-test.rdf file:/usr/share/doc/html/

On MS-Windows, double clicking at w3browse.exe using the Windows Explorer or a similar program is sufficient to start the application.

Notes

w3browse and w3browse-tty should be called with the full path in their first argument (argv[0]), otherwise they may fail to find themselves or other required parts. Symbolic links to these programs should be avoided for the same reason except when placed within the same directory.

On MS-Windows, the executables generally have the extension .exe which should be appended to all occurrences of program names within this documentation where it has not already been done.