Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mime-types]

The tag has no usage guidance.

0
votes
1answer
11 views

Remove MIME description from mutt pager

Like described here, mutt displays an indicator in the message pager for the attachments displayed, for example: [-- Attachment #1: Description --] [-- Type: text/plain, Encoding: 7bit, Size: 10000 --...
0
votes
0answers
15 views

Associating new file icon with the mime type

I recently downloaded and installed a new theme for Ubuntu which I'm generally happy with. The only problem is getting the new icons to associate with specific file-types. To take one example, all mp3 ...
3
votes
1answer
105 views

Open a file in the default text editor programmatically

I'm writing a program and I need to implement opening a particular file in a text editor. The file type has a different association by default (it's associated to the program itself), so calling xdg-...
-2
votes
1answer
73 views

Mime type for all files (*.*) Linux?

How to set ALL mime types to open with the same program, like this: xdg-mime default someprogram.desktop */* In a single command, in others words. xdg-mime default <my program> <ALL MIME ...
0
votes
0answers
21 views

Config files for mime settings

I have an Aweseome-wm + xfce system. Where does xfce4-mime-settings stores its values? In particular as regards default apps. The GUI values are different for me from those on ~/.config/mimeapps....
0
votes
0answers
9 views

~/.magic Warning: Current entry does not yet have a description for adding a MIME type

Since I've created a ~/.magic file: 0 string ft=zsh !:mime text/x-shellscript I get the warning: Current entry does not yet have a description for adding a MIME type I've read man 5 magic and I ...
1
vote
0answers
74 views

How does 'Open with' a custom executable in Linux work?

I have a file called foo.txt. I want to associate my own program with the mime-type .txt so that my program opens a terminal and shows the contents of foo.txt as standard output. I would prefer Ruby, ...
0
votes
0answers
112 views

What is the correct way to associate MIME type with applications that have multiple desktop entries?

Description Applications in GUI environments represented by desktop entries (files with the desktop extension) can include a key called MimeType for supported MIME types for that application. Some ...
0
votes
0answers
11 views

Mime Type defined but is not used by newly created files

I saw that mime type is set for md extension in the following file: $ cat /etc/mime.types | grep markdown text/markdown md markdown But, on checking the Mime type ...
1
vote
0answers
34 views

Chrome opens a second Transmission window with magnet links. How does it check if there is a transmission open or not?

The magnet link is correctly set with xdg-mime to open in transmission, and also in .local/share/applications/mimeapps.list. If transmission is NOT running, everything works as expected (click a ...
2
votes
0answers
88 views

How to set Midnight Commander as the default File Manager?

I want graphical applications such as transmission-gtk and Firefox to open up directories with Midnight Commander through new instances of my default terminal emulator running on Debian. I've noticed ...
2
votes
0answers
234 views

How to make xdg-open follow mailcap settings in Debian

tl;dr: In Debian xdg-open (through xdg-mime) does not follow the mailcap specifications used by run-mailcap which I prefer to use. Is there some systematic way to make xdg-open follow the mailcap ...
2
votes
1answer
114 views

Set icon for file type, Linux Mint

I want the files with the extension .api to have some chosen SVG icon in the File Manager. Assume, we have a file: /usr/share/icons/HighContrast/scalable/apps/utilities-terminal.svg I add a new MIME ...
0
votes
1answer
79 views

Ubuntu 18.04 think C/C++ source code file is plain text

When I try to create a C/C++ source file touch test.cpp Usually it will generate a file which type is C source code file. But today I got a plain text file. And I write a simple program in it like: ...
0
votes
5answers
85 views

How to open a file based on the output of the `file` command

So I have a directory where I wish to open the only file in that directory that is human readable. I use file * to print the type of each file, and one file shows as ASCII-text. How can I redirect ...
3
votes
0answers
379 views

wrong mime-type displayed for empty text files

I have tried to install a new mime-type for textfiles with a .w extension as follows: <?xml version="1.0"?> <!-- In file ~/.local/share/mime/packages/w.xml --> <mime-info xmlns='http://...
2
votes
0answers
412 views

Are there mimetype-to-application association files other than those in this list?

Context: I have an Ubuntu/Dolphin misbehaviour where it seems to think *.mkv files are opened with ark. The below screenshot indicates opening the Properties dialog then clicking File Type Options ...
0
votes
1answer
147 views

Clicking on a MIME type execute a script to open file

I want to open jupyter notebooks (.ipynb file) on browser using the command ipython notebook <filename>.ipynb I was thinking if i could tweak my linux such that on double clicking the icon of ...
3
votes
0answers
195 views

Why does xdg-open use Mendeley as default for PDFs?

Similar to this question, I have some applications (Calibre, texdoc) open PDFs with Mendeley. Opening PDFs from Thunar, Thunderbird, Firefox etc. opens evince, the expected default. It seems that ...
1
vote
1answer
74 views

Mime Type Wildcard in Default Application List

I want to have a default application for (almost) all text/* mimetypes. To affect nautilus I'm editing the .local/share/defaults.list. Sadly, using something like text/x-*=vim.desktop, the entry is ...
3
votes
1answer
2k views

How does `curl` on the command line determine the MIME type of a file being uploaded?

When uploading a file as a form field in curl (for example, curl -F 'file=@path/to/file' https://example.org/upload), curl sometimes sets the MIME type differently than what is returned by other ...
0
votes
1answer
124 views

Apper errors and looking strange when opening it via sudo

So I locked my root account for security purposes. It seems that for some reason when apper asks for the root password when installing, deinstalling or updating packages it doesn't make use of the ...
6
votes
1answer
2k views

Chromium on Linux - All downloaded files have .bin extension

This is a strange problem and I can't find any info on it. I'm using chromium-browser on Ubuntu 16.04. Whenever I download a file, no matter what type of file it's meant to be, chromium wants to save ...
2
votes
1answer
358 views

How to extract delimited blocks of text from a file and have munpack decode them?

I am trying to recover the attachments in an email file that was recovered from my harddisk crash. The file is essentially a concatenation of messages, including the attachments in base-64 encoding. ...
0
votes
1answer
329 views

Comments in ~/.config/mimeapps.list

I want to add comments in my ~/.config/mimeapps.list file. How do I do this? Chapter and verse preferred as errors seem to be silently ignored.
1
vote
2answers
366 views

Syntax check ~/.config/mimeapps.list

Is there a way of checking for syntax errors in ~/.config/mimeapps.list? Errors seem to be silently ignored: I added fdsobojaba to the bottom of the file I ran xdg-open on an existing file There was ...
0
votes
2answers
748 views

Arch linux + I3 + URXVT: ROFI opens nano editor in bash instead of URXVT

The bash script that uses ROFI is: xdg-open "$(locate home | rofi threads 0 -dmenu -i -p "locate:")" This works fine from URXVT (command line), but when I bind this to a key and open ROFI, Every ...
2
votes
2answers
160 views

How to rename misnamed files with their appropriate extensions?

I have a folder with the bulk of files in it of different types, i.e .pdf,.jpg,.png,.tiff etc., but all are named with the extension .JPG. How can I rename all of them with their original extensions? ...
1
vote
1answer
2k views

Add new file extension to existing (MIME) type

In Nemo some "twig" files appear with the text icon whilst some appear with a web icon. I want all files with a "twig" extension to appear in Nemo like "html" files e.g. with a web icon. So I edited ...
-1
votes
1answer
358 views

How to make my program launchable with double click from GUI?

I am using Debian Stretch, and pcmanfm-qt as the file manager. Basically I am making a game in C++. Everything is OK, if I run executable from terminal ./launcher. However I cannot run from GUI ...
4
votes
0answers
146 views

Set default program for MIME type: image/*

Is there really no way to set the default program for all MIME sub-types of a top-level type? E.g., image/*. I am talking about the XDG MIME spec, and not the older mailcap scheme. And I'm not asking ...
4
votes
1answer
2k views

Setting default application for filetypes via CLI?

I have 150 Debian Jessie machines that open ODS files in Gnumeric when double-clicked despite LibreOffice Calc being installed. I know it is possible to change this by right-clicking the ODS file and ...
1
vote
0answers
286 views

How can I open a MIME-formatted file?

On several distributions of Linux, there is a utility called xdg-open, which opens a file in the default application for that particular file type. E.g., for HTML files, it might open firefox. A MIME-...
3
votes
1answer
40 views

Mint 18.1 thinks SSL keys are Apple Keynote presentations?

In older versions, files ending in .key were correctly identified as SSL keys and had a bank safe icon and opened with a certificate program. After updating to Mint 18.1, they now have Powerpoint ...
4
votes
2answers
397 views

“xdg-mime query filetype” returning different filetype than “file --mime-type”

I have a bash script that runs to create emails. I do not wish to modify it for now since it is pretty critical in my current project. One command does not run the same on the operational machine and ...
1
vote
1answer
645 views

Changing Firefox's Open Containing Folder action [duplicate]

I've just installed Enlightenment on my Mint desktop and am loving it. But when I download something from Firefox, then click on "open Containing Folder" (in the Firefox download menu) the entire ...
1
vote
0answers
98 views

How are MIME type conflicts handled?

According to Shared MIME-info Database: These files have a mime-type element as the root node. The format is as described above. They are created by merging all the mime-type elements from the ...
1
vote
0answers
39 views

Set default application based on filename not mimetype

I want to define an application for opening files based on the filename. For example I want a file called Gemfile or Dockerfile to be opened with sublime or atom. I know I can use the mime-type but ...
1
vote
0answers
67 views

How to get deluge to open videos using mpv and folders using ranger?

Right now when I right click to open a file under deluge it uses VLC for videos and gwenview as the file system explorer. I'd like to replace those by mpv and ranger respectively (gnome-terminal -e ...
1
vote
0answers
379 views

Universal file association file

I am using multiple desktops / windows managers (KDE, Openbox wm, and i3 wm ) on my PC and I want to establish an unified and universal file where I would set file associations for my whole system. ...
1
vote
0answers
368 views

How to show app icon in 'open with' context menu for custom mimetype in Linux Mint Cinnamon?

I am using Linux Mint 18 Cinnamon 64-bit Following "How to set an icon for custom mimetype in Linux Mint Mate?" I successfully added icons for 3 different custom mime types .wsa, .spy and *.stk and ...
3
votes
1answer
278 views

Can I add the Twig file type to Linux?

I generally give Twig files a "twig" extension. As I understand it these Twig files are usually recognised as HTML like files by Linux using some sort of scan algorithm. So Nemo for example ...
2
votes
2answers
135 views

Firefox download - how to get option to open

When I download a file in Firefox, I sometimes get an option to open or save the file, and once set, the default app to use to open the file stays set. But other filetypes only show a save option, ...
3
votes
2answers
112 views

Firefox opens *.bz2 in GIMP

Firefox tries to open downloaded *.bz2 archives in GIMP even though both xdg-open and nautilus open it with file-roller as intended. This only happens when clicking on the downward arrow next to the ...
2
votes
1answer
468 views

Where mimeopen saves default app config?

I associated pdf with Okular using mimeopen. Then I became curious where it had saved the configuration. My first guess was: $HOME/.config/mimeapps.list but it didn't contain the right entry. So I ...
2
votes
0answers
604 views

MIME type changes if file edited in *nix systems

I have an excel file created in Windows machine. If I check MIME type with file -b --mime users.xlsx the result is application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=binary ...
1
vote
0answers
478 views

Configure nautilus icon for new mime type

How does nautilus find the icon for a given mimetype? I have just registered a new mimetype for Umlet on my system. Additionally I added an icon with using: xdg-icon-resource install --novendor --...
1
vote
0answers
51 views

MIME RSA encryption

i have this scheme how can i use session-key in MIME to encrypt the message? i used this command but i don't think it is correct openssl enc -e -des3 -salt -in MSg_sign.txt -out session.txt can ...
0
votes
1answer
231 views

XDG resolves filename as text/plain

I have a MIME definition file which is installed as part of a package: $ rpm -ql virt-viewer | grep mime /usr/share/mime/packages/virt-viewer-mime.xml $ cat /usr/share/mime/packages/virt-viewer-mime....
0
votes
1answer
175 views

Easy Way to Wrap CRON Output in HTML PRE?

I use Gmail and every so often I have to hack it back in that text/plain email should be rendered in a monospace font. This makes it much easier to skim system-generated reports, &c. The problems ...