Score:1

`xdg-open` thinks I'm running WSL, and fails because I'm not?

gb flag

When I try to open a pdf file with xdg-open file.pdf, I get the following error message:

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.

For some reason it tries to do WSL shenannigans? As I don't use Windows, I really don't understand why this happens. xdg seems to be configured to open pdf files with okular:

jonas@jonas-thinkpad:~$ xdg-mime query default application/pdf
okularApplication_pdf.desktop

And this is what okularApplication_pdf.desktop looks like:

[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

Looks totally fine to me. Any clue what is going on here?

Score:0
gb flag

As always, less than 5 minutes after asking the question I find the answer: For some mysterious reason, I had the package wslu installed. A simple

sudo apt remove wslu

resolved the error.

NotTheDr01ds avatar
vn flag
Good find - Glad you caught this fairly quickly ;-). Did you by any chance have `gimp-help-en` installed as in the other answer I linked? Or do you think `wslu` got installed as a different dependency? Regardless, it's a bug (and someone needs to report it at some point for any package which erroneously includes `wslu` as a dependency.
gb flag
@NotTheDr01ds I don't think I installed anything gimp-related, not consciously anyway. When I removed `wslu` it didn't appear to have anything dependent on it. Though I had some trouble earlier with an unintentional `texlive` install I didn't want, not sure if that is related. Just guessing.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.