This bug was fixed in the package xdg-utils - 1.1.3-2ubuntu1
---------------
xdg-utils (1.1.3-2ubuntu1) focal; urgency=medium
* Sync with Debian. Remaining change:
- Add debian/xdg-utils.links:
+ Symlink /usr/bin/xdg-open to /usr/bin/browse (LP: #1624022)
xdg-utils (1.1.3-2) unstable; urgency=medium
[ Debian Janitor ]
* Bump debhelper from old 10 to 12.
* Set debhelper-compat version in Build-Depends.
* Add upstream metadata info.
[ Nicholas Guriev ]
* Shift debian/NEWS content to the left.
* Set Rules-Requires-Root: no in debian/control.
* Obey the nocheck build option.
* Bump Standards-Version to 4.5.0.
* Add machine readable debian/copyright file.
* Now uscan(1) watches FreeDesktop GitLab.
* Add trailing new line into auto-generated patch header.
* Drop redundant invocation dh_installchangelogs in debian/rules.
* Install release notes as NEWS file in according P. 12.7 of the Debian
policy.
* xdg-mime: Create config directory if it does not exist yet.
Closes: #652038.
[ Rex Dieter ]
* xdg-open: Do better pcmanfm check, fix AND operator. Closes: #908760,
Upstream: BR106636, BR106161.
[ Alberto Salvia Novella ]
* xdg-email: Support for Deepin.
[ Mario van der Linde ]
* Enable Cinnamon screensaver for XDG aware desktop environments (e.g. LXQt).
[ Iain Lane ]
* xdg-screensaver: Sanitise window name before sending it over the bus.
Closes: #910070, LP: #1743216, Upstream: BR108121.
[ Andrea Tarocchi ]
* xdg-open: correct handling directories with spaces in the name.
LP: #1848335, Upstream: #166.
-- Jeremy Bicha <[email protected]> Sun, 29 Mar 2020 19:38:09 -0400
** Changed in: xdg-utils (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to xdg-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1848335
Title:
xdg-open (and others) don't handle spaces in directory names properly
Status in xdg-utils package in Ubuntu:
Fix Released
Bug description:
Description: Ubuntu 18.04.3 LTS
Release: 18.04
xdg-utils: Installed: 1.1.2-1ubuntu2.3
Environment:
Shell: bash/fish (happens in both)
DE: i3
env:
XDG_DATA_DIRS=/home/barnex/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share/:/usr/share/i3:/home/barnex/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop
XDG_CONFIG_DIRS=/etc/xdg/xdg-i3:/etc/xdg
What I did:
xdg-open "http://reddit.com" # while having a specific directory structure
What I expected to happen:
Open a new tab/window of my browser with the correct URL.
What happened instead:
xdg-open froze, and eventually crashed.
I believe this issue in upstream caused the erratic behavior:
https://gitlab.freedesktop.org/xdg/xdg-utils/issues/131
xdg-utils seems to recursively look through directories for the
.desktop file. In my setup this path includes a directory:
"/home/barnex/.local/share/applications//wine//Programs//Zone.com
Deluxe Games/"
Instead of correctly looking into this directory, the next
search_desktop_file call goes into the "/home/barnex/Games" - a
directory outside of the search path.
/home/barnex/Games in turn has a directory "/home/barnex/Games//epic-
games-store//dosdevices//c://users//barnex//My Music/" - which again
has a space, and thus makes the xdg-open go to "/home/barnex/Music" -
another directory outside of my search path.
In /home/barnex/Music there's a directory called ' The Final Boss -
James Harmon - [Ambient - Breakbeat - Lo-Fi -Electronica] [2011]' -
this just causes an infinite loop of adding more slashes to the path,
resulting in calls like:
+ search_desktop_file chromium-browser.desktop
Music////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The Final Boss - James Harmon - [Ambient - Breakbeat - Lo-Fi
-Electronica] [2011]/ http://reddit.com
This eventually leads to a crash.
Running 'xdg-settings get default-url-scheme-handler' with no
arguments caused a similar behavior.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: xdg-utils 1.1.2-1ubuntu2.3
ProcVersionSignature: Ubuntu 4.15.0-66.75-generic 4.15.18
Uname: Linux 4.15.0-66-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
CurrentDesktop: i3
Date: Wed Oct 16 13:45:35 2019
InstallationDate: Installed on 2016-11-20 (1059 days ago)
InstallationMedia: Ubuntu-Server 16.10 "Yakkety Yak" - Release amd64
(20161012.1)
PackageArchitecture: all
SourcePackage: xdg-utils
UpgradeStatus: Upgraded to bionic on 2019-01-23 (265 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/1848335/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp