Questions tagged [mime-types]
The mime-types tag has no usage guidance.
179
questions
0
votes
1
answer
16
views
Is it bad that I changed the default application of application/x-trash files?
I was trying to use the mimeopen command to open an image file. I ended up being asked to pick the default application of application/x-trash. I was practicing python and thought I should press ...
0
votes
1
answer
36
views
Listing mime-type for each input file
I want to pass a set of file names to a bash function, and list the mime-type as follows.
video/mp4 file.mp4
video/mkv file.mkv
Here is the loop iterating each file
for fl in "$@"; do
...
0
votes
1
answer
37
views
File is not readable when script is called by cron
This really has me scratching my head. I have a PERL script on a RHEL 7 server that creates an xlsx file via MIME::Lite and emails it to several people. If I run the script from the command line it ...
2
votes
1
answer
48
views
Most thorough way to determine the user-perspective "type" of a file in Linux?
I am looking (in a file-manager sort of application) to provide the most pertinent natural-language description of what kind of a file each file in a directory is. There seem to be several command-...
0
votes
1
answer
100
views
Why I do get text/plain and text/x-java for two different js files?
I use /usr/bin/file -i file_path to get information about my files.
I have a simple website project, in which I have a couple of js files.
When I use /usr/bin/file -i file_name.js for some of them, I ...
1
vote
0
answers
462
views
How to set the default application to open folders?
I'm really stuck;
I want to add Open with vs code to the folders context menu following the same approach as for files by means of the so-called MIME; editing the file ~/.config/mimeapps.list allows ...
3
votes
1
answer
383
views
wrong filetype for extension
I have some octave files, ending with the default .m extension.
In file, I am getting it as ASCII text:
file euler.m
euler.m: ASCII text
and plain text icon in nautilus.
How I can assign .m ...
0
votes
0
answers
35
views
Override MIME type by requesting application/executable?
I'm using XFCE4 and have to use Microsoft Teams for work.
Is there a way for me to tell XFCE4, "If Microsoft Teams comes asking, tell it that my default browser (for x-scheme-handler/http, etc.) ...
0
votes
0
answers
171
views
How can I use Nemo for `Save As`, `Open` etc. Instead of Nautilus
I am using Zorin which Use Gnome and based on Ubuntu.
I have replaced nautilus with nemo using:
sudo apt install nemo
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
...
1
vote
0
answers
47
views
How to stop Zoom from stealing URI associations when installing with FlatPak?
Ever since installing Zoom Flatpak I've noticed that many web-links (like telephone numbers) that should not be associated to ZOOM are now being opened by ZOOM. I'd like to maintain Zoom assocition ...
0
votes
0
answers
39
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 ...
2
votes
0
answers
36
views
Are there different formats for Mathematica Notebooks and how are MIME types defined in them?
I use Mathematica 12.3 on Xubuntu 20.4. The computer runs with German localization.
I wondered, why one of my notebooks is displayed with the icon usually used for LibreOfficeWriter documents. In the ...
2
votes
1
answer
345
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.
2
votes
1
answer
123
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 ...
0
votes
1
answer
264
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 ...
1
vote
1
answer
114
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-...
2
votes
2
answers
342
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 ...
1
vote
2
answers
90
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 ...
1
vote
1
answer
300
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 ...
3
votes
2
answers
174
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" ]]...
0
votes
0
answers
131
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 ...
0
votes
1
answer
86
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.
0
votes
2
answers
74
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 ...
0
votes
1
answer
224
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.
...
0
votes
1
answer
442
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 ...
0
votes
0
answers
326
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-...
0
votes
0
answers
229
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 ...
3
votes
1
answer
680
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 ...
0
votes
2
answers
3k
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 ...
1
vote
0
answers
265
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 ...
3
votes
1
answer
595
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 ...
1
vote
1
answer
29
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 ...
0
votes
1
answer
1k
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 ...
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: ...
0
votes
1
answer
119
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 --...
2
votes
0
answers
104
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&...
2
votes
0
answers
78
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/...
1
vote
1
answer
274
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 (...
1
vote
1
answer
1k
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 ...
4
votes
1
answer
761
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 '...
3
votes
1
answer
1k
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-...
0
votes
0
answers
253
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 ...
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-...
2
votes
1
answer
647
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'...
8
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 ...
2
votes
1
answer
240
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, ...
14
votes
1
answer
4k
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 ...
4
votes
1
answer
3k
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 ...
4
votes
1
answer
2k
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 ...
1
vote
5
answers
980
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/...