Google

NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.52">

gnome-url

Name

gnome-url -- Launch viewers for documents based on their URL

Synopsis


#include <gnome.h>


void        gnome_url_show                  (const char *url);

Description

gnome_url_show() provides a simple way to display information to the user. gnome_url_show() knows about the man:, info: and ghelp: special URL prefixes and will invoke the proper display program for those.

Any other URL is passed to the default information display handler (usually this defaults to the gnome-moz-remote program (which uses Mozilla to display the URL).

gnome_url_show() uses the user configured programs for the different URL types. The settings for each one of these handlers is stored in the configuration file ~/.gnome/Gnome in the section "URL Handlers". The possible keys are:

  • info-show: The command to display an info: URL.

  • man-show: The command to display an man: URL.

  • ghelp-show: The command to display an ghelp: URL (this is a GNOME-relative help document).

  • default-show: The command to display any URL type which is not covered by the other cases.

The command specification should include a s specification. The s will be substituted with the URL thas was passed to the gnome_url_show function.

Details

gnome_url_show ()

void        gnome_url_show                  (const char *url);

Loads the given URL in an appropriate viewer. The viewer is deduced from the protocol part of the URL. That is all that the caller should know about the function.

Internally, the handler for a given URL is deduced by looking in the /Gnome/URL Handlers/<protocol>-show key in the user's configuration files. The key is a string that will be passed to gnome_execute_shell(), after the s is replaced with with the URL. If that key can't be found, it falls back to /Gnome/URL Handlers/default-show, and if that isn't found, uses the contents of the DEFAULT_HANDLER macro in this file.

If no /Gnome/URL Handlers keys are set, some sensible defaults are added to the user's configuration files.

We really need a capplet so a user can configure the behaviour of this function.

url : URL to show