Using Ubuntu 22.04 LTS, KDE Plasma 5, with wine 7.8 installed.
When I try to use the command xdg-open .
the expected mime type (for inode/directory is Dolphin) is not invoked. Instead wslview
is invoked. Furthermore I receive an error trying to open the windows registry console tool, but fails to find the file:
Original Error:
barry@barry-laptop:~$ xdg-open .
grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
WSL Interopability is disabled. Please enable it before using WSL.
grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
[error] WSL Interoperability is disabled. Please enable it before using WSL.
/usr/bin/wslview: line 216: /mnt/c/Windows/System32/reg.exe: No such file or directory
/usr/bin/wslview: line 308: [: -ge: unary operator expected
[error] This protocol is not supported before version 1903.
I would like to control xdg-open
using mime types, not wslview.
Mime Type for inode/directory:
barry@barry-laptop:~$ xdg-mime query filetype .
inode/directory
barry@barry-laptop:~$ xdg-mime query default inode/directory
org.kde.dolphin.desktop
Why is it using wslview and not the registered mime types?
Research:
by issuing the command sh -x /usr/bin/xdg-open .
I see xdg-open .
gets translated into kde-open5 .
barry@barry-laptop:~$ sh -x /usr/bin/xdg-open .
+ check_common_commands .
+ [ 1 -gt 0 ]
+ parm=.
+ shift
+ [ 0 -gt 0 ]
+ [ -z ]
+ unset XDG_UTILS_DEBUG_LEVEL
+ [ 0 -lt 1 ]
+ xdg_redirect_output= > /dev/null 2> /dev/null
+ [ x. != x ]
+ url=
+ [ 1 -gt 0 ]
+ parm=.
+ shift
+ [ -n ]
+ url=.
+ [ 0 -gt 0 ]
+ [ -z . ]
+ detectDE
+ unset GREP_OPTIONS
+ [ -n KDE ]
+ DE=kde
+ [ xkde = x ]
+ [ xkde = x ]
+ [ xkde = x ]
+ [ xkde = xgnome ]
+ [ -f /run/user/1000/flatpak-info ]
+ [ xkde = x ]
+ DEBUG 2 Selected DE kde
+ [ -z ]
+ return 0
+ open_kde .
+ [ -n 5 ]
+ kde-open5 .
grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
WSL Interopability is disabled. Please enable it before using WSL.
grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
[error] WSL Interoperability is disabled. Please enable it before using WSL.
+ [ 0 -eq 0 ]
+ exit_success
+ [ 0 -gt 0 ]
+ exit 0
kde-open5
is a symbolic link to kde-open
barry@barry-laptop:~$ which kde-open5
/usr/bin/kde-open5
barry@barry-laptop:~$ ls -alh /usr/bin/kde-open5
lrwxrwxrwx 1 root root 8 May 5 12:56 /usr/bin/kde-open5 -> kde-open
barry@barry-laptop:~$ which kde-open
/usr/bin/kde-open
barry@barry-laptop:~$ ls -alh /usr/bin/kde-open
-rwxr-xr-x 1 root root 39K Mar 30 02:19 /usr/bin/kde-open
kde-open
is binary file and not viewable via VIM. Unclear how to configure the relationships between the file type and the application since it does not honor mime types.