The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
3k views

How can I get the error code (exit code) of “xdg-mime query filetype” command?

I ran xdg-mime query filetype <file name> to check the MIME type of a file, and it failed. How can I print the error code (exit code) of the xdg-mime command? I want to know what error ...
2
votes
2answers
1k views

Why does `xdg-mime query filetype …` fail to find a new added file type?

I installed a new file type to share MIME database. But xdg-mime query filetype cannot tell the new type. This problem only happens on my own Linux OS which does not use GNOME or KDE as its desktop. ...
2
votes
1answer
364 views

How is MIME type “text/html” registered to shared-mime-info? Where is its *.xml file?

On Ubuntu 10.10, which XML file under the directory /usr/share/mime/applications is for MIME type text/html? I checked xml.xml and xhtml+xml.xml, but neither has a glob pattern of *.html. So where is ...
3
votes
5answers
3k views

Script to list only files of type ASCII text in the current directory?

How to write a shell script which searches the current UNIX directory and returns the names of all files of type ASCII text?
3
votes
2answers
354 views

Is there a glibc API that can find the default handing application for a MIME type on linux?

I want to find the default handling application in my C program. Is there a C API with same functionality as xdg-mime query default mime-type on Linux?
2
votes
2answers
212 views

Can shared-mime-info associate a MIME type to a desktop applications?

I can add a new MIME type in shared MIME-info, but how can I associates this MIME type with an application?
3
votes
1answer
618 views

How can I find the application for a MIME type on linux?

Is there a linux API that can find the default application for a MIME type? Then I can use this application to open a file. I can not use xdg-open(url) because the file format is a wrapper format and ...
5
votes
2answers
2k views

Gentoo default application for opening files

On my Gentoo box running without a desktop environment, every time I try to open a file the system tries to open it with Firefox. I understand that without a desktop environment "open file" cannot ...