From 8605b747b3eac83e6af7907de7659bfb989d0358 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 1 Nov 2020 20:21:56 -0500 Subject: Fix opening of mailto: links This code path is used for opening both http/s and mailto links. On macOS, open is used generically handling both nicely. On Linux, x-www-browser was used for both, meaning it would attempt to open mailto links with the browser. This -does- work but is clunky. On my system, my defaults are Firefox for web and mutt for email, so if I clicked a mailto, Firefox would open (slow!) just to go out of focus as it opens mutt. Let's just mirror the macOS behaviour and use xdg-open for both kinds of links. Then the browser will be used for http/s and the mail client for mailto and everyone's happy. Signed-off-by: Alyssa Rosenzweig --- src/app.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/app.c') diff --git a/src/app.c b/src/app.c index a6632811..c2d5b732 100644 --- a/src/app.c +++ b/src/app.c @@ -1222,7 +1222,7 @@ void openInDefaultBrowser_App(const iString *url) { #if defined (iPlatformApple) iClob(newStringsCStr_StringList("/usr/bin/open", cstr_String(url), NULL)) #elif defined (iPlatformLinux) || defined (iPlatformOther) - iClob(newStringsCStr_StringList("/usr/bin/x-www-browser", cstr_String(url), NULL)) + iClob(newStringsCStr_StringList("/usr/bin/xdg-open", cstr_String(url), NULL)) #elif defined (iPlatformMsys) iClob(newStringsCStr_StringList( concatPath_CStr(cstr_String(execPath_App()), "../urlopen.bat"), -- cgit v1.2.3