What's the secret to gnome-terminal "open link?"

Ow Mun Heng Ow.Mun.Heng at wdc.com
Wed Aug 8 00:47:45 PDT 2007


On Tue, 2007-08-07 at 19:12 -0700, David Benfell wrote:
> Hello all,
> 
> I would really like the "open link" function to work under
> gnome-terminal.  But I can't find any relevant configuration
> and a Google search comes up empty.

gnome-terminal/src/terminal-screen.c

open_url (TerminalScreen *screen,
          const char     *orig_url,
          int             flavor)
{
  GError *err;
  char *url;

  g_return_if_fail (orig_url != NULL);

  /* this is to handle gnome_url_show reentrancy */
  g_object_ref (G_OBJECT (screen));

  switch (flavor)
    {
    case FLAVOR_DEFAULT_TO_HTTP:
      url = g_strdup_printf ("http:%s", orig_url);
      break;
    case FLAVOR_EMAIL:
      if (strncmp ("mailto:", orig_url, 7))
    url = g_strdup_printf ("mailto:%s", orig_url);
      else
    url = g_strdup (orig_url);
      break;
    case FLAVOR_AS_IS:
      url = g_strdup (orig_url);
      break;
    default:
      url = NULL;
      g_assert_not_reached ();
    }


More information about the freebsd-questions mailing list