首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >‘`xdg open`认为我在运行WSL,但由于没有运行而失败了?

‘`xdg open`认为我在运行WSL,但由于没有运行而失败了?
EN

Ask Ubuntu用户
提问于 2023-03-02 22:08:54
回答 1查看 140关注 0票数 0

当我尝试用xdg-open file.pdf打开一个pdf文件时,我会收到以下错误消息:

代码语言:javascript
复制
jonas@jonas-thinkpad:~$ xdg-open file.pdf 
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.
jonas@jonas-thinkpad:~$ /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.

出于某种原因,它试图做WSL的诡计?因为我不使用Windows,所以我真的不明白为什么会发生这种情况。xdg似乎被配置为使用okular打开pdf文件:

代码语言:javascript
复制
jonas@jonas-thinkpad:~$ xdg-mime query default application/pdf
okularApplication_pdf.desktop

这就是okularApplication_pdf.desktop的样子:

代码语言:javascript
复制
[Desktop Entry]
MimeType=application/pdf;application/x-gzpdf;application/x-bzpdf;application/x-wwf;
Terminal=false
Name=Okular
Name[ar]=اوكلار
Name[az]=Okular
--- omitted languages ---
Name[zh_TW]=文件檢視_Okular
GenericName=Document Viewer
GenericName[ar]=عارض المستندات
--- omitted languages ---
GenericName[zh_TW]=文件檢視器
Comment=Universal document viewer
Comment[ar]=عارض المستندات عالمي
--- omitted languages ---
Comment[zh_TW]=通用文件檢視器
Exec=okular %U
Icon=okular
Type=Application
InitialPreference=8
Categories=Qt;KDE;Graphics;Viewer;
X-KDE-Keywords=PDF, Portable Document Format
X-KDE-Keywords[ar]=PDF, Portable Document Format
--- omitted languages ---
X-KDE-Keywords[zh_TW]=PDF, Portable Document Format
NoDisplay=true

在我看来完全没问题。有线索吗这是怎么回事?

EN

回答 1

Ask Ubuntu用户

发布于 2023-03-02 22:11:55

和往常一样,在问完问题不到5分钟后,我找到了答案:出于某种神秘的原因,我安装了包wslu。一个简单的

代码语言:javascript
复制
sudo apt remove wslu

解决了错误。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1457464

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档