Bug#931822: xdg-utils: xdg-open fails to open http urls under LXDE

Victor Wagner vitus at wagner.pp.ru
Wed Jul 10 21:30:48 BST 2019

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

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

After freshly installinng Debian buster with LXDE desktop
I've found out that many programs such as syncthing, claws-mail, fossil
etc are unable to open HTTP URLs in browser.

Instead of opening browser window they pops up small dialog which reads

file /home/vitus/http://localhost:8384 not found

   * What exactly did you do (or not do) that was effective (or

Investigation shows that root of problem is   line 931 in the xdg-open

    if pcmanfm --help >/dev/null 2>&1 -a is_file_url_or_path "$1"; then

Obvoisly it is error in the shell logic, and && should be used instead
of -a. -a works as logical AND operator only in the command line
of test(1) (AKA [ command), not when condition is exit code of arbitrary
unix command.

   * What was the outcome of this action?
Replacing this line with

    if pcmanfm --help >/dev/null 2>&1 && is_file_url_or_path "$1"; then

Fixes the problem.

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

-- System Information:
Debian Release: 10.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/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-5+b1
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