You are not logged in.

#1 2021-07-30 08:21:44

art
Member
Registered: 2019-08-12
Posts: 63

[SOLVED] make xdg-open to use FBReader as a default app for *.fb2

Hello, how to make xdg-open to use FBReader as a default app for *.fb2 files?

❯ uname -a
Linux ... 5.12.15-arch1-1 #1 SMP PREEMPT Wed, 07 Jul 2021 23:35:29 +0000 x86_64 GNU/Linux

❯ xdg-mime query filetype MYFBFILE.fb2
text/xml

❯ xdg-mime query default text/xml
chromium.desktop

I also has xfce4-mime-settings. But setting there FBReader for application/x-zip-compressed-fb2 mime type makes no effect for xdg-open.

Reading https://wiki.archlinux.org/title/XDG_MIME_Applications makes it not clear. Looks like I need to install this mime type using some xml file?

Last edited by art (2021-07-30 12:33:11)

Offline

#2 2021-07-30 10:27:44

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,310

Re: [SOLVED] make xdg-open to use FBReader as a default app for *.fb2

It does look like https://en.wikipedia.org/wiki/FictionBook uses an xml file , so xdg-mime is correct.


art wrote:

I also has xfce4-mime-settings. But setting there FBReader for application/x-zip-compressed-fb2 mime type makes no effect for xdg-open

Output of xdg-mime query default application/x-zip-compressed-fb2 ?
If empty try adding the format directly to ~/.config/mimeapps.lst

for the non-compressed FB2 files try

xdg-mime default FBReader.desktop text/xml

Edit : test ≠ text , corrected

Last edited by Lone_Wolf (2021-07-30 12:19:50)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2021-07-30 10:52:40

art
Member
Registered: 2019-08-12
Posts: 63

Re: [SOLVED] make xdg-open to use FBReader as a default app for *.fb2

Lone_Wolf wrote:
xdg-mime default FBReader.desktop test/xml

Thanks! It worked. Next time will check if mime type is correctly determined

Offline

#4 2021-07-30 12:00:51

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] make xdg-open to use FBReader as a default app for *.fb2

Please remember to mark your thread [SOLVED] (edit the title of your first post).

Offline

Board footer

Powered by FluxBB