This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch speedup
in repository terminology.
View the commit online.
commit 8b56ab07af2f171737c6c030d734cf0259866391
Author: Cedric BAIL <[email protected]>
AuthorDate: Mon Mar 30 17:48:04 2026 -0600
fix(macos): use 'open' instead of 'xdg-open' for URL/file launching
xdg-open and xdg-email are Linux-only tools that don't exist on macOS,
causing URL, file, and email opening to silently fail. Replace all
hardcoded references with the macOS 'open' command via #ifdef __APPLE__
guards in config defaults, fallback strings, and a config migration
(CONF_VER 27 -> 28) for existing users.
---
src/bin/about.c | 4 ++++
src/bin/config.c | 41 +++++++++++++++++++++++++++++++++++++++--
src/bin/media.c | 5 +++++
src/bin/termio.c | 12 ++++++++++++
4 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/src/bin/about.c b/src/bin/about.c
index 14959e76..7216790b 100644
--- a/src/bin/about.c
+++ b/src/bin/about.c
@@ -36,7 +36,11 @@ _run_url(const About_Ctx *ctx,
const char *url)
{
char buf[PATH_MAX];
+#ifdef __APPLE__
+ const char *cmd = "open";
+#else
const char *cmd = "xdg-open";
+#endif
if (ctx->config && ctx->config->helper.url.general &&
ctx->config->helper.url.general[0])
diff --git a/src/bin/config.c b/src/bin/config.c
index fcc76e24..f974bed7 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -7,7 +7,7 @@
#include "colors.h"
#include "theme.h"
-#define CONF_VER 27
+#define CONF_VER 28
#define CONFIG_KEY "config"
#define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;}
@@ -543,6 +543,15 @@ config_new(void)
config->font.name = eina_stringshare_add("nexus.pcf");
config->font.size = 10;
config->font.bolditalic = EINA_TRUE;
+#ifdef __APPLE__
+ config->helper.email = eina_stringshare_add("open");
+ config->helper.url.general = eina_stringshare_add("open");
+ config->helper.url.video = eina_stringshare_add("open");
+ config->helper.url.image = eina_stringshare_add("open");
+ config->helper.local.general = eina_stringshare_add("open");
+ config->helper.local.video = eina_stringshare_add("open");
+ config->helper.local.image = eina_stringshare_add("open");
+#else
config->helper.email = eina_stringshare_add("xdg-email");
config->helper.url.general = eina_stringshare_add("xdg-open");
config->helper.url.video = eina_stringshare_add("xdg-open");
@@ -550,6 +559,7 @@ config_new(void)
config->helper.local.general = eina_stringshare_add("xdg-open");
config->helper.local.video = eina_stringshare_add("xdg-open");
config->helper.local.image = eina_stringshare_add("xdg-open");
+#endif
config->helper.inline_please = EINA_TRUE;
config->scrollback = 2000;
config->theme = eina_stringshare_add("default.edj");
@@ -788,7 +798,34 @@ config_load(void)
config->selection_escapes = EINA_TRUE;
EINA_FALLTHROUGH;
/*pass through*/
- case CONF_VER: /* 27 */
+ case 27:
+#ifdef __APPLE__
+ /* migrate xdg-open/xdg-email to macOS "open" command */
+ if (config->helper.email &&
+ !strcmp(config->helper.email, "xdg-email"))
+ eina_stringshare_replace(&config->helper.email, "open");
+ if (config->helper.url.general &&
+ !strcmp(config->helper.url.general, "xdg-open"))
+ eina_stringshare_replace(&config->helper.url.general, "open");
+ if (config->helper.url.video &&
+ !strcmp(config->helper.url.video, "xdg-open"))
+ eina_stringshare_replace(&config->helper.url.video, "open");
+ if (config->helper.url.image &&
+ !strcmp(config->helper.url.image, "xdg-open"))
+ eina_stringshare_replace(&config->helper.url.image, "open");
+ if (config->helper.local.general &&
+ !strcmp(config->helper.local.general, "xdg-open"))
+ eina_stringshare_replace(&config->helper.local.general, "open");
+ if (config->helper.local.video &&
+ !strcmp(config->helper.local.video, "xdg-open"))
+ eina_stringshare_replace(&config->helper.local.video, "open");
+ if (config->helper.local.image &&
+ !strcmp(config->helper.local.image, "xdg-open"))
+ eina_stringshare_replace(&config->helper.local.image, "open");
+#endif
+ EINA_FALLTHROUGH;
+ /*pass through*/
+ case CONF_VER: /* 28 */
config->version = CONF_VER;
break;
default:
diff --git a/src/bin/media.c b/src/bin/media.c
index 2bb89feb..3fd5200e 100644
--- a/src/bin/media.c
+++ b/src/bin/media.c
@@ -1527,7 +1527,12 @@ media_unknown_handle(const char *handler, const char *src)
const char *cmd;
char buf[PATH_MAX];
char *escaped;
+#ifdef __APPLE__
+ cmd = "open";
+#else
cmd = "xdg-open";
+#endif
+
escaped = ecore_file_escape_name(src);
if (!escaped)
return;
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 1d8dc987..20359917 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -780,7 +780,11 @@ _activate_link(Evas_Object *obj, Eina_Bool may_inline)
const char *p = s;
// run mail client
+#ifdef __APPLE__
+ cmd = "open";
+#else
cmd = "xdg-email";
+#endif
if ((config->helper.email) &&
(config->helper.email[0]))
@@ -799,7 +803,11 @@ _activate_link(Evas_Object *obj, Eina_Bool may_inline)
else if (path)
{
// locally accessible file
+#ifdef __APPLE__
+ cmd = "open";
+#else
cmd = "xdg-open";
+#endif
escaped = ecore_file_escape_name(path);
if (escaped)
@@ -851,7 +859,11 @@ _activate_link(Evas_Object *obj, Eina_Bool may_inline)
else if (url)
{
// remote file needs ecore-con-url
+#ifdef __APPLE__
+ cmd = "open";
+#else
cmd = "xdg-open";
+#endif
escaped = ecore_file_escape_name(s);
if (escaped)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.