Hi,

When opening an url with dwb from command line, when dwb is already
started and running, this dbus error is returned:
DBus.Error:org.freedesktop.DBus.Error.NotSupported: Application does
not handle command line arguments

ex:
> dwb http://http://lists.openbsd.org &
dwb:/usr/local/lib/libestdc++.so.16.0: /usr/lib/libstdc++.so.57.0 :
WARNING: symbol(_ZN11__gnu_debug17_S_debug_messagesE) size mismatch,
relink your program

> dwb http://openbsd.org
Gdwb:/usr/local/lib/libestdc++.so.16.0: /usr/lib/libstdc++.so.57.0 :
WARNING: symbol(_ZN11__gnu_debug17_S_debug_messagesE) size mismatch,
relink your program
DBus.Error:org.freedesktop.DBus.Error.NotSupported: Application does
not handle command line arguments

And the url is not tabopen in the previous instance.

I've found this patch :
https://bitbucket.org/portix/dwb/commits/117a6a8cdb84b30b0c084dee531b650664d09ba2

and adapted it for the dwb ports :
 # cat patches/patch-src_application_c
$OpenBSD: patch-src_session_c,v 1.1.1.1 2014/09/08 20:01:03 landry Exp $
--- src/application.c.orig      Thu Sep 25 16:32:10 2014
+++ src/application.c   Thu Sep 25 16:27:32 2014
@@ -227,6 +227,12 @@
     single_instance = GET_BOOL("single-instance");
     if (s_opt_single || !single_instance) 
         g_application_set_flags(app, G_APPLICATION_NON_UNIQUE);
+#if GLIB_CHECK_VERSION(2, 40, 0)
+        else {
+            int flags = g_application_get_flags(app);
+            g_application_set_flags(app, flags |
G_APPLICATION_HANDLES_COMMAND_LINE);
+        }
+#endif
 
     bus = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, NULL);
     if (!s_opt_fallback && bus != NULL && g_application_register(app,
     NULL, &error)) 


And « voilà »

Reply via email to