Bug#906766: xdg-utils: xdg-open fails to open a url

Seiji Adachi seiji_adachi at yahoo.co.jp
Mon Aug 20 20:31:25 BST 2018


Package: xdg-utils
Version: 1.1.3-1
Severity: normal

Dear Maintainer,

When I try to open a url by issuing xdg-open on a terminal, an alert
window pops up, saying "/my/current/directory/<url>: No such file or
directory" where <url> is the url typed in just after the command. 

I expect a browser starts up and the page specified by the url is
shown, though...

Here is the outcome of this command:
-------------------------------------------------------
adriana:/home/sea $ sh -x /usr/bin/xdg-open 'https://www.debian.org'
+ check_common_commands https://www.debian.org
+ [ 1 -gt 0 ]
+ parm=https://www.debian.org
+ shift
+ [ 0 -gt 0 ]
+ [ -z  ]
+ unset XDG_UTILS_DEBUG_LEVEL
+ [ 0 -lt 1 ]
+ xdg_redirect_output= > /dev/null 2> /dev/null
+ [ xhttps://www.debian.org != x ]
+ url=
+ [ 1 -gt 0 ]
+ parm=https://www.debian.org
+ shift
+ [ -n  ]
+ url=https://www.debian.org
+ [ 0 -gt 0 ]
+ [ -z https://www.debian.org ]
+ detectDE
+ unset GREP_OPTIONS
+ [ -n LXDE ]
+ DE=lxde
+ [ xlxde = x ]
+ [ xlxde = x ]
+ [ xlxde = x ]
+ [ xlxde = xgnome ]
+ [ -f /run/user/1000/flatpak-info ]
+ [ xlxde = x ]
+ DEBUG 2 Selected DE lxde
+ [ -z  ]
+ return 0
+ open_lxde https://www.debian.org
+ pcmanfm --help -a is_file_url_or_path https://www.debian.org
+ file_url_to_path https://www.debian.org
+ local file=https://www.debian.org
+ echo https://www.debian.org
+ grep -q ^file:///
+ echo https://www.debian.org
+ local file=https://www.debian.org
+ echo https://www.debian.org
+ grep -q ^/
+ pwd
+ file=/home/sea/https://www.debian.org
+ pcmanfm /home/sea/https://www.debian.org
+ [ 0 -eq 0 ]
+ exit_success
+ [ 0 -gt 0 ]
+ exit 0
adriana:/home/sea $ 
-------------------------------------------------------

Here's my temporary hack for my necessity, though I do not 
know much about shell scripting. 
-------------------------------------------------------
adriana:/home/sea $ diff -u /usr/bin/xdg-open  xdg-open
--- /usr/bin/xdg-open	2018-05-20 00:18:48.000000000 +0200
+++ xdg-open	2018-08-19 11:22:47.765438139 +0200
@@ -928,7 +928,7 @@
 {
 
     # pcmanfm only knows how to handle file:// urls and filepaths, it seems.
-    if pcmanfm --help >/dev/null 2>&1 -a is_file_url_or_path "$1"; then
+    if [ pcmanfm --help >/dev/null 2>&1 -a is_file_url_or_path "$1" ]; then
         local file="$(file_url_to_path "$1")"
 
         # handle relative paths
adriana:/home/sea $ 
-------------------------------------------------------



-- Package-specific info:
Desktop environment: XDG_CURRENT_DESKTOP=LXDE

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.17.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

xdg-utils depends on no packages.

Versions of packages xdg-utils recommends:
ii  libfile-mimeinfo-perl  0.29-1
ii  libnet-dbus-perl       1.1.0-4+b3
ii  libx11-protocol-perl   0.56-7
ii  x11-utils              7.7+4
ii  x11-xserver-utils      7.7+8

xdg-utils suggests no packages.

-- no debconf information



More information about the Pkg-freedesktop-maintainers mailing list