Questions tagged [mime-type]

MIME type is a standard way that computers use to refer to the file-type/format

Filter by
Sorted by
Tagged with
3
votes
1answer
55 views

How to set default application based on file extension, not mime type?

I have files with extensions .txt, .sln and .csproj, they all have mime type text/plain. But they should be opened by different programs. .txt - by Vim, .sln and .csproj - by Rider. How can I achieve ...
2
votes
0answers
29 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-...
3
votes
0answers
40 views

How to set the Preferred applications on Ubuntu MATE 20.04, for a given user?

On Ubuntu MATE 18.04, I could add and set preferred applications, for a given user, this way: # Create an application entry cat > ~/.local/share/applications/browser.desktop << EOF [Desktop ...
2
votes
0answers
33 views

No files will open from Nautilus

Whenever I double-click a file in Nautilus it does not open. See below screenshots for .pdf and .png files. It does show the icon for document viewer for the .pdf file, but it still displays the ...
0
votes
1answer
65 views

How “file --mime-type path” works for a file wich has no extension

To find a files mime type which we don't know we will use file command with --mime-type argument. We know it is showing results based on given file paths extension(such like text/x-python for *.py). ...
0
votes
0answers
13 views

Modifying mime types through the nautilus interface

Looking at the fora, I see that the way to modify/introduce new mime types requires to edit files by hand. I seem to remember that there was an interface for this before. I wanted to add a mime type ...
0
votes
1answer
36 views

Firefox opens clean window from application

When I open a link from another application, like Slack or an IDE, Firefox opens a new window without any of my extensions installed or enabled. It also does this when there is a Firefox window ...
0
votes
1answer
38 views

Forcing gedit to recognize .kv files

On Ubuntu, the language that defines syntax highlighting for kivy layout files is installed by default (or added automatically when installing kivy). The problem is, in gedit, I have to manually ...
2
votes
0answers
93 views

How to change the type “text/plain” in non .txt files

I have Ubuntu 18.04 I have a program called "transcribe!" (software to reproduce and modify audio) that can open .xsc files. When I make the association of the file type .xsc to Transcribe (...
0
votes
1answer
46 views

How to open a file with a determined application even when the type is opened by default by another application?

Context Okular is a PDF reader with support to annotations, bookmarks, etc. When I want to save the PDF with the annotations and bookmarks embedded, Okular saves a application/zip file. When I open ...
0
votes
1answer
146 views

Escaping spaces in .desktop file Exec line with “bash -c”

I have a desktop file for a GTK application that I have created which has the following structure: [Desktop Entry] Version=1.0 Name=My GTK Application Comment=Desktop File Exec=bash -c 'sudo taskset -...
2
votes
1answer
335 views

VS Code open directory instead of system file manager in Ubuntu 19.10

After upgraded to Ubuntu 19.10 I notice a stranger behaviour in code: if I double click a directory or a unit or right click a directory and try open the directory was open by code unless nemo or ...
3
votes
2answers
601 views

How to change all file associations (MIME-types) of one particular application in KDE?

I have installed a closed source office suite called Freeoffice. Generally, I use Libreoffice for all my work and need Freeoffice only as a backup to check if there are any inconsistencies in ...
1
vote
0answers
99 views

Associate custom icon to file extension

Problem: show custom icon for files with *.xyz extension (to be used in deb package) Adopted solution 0) Install a fresh ubuntu 19.04 on virtualbox 1) Create a new icon (xyz.svg and xyz.png 48x48) ...
3
votes
1answer
229 views

Why does “MimeType=text/x-shellscript;” not work in this .desktop file?

OS: Kubuntu 18.04 The default file manager, dolphin, has the facility to use Service Menus, somewhat like Custom Actions in thunar and pcmanfm or Nautilus Actions. Quoting from here: In KDE-...
2
votes
1answer
124 views

How to open *.htm differently than *.html?

I'm trying to get *.htm files to open in a different application than for *.html (MIME Type text/html), as generally described in GNOME Help > Add a custom MIME type for all users. I've created /usr/...
1
vote
1answer
294 views

How do I fix some broken thumbnail preview settings in Nautilus?

Okay, I wanted previews for psd files in Nautilus. So I tried the scripts found on this page: How to make Nautilus display .psd thumnails? This did not work, so then I found this maintained PPA, and ...
1
vote
0answers
88 views

Update-mime-database deletes .xml mime file

I'm still very much a novice, so please let me know if this has been asked before. I'm running Ubuntu 19.04. .ris files are plaintext files that can be imported into citation managers. I would .ris ...
0
votes
1answer
307 views

How to configure what starts when inserting a medium in Lubuntu / LXQt?

How can I configure what is executed under LXQt for a newly inserted medium? I would like the pcmanfm-qt file manager of LXQt to start in every case. Because the current behavior is useless and ...
1
vote
1answer
307 views

How can I associate a custom file type with a custom executable?

I have a custom file type, made a custom MIME type for it, associated an icon with it. Now I want to open it with my custom executable. If I click OpenI get a dialogue Could not display ... There is ...
3
votes
1answer
202 views

Promote evince in /etc/mailcap.order

GIMP very unexpectedly took over opening PDF files a while ago when issuing the see command. It is listed in /etc/mailcap before the more appropriate evince. Of course I can edit this file by hand, ...
2
votes
2answers
949 views

How can I run exe files in Dolphin on Kubuntu

I have wine installed. But how can I set it default for running exe files?
0
votes
1answer
677 views

Files associations (MIME) in Ubuntu 18.04

I'm trying to figure out how files associations work in Ubuntu 18.04. I looked around the web (quite a lot actually) and found these files: [A] /etc/gnome/defaults.list [B] /usr/share/applications/...
2
votes
1answer
662 views

How to execute a file based on the mime type in Nautlius?

I can execute the file via terminal. But how can I tell Nautilus to do the same on double click?
3
votes
0answers
187 views

When does /usr/share/applications/mimeinfo.cache get updated and can I protect it?

I find it really irritating that some applications (e.g. pdfshuffler and calibre) end up a higher priority in /usr/share/applications/mimeinfo.cache than my desired application for PDFs (okular). I ...
1
vote
0answers
216 views

Where is a detailed GUI for file associations?

I am using Gnome on Ubuntu 18.04. I just fixed an irritating feature whereby Firefox would open PDFs with PDFShuffler instead of Okular (which Dolphin launches). I fixed it by editing /usr/share/...
7
votes
2answers
674 views

Nautilus and Nemo don't recognize python 3 files

Nautilus and Nemo use two different icons for python files: But I want them to show the python icon for all python files. mimetype gives the same result for both files: $ mimetype *.py buy_test.py: ...
3
votes
1answer
90 views

Is it Safe to Change the Name of a .desktop File in /usr/share/applications?

I use Lubuntu (18.04) and several Gnome apps. By default Gnome apps are given generic association names like 'Terminal' for gnome-terminal and 'text editor' for gedit, which is confusing considering ...
1
vote
1answer
82 views

Set priorities for file-open applications

Most of the time I open .sla scribus files ("application/vnd.scribus" mimetype) with Scribus application, but sometimes I have to edit them with Geany (.SLA files are a kind of flat XML files). I do ...
0
votes
0answers
66 views

Thunar: set different default applications for *.rkt files and *.txt files

The problem: whenever I set a default program for opening *.rkt files, it also becomes the default program for opening *.txt files. Whenever I set a default program for opening *.txt files, it also ...
2
votes
0answers
79 views

ubuntu think my C/C++ source file is plain file

Today I suddenly find that when I create a C or C++ source code file like using vi or touch touch test.c The Ubuntu don't think it is source code file and recognize it as plain text. And when i use ...
2
votes
1answer
352 views

PCmanFM - How can I remove an entry from the context menu?

I am using Lubuntu 18.04. When clicking right on a file the context menu of the file manager opens up. The file manager is PCmanFM, a great tool. I would like to remove programs from the list of ...
2
votes
1answer
464 views

Mime type for iso files in Kubuntu 18.04

Posted in order to provide the answer. I have some desktop files for context menu actions (or service menus for Dolphin) to be applied to iso images (like mount/unmount). For example, the Dolphin ...
0
votes
1answer
56 views

Steam using wrong file association for inode/directory (kid3)

Kubuntu 16.04, latest Steam. kid3 is not a preferred application in both /usr/share/applications/mimeapps.list and ~/.config/mimeapps.list and ~/.local/share/applications/mimeapps.list is a symlink to ...
0
votes
0answers
45 views

Deleted Gstreamer codec and can't play mp3 or mp4 files

I had accidentally deleted one of the G-streamer codec and now i can't play any mp3 or mp4 file. Whenever, I try to open one of these files it gives a message of "Additional MIME type require". Please ...
1
vote
1answer
49 views

File associate by MIME subtype / extension

I'm writing files in markdown format using the markdown editor Remarkable and I name these files with the extension *.md. I'd like to associate the these files with Remarkable but if I do so the ...
1
vote
0answers
110 views

How to force Nautilus to check file extension before file content for default application

Nautilus first checks the file content before the file extension to decide which mime type to use. I have a bunch of raw file with different first few bytes: Nautilus doesn't follow the type ...
0
votes
1answer
40 views

Nemo sort php files and javascript as type program

Nemo and nautilus sort php files and javascript files as type program How can i modify this feature, so i can sort javascript as javascript and php as php? Thank YOu in advance enter image ...
0
votes
1answer
154 views

17.10 seahorse-nautilus mime association for “decrypt file”, getting really frustrated at the ubuntu way

I'm a proficient linux user, just recently I've been learning how to deploy server with ansible+vagrant so I just spent an entire week on centOS and various other flavour of linux getting a complex ...
5
votes
1answer
686 views

Krusader sees doc, docx, xls, xlsx as zip archive

After I updated Kubuntu from version Zesty (17.04) to Artful (17.10) krusader suddenly sees office formats (doc, docx, xls, xlsx) as zip archives, where as dolphin sees them correctly. How do I fix it?...
4
votes
1answer
1k views

How do mimeinfo.cache files relate to mimeapps.list?

The different mimeinfo.cache files are populated by update-desktop-database from the .desktop files you have around. However, file browsers and such seem to use mimeapps.list files. Manipulating ...
3
votes
0answers
189 views

How to launch only shell scripts from Nautilus

This is related to questions like “How do I run executable scripts in Nautilus?” or “How to execute a script just by double clicking like .EXE files in Windows?”. I would also like to have shell ...
1
vote
1answer
222 views

How to get the icon of a window class?

I'm writing a script to quickly list my many opened windows. I have grouped them according to their class. I would like to add an icon to the group. I use wmctrl to get the list of windows: wmctrl ...
1
vote
0answers
216 views

Open files only opens terminal instead of file browser

I have a problem: For some reason, if I open a file from inside an application (such as in Firefox "Open downloaded file in folder", for example), it only opens gnome-terminal in the home directory, ...
0
votes
1answer
580 views

How to Open (.sps,.csv and .sav) with SPSS as default application?

I installed SPSS24 (a statistics application) on my laptop because i need it for work. I created a SPSS.desktop file and now i can find ich with the Dash search. So far so good. But now i want that ...
1
vote
1answer
876 views

List of file types and default Ubuntu applications to open with

I'm writing a humble file manager and am seeking a list of different file types and what default applications Ubuntu uses to open them with. So far I've only figured out "text" open with gedit, "...
1
vote
1answer
2k views

I deleted MIME directories and update-mime-database doesn't work anymore! Help!

update-mime-database was getting very slow recently, so I decided to remove all associations and start over, thus I ran: sudo rm -fr /usr/share/mime /usr/share/mime-info /usr/share/mimelnk I thought ...
1
vote
1answer
939 views

How MIMEs are detected

I've searched around but can't seem to find any information on the topic. How do you set the MIME type for an existing file? For example, I'm trying to create a file with type text/html
29
votes
2answers
107k views

gzip: stdin: not in gzip format

When I run: tar -zxvf john-1.7.0.2.tar.gz I get this: gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now It should start unpacking. Some ...
0
votes
2answers
1k views

Unable to open local .swf in any browser

When trying to open locally saved .swf (any) in Chromium or Firefox instead of opening it browser opens save prompt. Flash plugin is installed for both, flash is working when viewed embedded into ....