我见过相关的问题,但没有人能回答我的问题。我之所以这样问是因为,每当我从命令行调用xdg时,我都会得到以下错误,指示我启用WSL互操作性。我试着打开一个PNG文件和一个PDF文件。两个人都给了我同样的信息。
我在Ubuntu 22.04。
$ xdg-open IMG_20220629_131736841.jpg
$ 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.
发布于 2023-02-02 06:22:48
在Kubuntu22.04上运行以下命令,新升级的等离子体版本为5.25.5:
sudo apt purge wslu
发布于 2022-09-26 08:26:16
删除文件/usr/share/applications/wslview.desktop
。
我也在一个新的Ubuntu22.04.1LTS发行版上点击了这个版本。
我删除了文件/usr/share/applications/wslview.desktop
和xdg-open
开始按预期工作。
我不知道到底发生了什么,但wslview.desktop
启动程序似乎是为了在Windows中使用Ubuntu。但出于某种原因,每次xdg-open
调用都会启动它。当它被删除时,xdg-open
将使用另一个与该URL相关联的启动程序,即正确的一个。
https://askubuntu.com/questions/1422920
复制相似问题