Questions tagged [mime-types]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
3answers
44 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/...
1
vote
1answer
51 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 ...
2
votes
1answer
71 views

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

Where is /usr/share/applications/defaults.list on Arch?
0
votes
0answers
20 views

KDE plasma 5: Prevent file association

I have a misbehaving application (Blender). As I interact with it, it insists on opening a *.dot file with an external application (Kate). Putting aside that this is a bug in the first application, ...
0
votes
1answer
5 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 ...
0
votes
0answers
35 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 ...
1
vote
1answer
104 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 ...
3
votes
2answers
194 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 ...
0
votes
0answers
81 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/...
0
votes
1answer
31 views

How reclaim pdf file type from FoxitReader?

I installed FoxitReader. Now when I look at the detailed listing in my file browser (Thunar), it displays the filetype of any pdf as 'FoxitReader document'. How do I get it to display simply as PDF?
0
votes
1answer
38 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
26 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
274 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-...
-1
votes
1answer
478 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
2answers
222 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
14 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 ...
2
votes
2answers
130 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
427 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
70 views

How to ensure the text file will be read as Markdown file by an external user?

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 of .md file ...
1
vote
0answers
78 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 ...
3
votes
1answer
230 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 ...
3
votes
2answers
659 views

How can I set default application for unknown file on xdg-open / mimeopen?

On my Lubuntu (18.10), xdg-open launches VLC Player when the file is not associated to any applications. $ xdg-mime query filetype jquery.js application/javascript $ xdg-mime query default ...
5
votes
0answers
481 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
395 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
165 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
109 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
493 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
542 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
230 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
254 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 ...
2
votes
1answer
156 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
3k 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
188 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
469 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
433 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
554 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 ...
1
vote
2answers
836 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 ...
1
vote
2answers
302 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
546 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 ...
3
votes
0answers
160 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 ...
6
votes
1answer
3k 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
502 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
50 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
532 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
892 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
121 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
42 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
76 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 ...