File: links-custom-helpers.html, Node: External Applications, Next: Using Links as a HTML Viewer, Prev: WWW Plug-ins, Up: Customizing...
The three applications featured in this section will help the user set up and run external applications from Links. They also serve as good examples of how to setup anyApplication to run with Links.
Source: <ftp://metalab.unc.edu/pub/Linux/apps/graphics/viewers/svga/>
Zgv (version 2.8-4) displays GIF/JPEG/PPM/BMP/TGA/PCX/PNG images on the console. It can only run on the console, but can be invoked from X. Zgv also features a thumbnails generator, slideshow, and zoom.
Assuming you have installed and successfully used zgv, here's how to get it running with Links (console).
1. Add the following entries to your Links.cfg file:
association "zgv: Console images" "image/jpg,image/jpeg,image/jpe,image/gif,image/png" "zgv %" 5 1
association "zgv: Console images" "image/x-portable-pixmap,image/x-ms-bmp,image/targa,image/pcx" "zgv %" 5 1
2. If you have not yet set up extension entries for the above content-types, do so now (see the extensions file [A.2], section "image").
3. Start Links on the console, with an image file as argument. When dialog pops up, select "Open" and image should load.
4. To view zgv options, press "?".
5. When zgv exits (press <Space_bar>) Links will return to the foreground.
6. To get zgv to load images automatically (i.e. without the dialog box displaying) change the "5 1" at the end of the association entry to "1 1".
Source: <ftp://metalab.unc.edu/pub/Linux/apps/graphics/viewers/X/>
Xloadimage is an X-based image displayer that displays image formats including GIF, JPEG, TIFF, PCX, XPM and XBM. It does not display PNG images (use xv(1) or imagemagick(1) for PNG).
Assuming you have installed and tested xloadimage, here's how to get it running with Links.
1. Add the following entries to your Links.cfg file:
association "Xloadimage" "image/jpg,image/jpeg,image/jpe,image/gif" "xview -quiet %" 6 1
association "Xloadimage" "image/tiff,image/x-xwindowdump,image/x-xbitmap,image/x-xpixmap" "xview -quiet %" 6 1
2. If you have not yet set up extension entries for the above content-types, do so now (see the extensions file [A.2], section "image").
3. Start Links in X, with an image file as argument. When dialog pops up, select "Open" and image should load.
4. Xloadimage will be resident in a forked process, so the image will display on the current desktop and Links will still be usable. If you load any more images, new instances of xloadimage will be started.
5. To get Xloadimage to load images automatically (i.e. without the dialog box displaying) change the "6 1" at the end of the association entry to "2 1".
Source: <ftp://space.mit.edu/pub/davis/most/> (also OS/2 since v.4.7)
Note: This setup will only work for local file and FTP file requests. Any HTTP file requests for a text type will be displayed in Links.
Most (version 4.7-1.1) is a paging programme that displays text and binary files on a terminal. Features in "most" include automatic gunzip, editor function (passes current file to $EDITOR) and multiple file display. "Most" works on the console and in X.
Assuming you have installed and tested "most", here's how to get it running with Links.
1. Add the following entries to your Links.cfg file:
association "most(1)" "text/anytext" "most %" 7 1
Note: content-type "text/anytext" is a convenient content-type in the extensions file [A.2], section "text". It groups twenty-five extensions together.
2. If you have not yet set up an extension entry for the above content-type, do so now (see the extensions file [A.2], section "text").
3. Start Links on the console or in X with a text file (with an extension!) as argument. When dialog pops up, select "Open" and the file should load.
4. "Most" will be resident in the current terminal which Links occupies. While "most" is in the foreground, you will not be able to use the running Links.
5. To get most to load text files automatically (i.e. without the dialog box displaying) change the "7 1" at the end of the association entry to "3 1".
Tip: To get "most" to invoke your editor in the current term, add the variable $EDITOR to your ".bashrc" file, like:
EDITOR="/usr/local/bin/vim"
export EDITOR
You can then invoke "most" from Links, and $EDITOR from "most".
User Reference Manual for Links Version 0.82 |
Revision Date: 2000-02-23 |
Copyright (C) 2000 Cliff Cunnington, <cliff@ccnet.demon.nl>
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.