diff --git a/xdg-utils/scripts/xdg-open.in b/xdg-utils/scripts/xdg-open.in index 630e63e..d172b00 100644 --- a/xdg-utils/scripts/xdg-open.in +++ b/xdg-utils/scripts/xdg-open.in @@ -473,7 +473,25 @@ open_lxde() open_lxqt() { - open_generic "$1" + # pcmanfm only knows how to handle file:// urls and filepaths, it seems. + if is_file_url_or_path "$1"; then + local file="$(file_url_to_path "$1")" + + # handle relative paths + if ! echo "$file" | grep -q ^/; then + file="$(pwd)/$file" + fi + + pcmanfm-qt "$file" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi } [ x"$1" != x"" ] || exit_failure_syntax