Hide Forgot
abrt version: 1.1.17 architecture: x86_64 cmdline: /usr/bin/python /usr/share/yumex/yumex.pyc comment: Where to configure the browser usage? component: yumex executable: /usr/share/yumex/yumex.pyc kernel: 2.6.35.11-83.fc14.x86_64 package: yumex-3.0.2-1.fc14 Attached file: reason, 150 bytes release: Fedora release 14 (Laughlin) time: 1302255749 uid: 500 backtrace ----- gui.py:227:_url_handler:GError: Kindprozess /usr/lib/firefox-3.5.6/firefox konnte nicht ausgefhrt werden (Datei oder Verzeichnis nicht gefunden) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/guihelpers/__init__.py", line 57, in on_url_event self.url_handler(tag.get_property("name")) File "/usr/lib/python2.7/site-packages/yumexgui/gui.py", line 227, in _url_handler gtk.show_uri(None, url, gtk.gdk.CURRENT_TIME) GError: Kindprozess /usr/lib/firefox-3.5.6/firefox konnte nicht ausgefhrt werden (Datei oder Verzeichnis nicht gefunden) Local variables in innermost frame: url: 'http://cola.tuxfamily.org/' self: <yumexgui.gui.PackageInfo instance at 0x26ab7e8> How to reproduce ----- 1. click on an url in the package description 2. 3.
Created attachment 490746 [details] File: backtrace
I use a gtk function to open an URL, using the default browser on your system There must be some be something not configured right on your system Try to change your default browser in your system preferences (Gnome)
Package: yumex-3.0.2-1.fc14 Architecture: x86_64 OS Release: Fedora release 14 (Laughlin) How to reproduce ----- 1. click on an url in the package description 2. 3. Comment ----- Where to configure the browser usage?
Package: yumex-3.0.2-1.fc14 Architecture: x86_64 OS Release: Fedora release 14 (Laughlin) How to reproduce ----- 1. click on an url in the package description 2. 3. Comment ----- Where to configure the browser usage? - Changed preferred browser application from Midori to Firefox and back again, always same result. - I am wondering where this (non-existing) path gets taken from.
$ python Python 2.7 (r27:82500, Sep 16 2010, 18:02:00) [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> url="http://cola.tuxfamily.org/" >>> import gtk >>> url="http://cola.tuxfamily.org/" >>> url 'http://cola.tuxfamily.org/' >>> gtk.show_uri(None, url, gtk.gdk.CURRENT_TIME) Traceback (most recent call last): File "<stdin>", line 1, in <module> glib.GError: Kindprozess »/usr/lib/firefox-3.5.6/firefox« konnte nicht ausgeführt werden (Datei oder Verzeichnis nicht gefunden)
$ python -c "import gtk; gtk.show_uri(None, 'http://cola.tuxfamily.org/', gtk.gdk.CURRENT_TIME)" Traceback (most recent call last): File "<string>", line 1, in <module> glib.GError: Kindprozess »/usr/lib/firefox-3.5.6/firefox« konnte nicht ausgeführt werden (Datei oder Verzeichnis nicht gefunden)
Tim, why don't you just use xdg-open (from xdg-utils package of freedesktop.org)? Maybe take a look into the source of claws-mail how it is solved there.
(In reply to comment #7) > Tim, > why don't you just use xdg-open (from xdg-utils package of freedesktop.org)? > Maybe take a look into the source of claws-mail how it is solved there. Because yumex uses gtk for the gui and gtk has gtk.show_uri() there should the do the right thing ( in most cases :) )
Created attachment 496114 [details] Unofficial pre-patch to open url with xdg-open This is an unofficial pre-patch to get an url opened with the user's preferred browser application, not let gtk guess for its own and any more what browser is there. I am still trying to fix that issue with glib.find_program_in_path() due to not working (reported as another new bug, see below). When I have also a fix for that, I would like to suggest another patch that still uses gtk.show_uri() as a fallback if there's no xdg-open available.
Looks good to me I have add the preliminary patch to yumex https://github.com/timlau/yumex/commit/fcc0a1b50d7f65b10c4b6a4679236138a698d91b
What happens if there is no xdg-open available in the system? With the preliminary patch applied, it should ignore the click on the link (not compatible downwards). Maybe it is good to check the success of xdg-open and fall back to gtk.show_uri() also in the error case.
I have made it a little better now https://github.com/timlau/yumex/commit/280c09a8af7286956bc7ae15a0398ac4eb5168ef
Great! So does the new patch mean that it is not needed to fix the segfault in glib.find_program_in_path() for yumex to work with xdg-open? If yes, nice work done. :) Could you add then xdg-open (in package xdg-utils) as an optional / suggested package dependency to go with the recommended official freedesktop standard?
Yes, there is no need for glib.find_program_in_path() in yumex. optional / suggested package dependency don't make much sense in fedora as it is not supported by rpm/yum.
This is definitely a feature request especially for yumex. I try with a new user and yumex starts firefox correctly, though not set as the preferred / default browser to use. I don't know why firefox-3.5.6 is mentioned in the absolute path for the original user. So please change the assignee and component back to yumex. Tim, there's a potential risk of shell injection (according to the python documentation) with your last patch to yumex. It is not with os.popen. If you prefer to use subprocess.call, maybe set the url value into quotes before calling xdg-open to prevent following given commands being executed as such. Anyways, I don't think that a packager will misuse the URL to do some nasty shell injection out of an official package, but what about unofficial packages being installed by a bad user?
<paranoid mode> Ok, we don't want that :) https://github.com/timlau/yumex/commit/9ae6791a1e5b601726322f3ad0fc9782bd4620cd4 </paranoid mode>
This should work: https://github.com/timlau/yumex/commit/280c09a8af7286956bc7ae15a0398ac4eb5168ef
I must need some coffee :) One more try to get the right url https://github.com/timlau/yumex/commit/9ae6791a1e5b601726322f3ad0fc9782bd4620cd
Alright. I got the latest sources from git and build a package for my own. It looks good. I am looking forward to the next official release :)