You are not logged in.
I had pcmanfm installed a long time ago, now switched to pcmanfm-qt.
xdg-open seems to know that it's supposed to be opening image/png with viewnior, but tries to use pcmanfm for some reason:
[username@arch ~]$ xdg-mime query filetype f.png
image/png
[username@arch ~]$ xdg-mime query default image/png
viewnior.desktop
[username@arch ~]$ xdg-open f.png
/usr/bin/xdg-open: line 922: pcmanfm: command not found
[username@arch ~]$ grep pcmanf .config/mimeapps.list
inode/directory=pcmanfm-qt.desktop
[username@arch ~]$ grep -A3 -B2 pcmanfm /usr/bin/xdg-open
open_lxde()
{
# 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")"
--
fi
pcmanfm "$file"
else
open_generic "$1"
fi
So, xdg-open thinks it's running in lxde? Why? I use lxqt.
Last edited by nesk (2017-10-22 07:37:57)
Offline
What's in viewnior.desktop?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
What's in viewnior.desktop?
Irrelevant, as the OP said and as inspection of /usr/bin/xdg-open reveals, when lxde is detected as the DE, it does what it does with most DEs and simply opens everything with the DE-specific xdg-open equivalent -- so I assume pcmanfm does the same as `gio open`, gnome-open, kde-open, exo-open, etc.
Which is interesting since its main utility is a file browser but okay.
So, xdg-open thinks it's running in lxde? Why? I use lxqt.
It doesn't think any such thing.
case "$DE" in
[...]
lxde|lxqt)
open_lxde "$url"
;;
I assume that the xdg-open authors assume all LXQT users are running distros where, presumably, pcmanfm-qt has a compatibility symlink allowing it to be invoked as pcmanfm as well. So they didn't bother to make a separate opener for LXQT, and simply recycled the LXDE one.
Last edited by eschwartz (2017-10-22 04:30:17)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Indeed, there's an upstream bug report for it already: https://bugs.freedesktop.org/show_bug.cgi?id=103146
Offline
cfr wrote:What's in viewnior.desktop?
Irrelevant, as the OP said and as inspection of /usr/bin/xdg-open reveals, when lxde is detected as the DE, it does what it does with most DEs and simply opens everything with the DE-specific xdg-open equivalent -- so I assume pcmanfm does the same as `gio open`, gnome-open, kde-open, exo-open, etc.
Thanks. I never realised xdg-open used DE-heuristics like that.
Which is interesting since its main utility is a file browser but okay.
On my system, gwenview is treated as the default file manager, which seemed to me equally strange.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
On my system, gwenview is treated as the default file manager, which seemed to me equally strange.
Well, that's probably because update-desktop-database chooses and re-chooses the system default based on an RNG, every time it is run. You need to set a user default in ~/.config/mimeapps.list or the XDG standard says "whatever happens to be randomly listed first in the system /usr/share/applications/mimeinfo.cache is for some reason assumed to be the preferred opener".
So any application that announces it *can* handle inode/directory, can magically be assigned as the default file browser, and what's worse, it can change every time pacman installs or updates any *.desktop file at all.
Last edited by eschwartz (2017-10-22 23:09:21)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline