* bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) @ 2017-04-19 0:28 Ben Sturmfels 2017-04-19 16:59 ` Mekeor Melire 0 siblings, 1 reply; 10+ messages in thread From: Ben Sturmfels @ 2017-04-19 0:28 UTC (permalink / raw) To: 26558 Hi Folks, When I click an embedded URL within Gajim or Pumpa, I'm expecting a browser window to pop up, but nothing happens and I get an error on the command line: /home/ben/.guix-profile/bin/xdg-open: line 341: gnome-open: command not found The same error shows up if you attempt try the URL with xdg-open directly: $ xdg-open https://www.gnu.org/software/guix/ /home/ben/.guix-profile/bin/xdg-open: line 341: gnome-open: command not found As this message suggests, "gnome-open" is hard-coded into the "xdg-open" script on line 341. In Trisquel 7 and Debian Unstable the "gnome-open" executable is included in the "libgnome2-bin" package, which I gather is deprecated. Some quick searching around suggests that "gvfs-open" might be the the appropriate replacement for "gnome-open": https://askubuntu.com/questions/101965/what-is-the-replacement-for-gnome-open-in-gnome https://wiki.gnome.org/Initiatives/GnomeGoals/RemoveGnomeOpenGnomeHelp?highlight=%28gnome-open%29 https://wiki.gnome.org/Attic/LibgnomeMustDie?highlight=%28gnome-open%29 I assume that means either: a. packaging the deprecated gnome-open, b. modifying xdg-open to use gvfs-open instead of gnome-open, or c. in Gajim's case, possibly using "gtk_show_uri"? Cheers, Ben ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) 2017-04-19 0:28 bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) Ben Sturmfels @ 2017-04-19 16:59 ` Mekeor Melire 2017-04-19 19:05 ` Arun Isaac 0 siblings, 1 reply; 10+ messages in thread From: Mekeor Melire @ 2017-04-19 16:59 UTC (permalink / raw) To: Ben Sturmfels; +Cc: 26558 Ben Sturmfels <ben@stumbles.id.au> writes: > When I click an embedded URL within Gajim or Pumpa, I'm expecting a > browser window to pop up, but nothing happens and I get an error on the > command line: > > /home/ben/.guix-profile/bin/xdg-open: line 341: gnome-open: command > not found > > The same error shows up if you attempt try the URL with xdg-open > directly: > > $ xdg-open https://www.gnu.org/software/guix/ > /home/ben/.guix-profile/bin/xdg-open: line 341: gnome-open: command not > found > > As this message suggests, "gnome-open" is hard-coded into the "xdg-open" > script on line 341. I don't think so because this is what I get when running xdg-open: # this does not work: $ xdg-open http://gnu.org /home/mekeor/.guix-profile/bin/xdg-open: line 369: firefox: command not found /home/mekeor/.guix-profile/bin/xdg-open: line 369: mozilla: command not found /home/mekeor/.guix-profile/bin/xdg-open: line 369: netscape: command not found xdg-open: no method available for opening 'http://gnu.org' # this works just fine: $ BROWSER="icecat" xdg-open http://gnu.org As you might have guessed, I do not use GNOME. Did you try to set BROWSER environment variable? -- mekeor ~ EDD3 DFFA 76F6 11C0 145F 9A99 AC85 BAD8 A2F8 C868 ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) 2017-04-19 16:59 ` Mekeor Melire @ 2017-04-19 19:05 ` Arun Isaac 2017-04-19 19:22 ` Marius Bakke 0 siblings, 1 reply; 10+ messages in thread From: Arun Isaac @ 2017-04-19 19:05 UTC (permalink / raw) To: Mekeor Melire; +Cc: 26558 Thank you for the bug reports! The Guix xdg-utils package is in need of an update. The latest release is 1.1.1. Unlike the 1.0.2 release currently in Guix, the new release has test cases, many of which currently fail in Guix. While trying to get the tests to pass, I noticed that /usr/bin/file is hardcoded into xdg-mime. That, I think, is at least part of the problem. I am working on this, and will hopefully be done this weekend. We will revisit these bugs after that. ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) 2017-04-19 19:05 ` Arun Isaac @ 2017-04-19 19:22 ` Marius Bakke 2017-04-20 5:07 ` Maxim Cournoyer 2017-04-20 5:16 ` Arun Isaac 0 siblings, 2 replies; 10+ messages in thread From: Marius Bakke @ 2017-04-19 19:22 UTC (permalink / raw) To: Arun Isaac, Mekeor Melire; +Cc: 26558 [-- Attachment #1.1: Type: text/plain, Size: 761 bytes --] Arun Isaac <arunisaac@systemreboot.net> writes: > Thank you for the bug reports! > > The Guix xdg-utils package is in need of an update. The latest release > is 1.1.1. Unlike the 1.0.2 release currently in Guix, the new release > has test cases, many of which currently fail in Guix. While trying to > get the tests to pass, I noticed that /usr/bin/file is hardcoded into > xdg-mime. That, I think, is at least part of the problem. I am working > on this, and will hopefully be done this weekend. We will revisit these > bugs after that. Heh, I've had a WIP update for 1.1.1 for some time and decided to finish it based on this discussion. This tries "gvfs-open" before "gnome-open". @Ben (and others), can you try this patch and see if that works for you? [-- Attachment #1.2: 0001-gnu-xdg-utils-Update-to-1.1.1.patch --] [-- Type: text/x-patch, Size: 4596 bytes --] From 6ed7008561eea7b09085a17d6c443ee657a7fc2d Mon Sep 17 00:00:00 2001 From: Marius Bakke <mbakke@fastmail.com> Date: Sat, 8 Apr 2017 03:46:15 +0200 Subject: [PATCH] gnu: xdg-utils: Update to 1.1.1. * gnu/packages/freedesktop.scm (xdg-utils): Update to 1.1.1. [source]: Adjust file name. [native-inputs]: Add DOCBOOK-XSL, DOCBOOK-XML-4.1.2, LIBXSLT, W3M and XMLTO. [arguments]<#:phases>: Add 'patch-hardcoded-paths' and 'locate-catalog-files' phases. New parameter. [home-page]: Update to new home. --- gnu/packages/freedesktop.scm | 50 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index b912ce026..85a6c8b26 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org> ;;; Copyright © 2017 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,6 +56,7 @@ #:use-module (gnu packages polkit) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages w3m) #:use-module (gnu packages xml) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg)) @@ -62,23 +64,61 @@ (define-public xdg-utils (package (name "xdg-utils") - (version "1.0.2") + (version "1.1.1") (source (origin (method url-fetch) (uri (string-append "https://portland.freedesktop.org/download/xdg-utils-" - version ".tgz")) + version ".tar.gz")) (sha256 (base32 - "1b019d3r1379b60p33d6z44kx589xjgga62ijz9vha95dg8vgbi1")))) + "09a1pk3ifsndc5qz2kcd1557i137gpgnv3d739pv22vfayi67pdh")))) (build-system gnu-build-system) + (native-inputs + `(("docbook-xsl" ,docbook-xsl) + ("docbook-xml" ,docbook-xml-4.1.2) + ("libxslt" ,libxslt) + ("w3m" ,w3m) + ("xmlto" ,xmlto))) (propagated-inputs `(("xprop" ,xprop) ; for Xfce detecting ("xset" ,xset))) ; for xdg-screensaver (arguments - `(#:tests? #f)) ; no check target - (home-page "http://portland.freedesktop.org/") + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-hardcoded-paths + (lambda _ + (substitute* "scripts/xdg-mime.in" + (("/usr/bin/file") (which "file"))) + (substitute* "scripts/xdg-open.in" + (("/usr/bin/printf") (which "printf"))) + #t)) + (add-before 'build 'locate-catalog-files + (lambda* (#:key inputs #:allow-other-keys) + (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook")) + (xsldoc (string-append (assoc-ref inputs "docbook-xsl") + "/xml/xsl/docbook-xsl-" + ,(package-version docbook-xsl)))) + (for-each (lambda (file) + (substitute* file + (("http://.*/docbookx\\.dtd") + (string-append xmldoc "/docbookx.dtd")))) + (find-files "scripts/desc" "\\.xml$")) + (substitute* "scripts/Makefile" + ;; Apparently `xmlto' does not bother to looks up the stylesheets + ;; specified in the XML, unlike the above substitition. Instead it + ;; uses a hard-coded URL. Work around it here, but if this is + ;; common perhaps we should hardcode this path in xmlto itself. + (("\\$\\(XMLTO\\) man") + (string-append "$(XMLTO) -x " xsldoc + "/manpages/docbook.xsl man"))) + (setenv "STYLESHEET" + (string-append xsldoc "/html/docbook.xsl")) + #t)))))) + (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/") (synopsis "Freedesktop.org scripts for desktop integration") (description "The xdg-utils package is a set of simple scripts that provide basic desktop integration functions in the framework of the -- 2.12.2 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply related [flat|nested] 10+ messages in thread
* bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) 2017-04-19 19:22 ` Marius Bakke @ 2017-04-20 5:07 ` Maxim Cournoyer 2017-04-22 10:16 ` Marius Bakke 2017-04-20 5:16 ` Arun Isaac 1 sibling, 1 reply; 10+ messages in thread From: Maxim Cournoyer @ 2017-04-20 5:07 UTC (permalink / raw) To: Marius Bakke; +Cc: 26558 [-- Attachment #1: Type: text/plain, Size: 5915 bytes --] Hello Marius, Marius Bakke <mbakke@fastmail.com> writes: > Arun Isaac <arunisaac@systemreboot.net> writes: > >> Thank you for the bug reports! >> >> The Guix xdg-utils package is in need of an update. The latest release >> is 1.1.1. Unlike the 1.0.2 release currently in Guix, the new release >> has test cases, many of which currently fail in Guix. While trying to >> get the tests to pass, I noticed that /usr/bin/file is hardcoded into >> xdg-mime. That, I think, is at least part of the problem. I am working >> on this, and will hopefully be done this weekend. We will revisit these >> bugs after that. > > Heh, I've had a WIP update for 1.1.1 for some time and decided to finish > it based on this discussion. This tries "gvfs-open" before "gnome-open". > > @Ben (and others), can you try this patch and see if that works for you? > > From 6ed7008561eea7b09085a17d6c443ee657a7fc2d Mon Sep 17 00:00:00 2001 > From: Marius Bakke <mbakke@fastmail.com> > Date: Sat, 8 Apr 2017 03:46:15 +0200 > Subject: [PATCH] gnu: xdg-utils: Update to 1.1.1. > > * gnu/packages/freedesktop.scm (xdg-utils): Update to 1.1.1. > [source]: Adjust file name. > [native-inputs]: Add DOCBOOK-XSL, DOCBOOK-XML-4.1.2, LIBXSLT, W3M and XMLTO. > [arguments]<#:phases>: Add 'patch-hardcoded-paths' and 'locate-catalog-files' > phases. New parameter. > [home-page]: Update to new home. > --- > gnu/packages/freedesktop.scm | 50 +++++++++++++++++++++++++++++++++++++++----- > 1 file changed, 45 insertions(+), 5 deletions(-) > > diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm > index b912ce026..85a6c8b26 100644 > --- a/gnu/packages/freedesktop.scm > +++ b/gnu/packages/freedesktop.scm > @@ -8,6 +8,7 @@ > ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> > ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org> > ;;; Copyright © 2017 Mark H Weaver <mhw@netris.org> > +;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -55,6 +56,7 @@ > #:use-module (gnu packages polkit) > #:use-module (gnu packages pkg-config) > #:use-module (gnu packages python) > + #:use-module (gnu packages w3m) > #:use-module (gnu packages xml) > #:use-module (gnu packages xdisorg) > #:use-module (gnu packages xorg)) > @@ -62,23 +64,61 @@ > (define-public xdg-utils > (package > (name "xdg-utils") > - (version "1.0.2") > + (version "1.1.1") > (source > (origin > (method url-fetch) > (uri (string-append > "https://portland.freedesktop.org/download/xdg-utils-" > - version ".tgz")) > + version ".tar.gz")) > (sha256 > (base32 > - "1b019d3r1379b60p33d6z44kx589xjgga62ijz9vha95dg8vgbi1")))) > + "09a1pk3ifsndc5qz2kcd1557i137gpgnv3d739pv22vfayi67pdh")))) > (build-system gnu-build-system) > + (native-inputs > + `(("docbook-xsl" ,docbook-xsl) > + ("docbook-xml" ,docbook-xml-4.1.2) > + ("libxslt" ,libxslt) > + ("w3m" ,w3m) > + ("xmlto" ,xmlto))) > (propagated-inputs > `(("xprop" ,xprop) ; for Xfce detecting > ("xset" ,xset))) ; for xdg-screensaver > (arguments > - `(#:tests? #f)) ; no check target > - (home-page "http://portland.freedesktop.org/") > + `(#:tests? #f ; no check target > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'patch-hardcoded-paths > + (lambda _ > + (substitute* "scripts/xdg-mime.in" > + (("/usr/bin/file") (which "file"))) > + (substitute* "scripts/xdg-open.in" > + (("/usr/bin/printf") (which "printf"))) > + #t)) > + (add-before 'build 'locate-catalog-files > + (lambda* (#:key inputs #:allow-other-keys) > + (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml") > + "/xml/dtd/docbook")) > + (xsldoc (string-append (assoc-ref inputs "docbook-xsl") > + "/xml/xsl/docbook-xsl-" > + ,(package-version docbook-xsl)))) > + (for-each (lambda (file) > + (substitute* file > + (("http://.*/docbookx\\.dtd") > + (string-append xmldoc "/docbookx.dtd")))) > + (find-files "scripts/desc" "\\.xml$")) > + (substitute* "scripts/Makefile" > + ;; Apparently `xmlto' does not bother to looks up the stylesheets > + ;; specified in the XML, unlike the above substitition. Instead it > + ;; uses a hard-coded URL. Work around it here, but if this is > + ;; common perhaps we should hardcode this path in xmlto itself. > + (("\\$\\(XMLTO\\) man") > + (string-append "$(XMLTO) -x " xsldoc > + "/manpages/docbook.xsl man"))) Have you tried setting the XML_CATALOG_FILES variable? You might be able to get rid of the substitutions by using it. You can simply add libxml2 as an input, which will define such variable for you (thanks to Ludovic for pointing this out previously!). > + (setenv "STYLESHEET" > + (string-append xsldoc "/html/docbook.xsl")) > + #t)))))) > + (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/") > (synopsis "Freedesktop.org scripts for desktop integration") > (description "The xdg-utils package is a set of simple scripts that > provide basic desktop integration functions in the framework of the Maxim [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) 2017-04-20 5:07 ` Maxim Cournoyer @ 2017-04-22 10:16 ` Marius Bakke 0 siblings, 0 replies; 10+ messages in thread From: Marius Bakke @ 2017-04-22 10:16 UTC (permalink / raw) To: Maxim Cournoyer; +Cc: 26558 [-- Attachment #1: Type: text/plain, Size: 1938 bytes --] Hi Maxim, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > Hello Marius, > > Marius Bakke <mbakke@fastmail.com> writes: >> [...] >> + (add-before 'build 'locate-catalog-files >> + (lambda* (#:key inputs #:allow-other-keys) >> + (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml") >> + "/xml/dtd/docbook")) >> + (xsldoc (string-append (assoc-ref inputs "docbook-xsl") >> + "/xml/xsl/docbook-xsl-" >> + ,(package-version docbook-xsl)))) >> + (for-each (lambda (file) >> + (substitute* file >> + (("http://.*/docbookx\\.dtd") >> + (string-append xmldoc "/docbookx.dtd")))) >> + (find-files "scripts/desc" "\\.xml$")) >> + (substitute* "scripts/Makefile" >> + ;; Apparently `xmlto' does not bother to looks up the stylesheets >> + ;; specified in the XML, unlike the above substitition. Instead it >> + ;; uses a hard-coded URL. Work around it here, but if this is >> + ;; common perhaps we should hardcode this path in xmlto itself. >> + (("\\$\\(XMLTO\\) man") >> + (string-append "$(XMLTO) -x " xsldoc >> + "/manpages/docbook.xsl man"))) > > Have you tried setting the XML_CATALOG_FILES variable? You might be able > to get rid of the substitutions by using it. You can simply add libxml2 > as an input, which will define such variable for you (thanks to Ludovic > for pointing this out previously!). I tried now to add libxml2, and also set XML_CATALOG_FILES manually (and both :)), but no luck. Thanks for the tip, though. Would be good to find out why it doesn't work for this case. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) 2017-04-19 19:22 ` Marius Bakke 2017-04-20 5:07 ` Maxim Cournoyer @ 2017-04-20 5:16 ` Arun Isaac 2017-04-22 10:31 ` Marius Bakke 1 sibling, 1 reply; 10+ messages in thread From: Arun Isaac @ 2017-04-20 5:16 UTC (permalink / raw) To: 26558 > Heh, I've had a WIP update for 1.1.1 for some time and decided to finish > it based on this discussion. Oh, good! :-) Your patch builds successfully. But, the new version has tests, and you still need to package them. When I try to run the tests, a few fail. Setting environment variables HOME and BROWSER makes some tests pass. This is about as far as I got with my WIP patch. ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) 2017-04-20 5:16 ` Arun Isaac @ 2017-04-22 10:31 ` Marius Bakke 2017-04-23 12:14 ` Ben Sturmfels 0 siblings, 1 reply; 10+ messages in thread From: Marius Bakke @ 2017-04-22 10:31 UTC (permalink / raw) To: Arun Isaac, 26558 [-- Attachment #1: Type: text/plain, Size: 1099 bytes --] Arun Isaac <arunisaac@systemreboot.net> writes: >> Heh, I've had a WIP update for 1.1.1 for some time and decided to finish >> it based on this discussion. > > Oh, good! :-) > > Your patch builds successfully. But, the new version has tests, and you > still need to package them. When I try to run the tests, a few > fail. Setting environment variables HOME and BROWSER makes some tests > pass. This is about as far as I got with my WIP patch. I had a go at this, and after adding some inputs and setting HOME only four tests fail. Getting those to work in the build environment seems pretty involved however (currently I'm starting xorg and adding a "mimeapps.list"), so I shunted on this for now as it obscures the update diff somewhat and is better suited as a separate patch. IMO it's better to have a working package without tests, than a broken package without tests ;-) Would be good to get it fixed though, will give it a go at a later opportunity. Ben: Can you confirm whether the latest xdg-utils work for you? It's in 'master' now so you should get it after a `guix pull` and update. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) 2017-04-22 10:31 ` Marius Bakke @ 2017-04-23 12:14 ` Ben Sturmfels 2017-04-23 23:00 ` Marius Bakke 0 siblings, 1 reply; 10+ messages in thread From: Ben Sturmfels @ 2017-04-23 12:14 UTC (permalink / raw) To: Marius Bakke, Arun Isaac, 26558 [-- Attachment #1: Type: text/plain, Size: 250 bytes --] On 22/04/17 20:31, Marius Bakke wrote: > Ben: Can you confirm whether the latest xdg-utils work for you? It's in > 'master' now so you should get it after a `guix pull` and update. Thanks Marius, working beautifully now! Regards, Ben [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) 2017-04-23 12:14 ` Ben Sturmfels @ 2017-04-23 23:00 ` Marius Bakke 0 siblings, 0 replies; 10+ messages in thread From: Marius Bakke @ 2017-04-23 23:00 UTC (permalink / raw) To: Ben Sturmfels, Arun Isaac, 26558-done [-- Attachment #1: Type: text/plain, Size: 326 bytes --] Ben Sturmfels <ben@stumbles.id.au> writes: > On 22/04/17 20:31, Marius Bakke wrote: > >> Ben: Can you confirm whether the latest xdg-utils work for you? It's in >> 'master' now so you should get it after a `guix pull` and update. > > Thanks Marius, working beautifully now! Yay, thanks for confirming! Closing this bug. :-) [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-04-23 23:01 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-04-19 0:28 bug#26558: Opening URLs with xdg-open fails (eg. Gajim, Pumpa) Ben Sturmfels 2017-04-19 16:59 ` Mekeor Melire 2017-04-19 19:05 ` Arun Isaac 2017-04-19 19:22 ` Marius Bakke 2017-04-20 5:07 ` Maxim Cournoyer 2017-04-22 10:16 ` Marius Bakke 2017-04-20 5:16 ` Arun Isaac 2017-04-22 10:31 ` Marius Bakke 2017-04-23 12:14 ` Ben Sturmfels 2017-04-23 23:00 ` Marius Bakke
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).