From eb1628c86777cd2f77daebce9f73501ea4d36651 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 26 Jun 2015 10:03:36 -0400 Subject: [PATCH] use xdg-open as the default fallback browser --- README.rst | 3 +++ config | 4 ++-- termite.cc | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 8fa2846..3a0b9fb 100644 --- a/README.rst +++ b/README.rst @@ -20,6 +20,9 @@ to expose functionality that's not required by GNOME Terminal even if there's no extra maintenance (it already exists internally) and no additional backwards compatibility hazards. +If no browser is configured and $BROWSER is unset, xdg-open from xdg-utils is +used as a fallback. + BUILDING ======== :: diff --git a/config b/config index d5f3423..eba1d71 100644 --- a/config +++ b/config @@ -19,8 +19,8 @@ cursor_blink = system # "block", "underline" or "ibeam" cursor_shape = block -# $BROWSER is used by default -#browser = chromium +# $BROWSER is used by default if set, with xdg-open as a fallback +#browser = xdg-open # set size hints for the window #size_hints = false diff --git a/termite.cc b/termite.cc index 949d6ac..b3cf79d 100644 --- a/termite.cc +++ b/termite.cc @@ -1333,8 +1333,7 @@ static void set_config(GtkWindow *window, VteTerminal *vte, config_info *info, } if (!info->browser) { - g_warning("Couldn't read BROWSER and there is no browser configured, disabling clickable_url and url hints"); - info->clickable_url = false; + info->browser = g_strdup("xdg-open"); } if (info->clickable_url) {