Questions tagged [mime-types]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

xdg-mime query filetype does not give file type even with exist code 0

I am using manjaro kde with i3wm. When i am executing the command xdg-mime query filetype <file-type> it does not show anything. But when i am checking the exit code it is 0. Also when i am ...
user avatar
2 votes
0 answers
19 views

Are there different formats for Mathematica Notebooks and how are MIME types defined in them?

Note: I already posed this question on https://mathematica.stackexchange.com/questions/263673/are-there-different-formats-for-mathematica-notebooks-and-how-are-mime-types-def, but I did not receive an ...
user avatar
0 votes
0 answers
6 views

Disallow some attachment types when sending messages with mutt

I am writing emails to certain domains that are (mis)configured to silently discard certain attachment types (e.g., Word files with macros). As a workaround, to avoid forgetting this, I'd like to ...
user avatar
  • 8,388
2 votes
0 answers
33 views

Custom mime type for directories

Is it possible to make a custom mime type for directories (inode/directory)? Just like what MacOS does with *.app folders (app bundle) which make it possible to open them in another program.
user avatar
  • 21
2 votes
1 answer
41 views

Linux setting of the program that opens a file clicked in Firefox downloads list?

Asking this question I thought I knew what this was about. That question was asking how to prevent Firefox from making files listed in its downloads list be opened with wrong programs. I still want to ...
user avatar
  • 968
0 votes
1 answer
48 views

Failing to associate an icon to a custom MIME type

I'm failing to add a custom icon to a custom MIME type file. I don't know what I'm doing wrong, I've followed several tutorials in here and on other websites. First I created a xml file called org.xml ...
user avatar
  • 243
0 votes
0 answers
10 views

How to find files of a given mime type? [duplicate]

find has various options for finding files of a certain extension type. However, what if I want to find files of a certain MIME type? For example, I want to find all files on my computer that are ...
user avatar
  • 674
1 vote
1 answer
44 views

How can I use a prefix in the <glob> element of a mime info file?

I have a bunch of files in the form of xyz-timestamp.log, which I want to associate with a different application, than normal log files. I read up on mime types and found out, that I can add a mime-...
user avatar
  • 5,227
2 votes
2 answers
175 views

What is an effective way to automatically append file extensions to extensionless files?

I wrote a bash script today during my lunch break that finds extensionless files in a directory and appends a file extension to those files. The script is relatively long because I added a bunch of ...
user avatar
1 vote
2 answers
70 views

Reason for text/plain pattern "*,v" in shared-mime-info?

The freedesktop.org media type database shared-mime-info has a filename pattern *,v associated with MIME type text/plain, and I can't figure out why - if only because ,v and *,v are basically useless ...
user avatar
0 votes
1 answer
91 views

How do I set priority of which application opens a url schema (rdp://) in kde?

I have several applications installed that handles url schema rdp:// (for example, rdp://myadmin@1.2.3.4). These applications are Krdc and Remmina. I want such links to be opened in krdc, but they are ...
user avatar
  • 382
3 votes
2 answers
93 views

File Provides Different Mime-types on Different Operating Systems

So I have a bash script that in part does the following: file -b --mime-type "$1" I then have logic to check if it is the expected type of file. if [[ $type == "application/gzip" ]]...
user avatar
0 votes
0 answers
56 views

How to add a command-line argument for mime-type default applications in KDE?

I want to register a software (XCrysDen) to a number of file type as the default application (that opens when I click the file). The thing is, the software needs a specific command-line option for ...
user avatar
  • 220
0 votes
0 answers
68 views

Sending HTML with Mutt mangles the reply history badly; How can I make replies survive a call to Pandoc?

In mutt, I'm trying to write formatted emails, but the pre-processing step that converts markdown to HTML is mangling the previous messages. I'm using this answer to convert my messages to HTML. In ...
user avatar
0 votes
1 answer
40 views

show "detailed type" instead of "type" as default in nemo

I would like to differ between SVG, JPEG, PNG images in a folder. It is anoying to always change it, so I want to set "detailed type" instead of "type" as default.
user avatar
0 votes
2 answers
52 views

Sorry mime the second (mate-control-center vs. firefox)

My OS is Debian stretch (mate Desktop) Since about 2 years I have a problem with default setting for application browser(in mate-control-center) and firefox. whenever I let firefox set itselfs as ...
user avatar
  • 144
0 votes
1 answer
107 views

messed up systemwide mime data base

In debian stretch (mate desktop) i messed up systemwide my mime data base. How can I restore it. Note I renamed first my /usr/share/mime/mimeinfo.cache. but the Problem is, I think it is broken. ...
user avatar
  • 144
0 votes
1 answer
231 views

Make Firefox open app without first prompting to choose from window with one choice

No posted answer in StackExchange worked: they are years-old and pertain to very old versions of Firefox. EDIT: At first I posted about opening files from the downloads list. I later discovered I get ...
user avatar
  • 101
0 votes
0 answers
46 views

xdg-mime not doing anything

Created an empty file in ~ called test.desktop. Ran xdg-mime default test.desktop inode/directory, which returned success (returned 0). After this, xdg-mime query default inode/directory returned caja-...
user avatar
0 votes
0 answers
54 views

How to properly use mailx to attach a file (not replace content)?

I am using $ mailx -V mailx (GNU Mailutils) 3.5 Copyright (C) 2007-2017 Free Software Foundation, inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free ...
user avatar
  • 136
3 votes
1 answer
419 views

How to set all youtube links to open in mpv

I would like to set my system to open all links is mpv as default ie. I click link to youtube video in IRC, mumble, discord, signal etc. it opens in mpv. I have read through xdg-open and xdg-mime but ...
user avatar
0 votes
2 answers
2k views

Getting MP4 to play in Firefox in OpenSuse

I'm not sure since when, but MP4 videos are not playable anymore on Firefox. There's an error message in the Web-Console saying HTTP-Content-Type "video/mp4" is not supported. OS: OpenSuse ...
user avatar
1 vote
0 answers
171 views

xdg-scheme-handler doesn't open script with same terminal that launching it from a desktop menu does

I'm trying to set a x-scheme-handler URI for my python application. This application is launched via a shell script in /usr/bin. I've had a desktop file for a while, and it's worked fine, opening the ...
user avatar
  • 111
3 votes
1 answer
375 views

How to register new mimetypes not available in xfce4-mime-settings so that they are recognized with xdg-open under XFCE4?

I am trying to register new mimetypes under XFCE4. In particular, I would like to register the protocol zoommtg so I can launch Zoom meetings from links in the webbrowser Chrome. Chrome will launch ...
user avatar
  • 133
1 vote
1 answer
19 views

The most common commenting marks and mimetypes

I'd like to write a shell script to optionally view files without comments (which sometimes take a lot of space so that it becomes difficult to see the lines active in a config file, etc.) and this ...
user avatar
  • 419
0 votes
1 answer
695 views

Executable binaries labelled as shared library files

After compiling software from source code, I can usually launch the compiled binary by double-clicking on it. Recently however, most of my compiled binaries are not responding to double-click, even if ...
user avatar
  • 155
10 votes
4 answers
1k views

Removing files based on MIME types in linux

I'm quite a beginner to Linux and I'm having trouble removing files based on the mime type. Currently, I have a set of files on my Linux machine, and below are the types for a small subset. 0FiTahKc: ...
user avatar
  • 101
0 votes
1 answer
95 views

help debugging thumbnailer script in nemo

I recently installed 'stl-thumb' as a thumbnailer plugin to the file managers, but I notice that it isn't converting all files with the .stl extension. Upon closer inspection using the shell 'file --...
user avatar
  • 131
2 votes
0 answers
54 views

Is it possible to require both glob and magic specified in mimetype definition?

Given the following freedesktop shared-mime-info file: <?xml version="1.0" encoding="UTF-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info&...
user avatar
2 votes
0 answers
52 views

Is it possible to use unicode character within glob pattern in mime definition file?

I'm issuing the command xdg-mime install nv-custom.xml - using this file: <?xml version="1.0" encoding="UTF-8"?> <mime-info xmlns="http://www.freedesktop.org/...
user avatar
1 vote
1 answer
119 views

Where does xdg-mime save its per-user default app settings?

Where does xdg-mime save the settings I make with commands which set the default app to handle MIME types? i.e. commands such as: xdg-mime default evince.desktop application/pdf ? I'm using SLES (...
user avatar
  • 7,249
1 vote
1 answer
760 views

How to set MIME priority for applications?

Image types (e.g. image/jpeg, image/png etc.) are widely supported by ImageMagick and Eye of GNOME, so the only way I see to set priority for EOG is to check it's supported formats in .desktop and ...
user avatar
  • 140
4 votes
1 answer
500 views

Debian Buster XFCE: make PCManFM default, including for Open a Directory, as in Chromium - downloads - show in folder

Using Debian Buster XFCE. XFCE is married to Thunar, so cannot remove thunar. I would prefer Chromium (or any other app that might choose to open a directory), as when viewing Downloads and clicking '...
user avatar
3 votes
1 answer
790 views

Assign an icon to a custom mimetype

I tried to create a custom mimetype (text/graphml+xml) by creating the file ~/.local/share/mime/packages/graphml+xml-mime.xml with this content: <?xml version="1.0" encoding="UTF-8"?> <mime-...
user avatar
  • 111
0 votes
0 answers
171 views

Cannot make xdg-mime query return chosen browser

After maybe one year of using Chromium as the default browser, my Linux switched spontaneously to using Firefox (probably because of some updates). I want to switch back. Based on this answer, I ...
user avatar
  • 4,731
3 votes
1 answer
2k views

How to associate a new (custom) mime type with files (based on file extension)?

This is part 2 of How to install a new (custom) mime type on my Linux system using CLI tools? Using the steps in the accepted answer at the above question, I created the following mime-type mx-...
user avatar
  • 15.4k
2 votes
1 answer
537 views

Click link to download a file, but KDE tries to open it with an application. How to download instead?

I'm running Riot.im (an Electron desktop app) in KDE (on Arch Linux). For many file types, when I click a link to download the file in Riot, the file is downloaded as expected. I am presented with KDE'...
user avatar
  • 15.4k
5 votes
3 answers
2k views

KDE is not saving a mime-type file association

I'm running Arch Linux and KDE and I am exploring how mime-types are behaving (and misbehaving) on my system. Consider this mime-type file association. The following console output shows that I have ...
user avatar
  • 15.4k
2 votes
1 answer
112 views

Digging deeper into differing mime-type associations

I would like to gain a deeper understanding of mime-types. So far I understand the following thanks to @munzir-taha It is normal to have different mime-type file associations on different systems, ...
user avatar
  • 15.4k
13 votes
1 answer
3k views

How to install a new (custom) mime type on my Linux system using CLI tools?

I would like know the full steps to create and register a new custom mime type on my system. If it matters, I am running KDE on Arch Linux. The steps should include writing the XML file and ...
user avatar
  • 15.4k
4 votes
1 answer
2k views

How to completely remove a mime association from my Linux system using the CLI tools?

I'm running Arch Linux and KDE. I have installed Arch KDE on several devices and in the usual case there is no specific mime-type association for .pub files (which are public keys in my case). They ...
user avatar
  • 15.4k
2 votes
1 answer
1k views

What is the purpose of mime.cache files?

What is the purpose of the mime.cache files on an Arch Linux KDE desktop system? The Arch Wiki discusses mimeapps.list files, but does not mention mime.cache. On my system, there is only one ...
user avatar
  • 15.4k
1 vote
5 answers
584 views

XDG_DATA_DIRS contains duplicate paths; How to fix?

I'm running Arch Linux and KDE and curious to learn about mime type file associations. While investigating my system I noticed this issue: $ echo $XDG_DATA_DIRS /usr/share:/usr/share:/usr/local/...
user avatar
  • 15.4k
6 votes
1 answer
2k views

What is the procedure to update mime type associations in KDE?

I would like to revert to the default mime definitions at the system level, and also rebuild my local mime database. I am running Arch Linux KDE. The Arch Wiki says, If you use a desktop ...
user avatar
  • 15.4k
5 votes
1 answer
533 views

Where is /usr/share/applications/defaults.list on Arch?

Where is /usr/share/applications/defaults.list on Arch?
user avatar
  • 15.4k
0 votes
1 answer
19 views

how to change k4dirstat folder browsing action?

Changing the cleanup action "Open a file browser" directly on the settings won't be saved. So, ~/.config/k4dirstatrc will not store anything about cleanup actions (not implemented?). So, on next run ...
user avatar
0 votes
0 answers
48 views

Text files open with pdf reader instead of Sublime

I have Ubuntu 16.04. For some reason, the way text files were opened changed a few days ago. Before, all of them opened with Sublime. Now, they open with a pdf reader. Text files have "Python File (no ...
user avatar
1 vote
1 answer
485 views

MIME type text/html: how & where defined?

I've asked a related question on AskUbuntu (How to open *.htm differently than *.html?) with no interest yet, so I'm addressing the same issue with a more fundamental question. I cannot find how and ...
user avatar
  • 21
4 votes
2 answers
1k views

How do I add a new mime type for file -i?

On our server, we have some issues with mime types. I need to add the mime type for Microsoft Publisher files, so that file -b -i theFile.pub prints application/x-mspublisher to the command line. I ...
user avatar
3 votes
0 answers
358 views

Automatic generation of mimeapps.list database

In a previous question I enquired about manually setting default applications for different mime types. Other than use tools one among several tools, it boiled down to add an entry to ~/.config/...
user avatar
  • 1,173