diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2011-10-02 14:11:59 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-10-12 13:44:14 +0200 |
commit | 4ff408357b4584a84bc450a765fe11e7a52e8f00 (patch) | |
tree | db249bc90fbe6ca445e1e298ad0e7a7794d78850 | |
parent | 0d82bc58cd51f92c3806f9cfdf0d601f9e1a42e7 (diff) | |
download | mupdf-4ff408357b4584a84bc450a765fe11e7a52e8f00.tar.xz |
Default to opening URIs with xdg-open instead of open in X11 viewer.
Based on a patch by Zhihao Yuan <lichray@gmail.com>.
-rw-r--r-- | apps/x11_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/x11_main.c b/apps/x11_main.c index b8f041cf..6d8e789e 100644 --- a/apps/x11_main.c +++ b/apps/x11_main.c @@ -510,7 +510,13 @@ void winopenuri(pdfapp_t *app, char *buf) { char *browser = getenv("BROWSER"); if (!browser) + { +#ifdef __APPLE__ browser = "open"; +#else + browser = "xdg-open"; +#endif + } if (fork() == 0) execlp(browser, browser, buf, (char*)0); } |