Error showing url: Operation not supported

Bug #367874 reported by box2
2
Affects Status Importance Assigned to Milestone
LinuxDC++
New
Undecided
Unassigned

Bug Description

When links are posted in chat, clicking them or right clicking and selecting "Open link in default application" results in the error (reported to terminal) "Error showing url: Operation not supported". I'm not sure why this started happening, but it used to work fine. It may be because a related lib package was updated and no longer handles the call the same. Using linuxdcpp 1.0.3-1 from Debian repository. Also tried with launchpad 1.0.3 source compiled with `scons -j 4 release=true`.

Compiled the current bzr branch lp:linuxdcpp (LinuxDC++ version: 1.0.3+bzr Core version: 0.7091) with same scons options and it gives me "Failed to open URI: Operation not supported" (slightly different error message).

Side note: There should be instructions for checking out the latest code with bzr on this launchpad site somewhere instead of only on ubuntu forums.

box2 (linuxdcpp)
description: updated
box2 (linuxdcpp)
description: updated
Revision history for this message
box2 (linuxdcpp) wrote :

Found the source of the problem. Even though I was passing true for:

#if GTK_CHECK_VERSION(2, 14, 0)
(line 220 of linux/WulforUtil.cc of latest bzr)

(I'm using libgtk 2.14.7-5, which I just updated to yesterday) it seems that gtk_show_uri still requires gvfs to operate, which is weird because I thought that Gnome was trying to get rid of gvfs (at least by the time of gtk+ 3.0).

Perhaps should make gvfs a dependency of ldcpp, or perhaps make your nested ifs go something like (starting at line 220):

#if GTK_CHECK_VERSION(2, 14, 0)
 gtk_show_uri(NULL, (gchar *)uri.c_str(), GDK_CURRENT_TIME, &error);
#if error /* Woops, no gvfs */
 gchar *argv[3];
 argv[0] = (gchar *)"xdg-open";
 argv[1] = (gchar *)uri.c_str();
 argv[2] = NULL;
 g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error);
#endif
#else
 gchar *argv[3];

and continue the checks for OS and etc as how it was.

Revision history for this message
box2 (linuxdcpp) wrote :

Ahhh for fucks sake, xdg-open requires gvfs too.

So instead of
argv[0] = (gchar *)"xdg-open";
you could use
 argv[0] = (gchar *)"sensible-browser";

which doesn't require gvfs, but it ignores your preferred browser (in Gnome it will use Epiphany). I guess that kind of sucks, but at least it works. Or adds an extra chance of working, and doesn't depend on gvfs which has like 9,001 dependencies of its own.

Gvfs is pretty retarded though since gtk_show_uri() will still fail if gconf is not also present. It makes me rage that they are not both hard dependencies for libgtk2.0. Why even have core functions depend on libraries that aren't garunteed to be there.... ffffffffffffffffffffffffffff..... Maybe the Gnome and/or Debian team is just confused, I read somewhere that gconf and gvfs were being dumped in favor of improving/expanding glib.

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

GTK+ doesn't necessarily have a hard dependency on GVFS except on GNOME. In theory, gtk_show_uri should work on all desktop environments since it uses an interface to open an desktop specific URI handler. Unfortunately, GTK+ only contains an implementation for GNOME using GVFS. xdg-open is similar in that it also depends on the desktop environment URI handler executable (gnome-open, etc.). I will probably end up removing gtk_show_uri from the code as I'm quite disappointed GTK+ didn't implement it for non-GNOME systems.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.