我看到了相关的问题,但没有一个能回答我的问题。我问这个问题是因为每当我从命令行调用xdg-open时,都会出现以下错误提示我启用WSL互操作性。我尝试打开一个PNG文件和一个PDF文件。两者都给我显示相同的消息。
我使用的是Ubuntu 22.04。
我使用的是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.
xdg-open
吗?而不是xdg-open-wsl
?你在WSL2中有桌面吗? - Rinzwindwslu
软件包(在22.04版本中需要PPA),是可以的。这不是我自己进行过多实验的事情,但显然安装wslu
软件包会将wslview
注册为xdg-open
的处理程序。 - NotTheDr01ds/etc/wsl.conf
中明确关闭它。然而,Systemd启用的脚本经常会干扰Interop。您是否使用任何方法尝试在WSL下运行Ubuntu中的Systemd? - NotTheDr01ds@
符号,所以我没有收到通知 :-(。如果是这样的话,我会看到你实际上并没有运行WSL本身。在这种情况下,这个很可能是同样的问题。一些Ubuntu软件包(至少gimp-help-en
)错误地将wslu
作为依赖项,即使在非WSL系统上也是如此。只需运行sudo apt purge wslu
应该就可以解决问题了。 - NotTheDr01dsgimp-help-en
包的一个不幸的错误,而不是 Ubuntu 本身的问题。但我可以理解您因为无法解决的错误而需要转换系统的需求。记得在回复时在名字前面加上@
标签。如果我六周前看到了,我可能会给您提供(很可能的)解决方案。 - NotTheDr01ds