TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: R.WIESER
date: 2019-11-04 10:11:00
subject: file -i vs xdg-mime query

Hello all,

Just now I set a python script to be executable and added a "hashbang" line
to indicate its target program (#!/usr/bin/env python3).   As a result it
lost the filetype icon I had previously set for python script files.

The thing is that checking the mimetype using "file -i" showed that script
files with and without the python icon showed the same one :
"text/x-python".   As such they /should/ have shown the same icon ...

A few googles later I came across this command "xdg-mime query filetype"
which showed a different mimetype (a result which turned out the one I
needed to use in a icon-for-mimetype .xml file)

The question is: what is the purposes of "file -i" and "xdg-mime query
filetype" returning different results ?   Or, in other words: what are they
aimed at ?

Regards,
Rudy Wieser

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.