Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-05-28 09:10:23

lacsaP
Member
Registered: 2024-05-28
Posts: 3

thunar : mime type vs file content

hi,

I'd like to change `thunar` default behavior.

I have a folder that contains images detected with the `file` and `exiftool` tools.

some files, which are real images, have unexpected/unusual extensions like `.dll` or `.zip` (obscured images) :
how can I tell `thunar` to ignore the filename extension and focus only on the file content ?

wouldn't this happen at the `shared-mime-info` level rather than at the `thunar` level ?

I can't change/reset the extension ;-)

regards, lacsaP.

Offline

#2 2024-05-28 10:44:59

eriefisher
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 540

Re: thunar : mime type vs file content

Thunar doesn't open images or any file for that matter. That is left to the default program or the one you set and determined by the "shared-mime-info". Thunar is just a file manager.


Siduction
Debian Sid
Xfce 4.18

Offline

#3 2024-05-31 14:40:39

lacsaP
Member
Registered: 2024-05-28
Posts: 3

Re: thunar : mime type vs file content

hi,

I clarify what I mean by “default behavior” :
1 - `image.zip` is not displayed in `thunar` as an image (with its preview thumbnail) but as an archive (with archive/package icon)
2 - when I double-click on `image.zip`, `thunar` launches my archive manager `engrampa` rather than my image viewer `viewnior`.
I'd like `thunar` to ignore the `.zip` extension, see that it's really an image, generate a thumbnail and finally launch `viewnior`.

I've looked around a bit and it works as I thought it would on the `shared-mime-info` side :
when I edit the `/usr/share/mime/packages/freedesktop.org.xml` file delivered by the package and change the global properties `priority` and `weight` to 90 and 10 respectively (instead of the default 50 50) then I get what I want.

what I'd like now is to limit this "priority/weight" treatment to a part of the tree, to a particular folder...
it seems that the `treemagic` element is intended for this but I haven't managed to implement it yet...

regards, lacsaP.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] CCBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 523.84 KiB (Peak: 532.09 KiB) ]