6ee2bca
From 3c7cd96eb74f976bc566ab6eff649297eaf539d0 Mon Sep 17 00:00:00 2001
702c157
From: Peter Robinson <pbrobinson@gmail.com>
702c157
Date: Wed, 31 Jan 2018 13:33:06 +0000
6ee2bca
Subject: [PATCH 1/4] Add support for using xdg-open for opening help
702c157
702c157
xdg-open is a desktop agnostic way of opening the user's default application.
702c157
By trying xdg-open first we're more likely to open html files in the user's
702c157
default choice.
702c157
702c157
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
702c157
---
702c157
 installer/misc/vim/cshelp | 4 +++-
702c157
 1 file changed, 3 insertions(+), 1 deletion(-)
702c157
702c157
diff --git a/installer/misc/vim/cshelp b/installer/misc/vim/cshelp
702c157
index 888b8fe25..8c6553de8 100755
702c157
--- a/installer/misc/vim/cshelp
702c157
+++ b/installer/misc/vim/cshelp
702c157
@@ -3,7 +3,9 @@
702c157
 BROWSER_CMD=""
702c157
 
702c157
 if [ "${DISPLAY}" != "" ] ; then
702c157
-    if ( which links | grep -q -G -e "^/usr" ) ; then
702c157
+    if ( which xdg-open | grep -E -e "^(/usr)?/bin" ); then
702c157
+        BROWSER_CMD="xdg-open" ;
702c157
+    elif ( which links | grep -q -G -e "^/usr" ) ; then
702c157
         BROWSER_CMD="links -g" ;
702c157
     elif ( which konqueror | grep -q -G -e "^/opt" ) ; then
702c157
         BROWSER_CMD="konqueror" ;
702c157
-- 
6ee2bca
2.21.0
702c157