Bug 106585 - xdg-open under LXDE treats all URLs as local files
Summary: xdg-open under LXDE treats all URLs as local files
Status: RESOLVED MOVED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-20 00:37 UTC by Mark
Modified: 2019-02-16 13:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Mark 2018-05-20 00:37:29 UTC
First noticed in xdg-utils v1.1.3-1. In xdg-open's function open_lxde(), it's using shell operator '-a' when it should use '&&'. That causes all URLs to be opened with pcmanfm, and that's broken for URLs such as https://example.com.

Here's the fix:

--- xdg-open.bad
+++ xdg-open.good
@@ -939,7 +939,7 @@ open_lxde()
 {
 
     # 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 && is_file_url_or_path "$1"; then
         local file="$(file_url_to_path "$1")"
 
         # handle relative paths
Comment 1 GitLab Migration User 2019-02-16 13:40:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/129.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.