diff options
Diffstat (limited to 'browser_linux.go')
| -rw-r--r-- | browser_linux.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/browser_linux.go b/browser_linux.go index e9e9b8c..ccd1685 100644 --- a/browser_linux.go +++ b/browser_linux.go @@ -5,6 +5,10 @@ import ( ) func openBrowser(url string) error { - cmd := exec.Command("xdg-open", url) - return cmd.Run() + sensibleBrowser, err := exec.LookPath("sensible-browser") + if err != nil { + // sensible-browser not availble, try xdg-open + return exec.Command("xdg-open", url).Run() + } + return exec.Command(sensibleBrowser, url).Run() } |
