! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Use 'exo-open' instead of 'xfbrowser4' (and fix argument handling) for compab...
Status:
RESOLVED: FIXED
Product:
Xfce4-smartbookmark-plugin
Component:
General

Comments

Description Samuli Suominen 2012-04-06 19:04:08 CEST
xfce-utils package is now obsolete and xfbrowser4 with it, however exo-open has been around for quite sometime now so lets just use it:

--- src/smartbookmark.c
+++ src/smartbookmark.c
@@ -78,7 +78,7 @@
     DBG ("Do search");
     gchar *execute;
     gboolean success;
-    execute = g_strconcat("xfbrowser4  \"", url, NULL);//works better for me
+    execute = g_strconcat("exo-open --launch WebBrowser  \"", url, NULL);//works better for me
     //execute = g_strconcat("x-www-browser \"", url, NULL);
     execute = g_strconcat(execute, keyword, NULL);
     execute = g_strconcat(execute, "\"", NULL);
Comment 1 Guido Berhoerster 2012-04-16 01:01:55 CEST
Created attachment 4329 
use exo-open and fix argument handling

Here's an improved patch which also fixes the broken argument handling.
Comment 2 Samuli Suominen 2012-04-17 09:13:00 CEST
Guido, you don't have libxfce4ui patch by any chance? :-)
Comment 3 Landry Breuil editbugs 2012-12-30 18:03:35 CET
hmm, i've just checked in a different fix in http://git.xfce.org/panel-plugins/xfce4-smartbookmark-plugin/commit/?id=1592b6de9aea22296e32ff9c2d5a56910e69a865

care to elaborate how your patch 'fixes the broken argument handling' ? i'll happily use your version if it's better.
Comment 4 Guido Berhoerster 2012-12-30 20:03:12 CET
(In reply to comment #3)
> hmm, i've just checked in a different fix in
> http://git.xfce.org/panel-plugins/xfce4-smartbookmark-plugin/commit/
> ?id=1592b6de9aea22296e32ff9c2d5a56910e69a865
> 
> care to elaborate how your patch 'fixes the broken argument handling' ? i'll
> happily use your version if it's better.

The current version unnecessarily constructs a string just to have it parsed and split up again by g_shell_parse_argv() which is called by g_spawn_command_line_async(), that's not only inefficient but will break if the url contains certain characters that would be interpreted by a shell, just putting quotes around the url is not a reliable way of avoiding this. In addition glib up to version 2.34 has a bug in the parser that will discard anything after a '#' (https://bugzilla.gnome.org/show_bug.cgi?id=562907).
Comment 5 Landry Breuil editbugs 2013-01-03 22:26:51 CET
okay, makes sense :) I've pushed your fix in d077cd1.

Bug #8642

Reported by:
Samuli Suominen
Reported on: 2012-04-06
Last modified on: 2013-01-03

People

Assignee:
Landry Breuil
CC List:
2 users

Version

Version:
unspecified

Attachments

use exo-open and fix argument handling (1.27 KB, patch)
2012-04-16 01:01 CEST , Guido Berhoerster
no flags

Additional information