The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
0answers
71 views

Why are all files detected as application/octet-stream in nemo?

nemo sees all files as Binary (application/octet-stream), so these kinds of things happened: All files (.mkv, .mp4, .torrent, anything) lost their association to any program All .pdf files could not ...
3
votes
1answer
267 views

“file” command confusing C & C++

When using file to check some file types, I noticed that it seems to incorrectly label C++ files as C files: $ file User.* User.cpp: C source, ASCII text User.h: C++ source, ASCII text User.o: ELF ...
2
votes
0answers
8 views

Why does xdg-open text_file differ from sudo -u me xdg-open text_file?

If I run the following command, the text file opens in my preferred editor (kate). $ xdg-open text_file However, if I try the following, where sparhawk is my username, I get several warnings, and ...
0
votes
0answers
23 views

How to change icon for Mathematica nb files

I'm using Mathematica 9.0 on Lubuntu 11.10 and its icons on menus work well. But nb files (note book files) does not have a nice icon. They appears with a king of engine icon (like configuration ...
1
vote
2answers
36 views

How to save “text/pdf” PDF files on the disk from an incoming mail in Mutt

I receive emails with PDF attachments that have the MIME type "text/pdf". This is obviously not good, but some mail clients are doing that... The problem is that saving such an attachment in Mutt ...
1
vote
2answers
64 views

`file` doesn’t show proper mime-type for .m2ts files

I need to define mime type of various video files and I got a problem with .m2ts files. Before I stumbled on this, I used file utility with -iL keys and parsed the output with sed. Today I found that ...
19
votes
4answers
1k views

Is there an “open with” command for the command line?

Does the command line have a way to get a recommended list of programs used to open a particular file, based on the file type? For example, a .pdf file would have an open with... recommendation using ...
2
votes
1answer
52 views

gnome-open execute shell script

Is there a way to execute shell scripts automatically using gnome-open? If I call gnome-open script.sh in the terminal, the script opens in the default text editor. However the shell-script is ...
2
votes
1answer
30 views

Metadata for exchanging BSD mailbox files

The BSD mailbox format has, according to Jamie Zawinski, never been formally documented (see his anti-content-length rant), and does not have, as far as I know, any formal identifiers that may be used ...
1
vote
0answers
58 views

Wine and mime type association backup and restore

I'm going to replace Ubuntu with Arch Linux on my laptop and I want to reformat it. But I want to save ma wine prefixes as I have installed some windows programs that I need. I have gzipped my .wine* ...
1
vote
2answers
62 views

Something like a symbolically linked file, but with change details attached?

Is there a file type or method for using files in which certain files look and behave like symbolically linked files, but contain extra meta information for changing the data when they are read? ...
4
votes
2answers
984 views

How can I make chrome (stop asking to be) the default browser?

I am running Linux Mint Debian edition (essentially Debian testing) and the Cinnamon desktop environment. Every time I launch google-chrome it asks to become the default browser. I have told it to do ...
3
votes
0answers
125 views

Open .desktop files in text editor by default

I wonder if it's possible to open files with the .desktop suffix in a text editor of choice by a simple double-click in a file manager. Even assigning the corresponding MIME type to a text editor with ...
3
votes
1answer
34 views

Where are recognizers for media types stored and how to add one?

When one writes a html file, linux can state that the MIME-type is text/html. How is this handled? Where are the "recognizers" stored? How can one add a MIME type with with an implemented recognizer?
6
votes
3answers
143 views

How can I determine a file's conventional filename extension

The file command is good at determining file types for my needs. Is there any way to map those results to conventional filename extensions?
0
votes
0answers
33 views

I can't find a way to change the default browser to icedtea webstart

My OS is OpenSuse 64 bit and I run a java webapp, .jnlp. Everytime I click on a link on that app it opens a Firefox browser, yet I would like to change this to Google Chrome, but am unable to find ...
2
votes
1answer
231 views

Given a mime-type get the corresponding file extension

I want to download I file using curl to a temporary directory with the appropriate extension. Currently I do something like this: tmp="$(mktemp -t 'curl')" curl -o "$tmp" ...
0
votes
1answer
234 views

How to change wrong mime type for msi file?

file -i <here msi file> returns application/vnd.ms-office and I think that is wrong. I need a more specific mime type for msi files. I know about magic files but I really need some help with ...
1
vote
1answer
326 views

What to do with a message/partial MIME type?

I used a copier/scanner to scan a document and email me the resulting image. It sent me several emails, each with a message/partial MIME attachment. mutt doesn't seem to understand these messages. ...
2
votes
0answers
244 views

Change the default terminal for all .desktop files?

My htop.desktop launches XTerm, but I want to change the default terminal to xfce4-terminal in all "Terminal=true" .desktop files.
4
votes
2answers
196 views

How to tell mutt not to wait for an attachment program to return?

I use this line for images in my mailcap: image/*; eog %s &; but mutt immediately deletes the temp file and eog can’t load it. When I remove the & mutt waits for eog to be closed until it ...
2
votes
2answers
325 views

What tool to edit the /usr/share/mime/packages/freedesktop.org.xml file

I edited my /usr/share/mime/packages/freedesktop.org.xml (with a text editor) to modify the file icon of application/x-7z-compressed mime type : <mime-type type="application/x-7z-compressed"> ...
0
votes
1answer
174 views

Fedora desktop launcher

I have created a desktop launcher for Midnight Commander in Fedora LXDE environment but this does not work. Where did I make a mistake? $ cat mc.desktop [Desktop Entry] Encoding=UTF-8 ...
2
votes
0answers
180 views

Create new file type association

Let's assume I have a program X that uses files with the extension .xez. How can I make X the default application for all files with the extension .xez? My first idea was xdg-mime default X.desktop ...
4
votes
2answers
905 views

How to set the Linux Mint desktop environment to use a mime type?

As a extension to this question: How to make difference between .wxm (wxMaxima) and .c files in Linux Mint? I'm using Linux Mint. I created a mime type. Now I want the desktop environment to use it. ...
2
votes
1answer
342 views

How to make difference between .wxm (wxMaxima) and .c files in Linux Mint?

I installed wxMaxima on my laptop a few days ago. The issue is that files with the extension .wxm, that are used with wxMaxima, are identified as a C source files. Therefore, when I double click on ...
1
vote
1answer
279 views

xdg-mime not behaving

I am trying to set the default application for magnet links using: ~ $ xdg-mime default deluge.desktop x-scheme-handler/magnet Checking this with grep -i deluge ~/.local/share/applications/* ...
3
votes
3answers
655 views

How to use Emacs to recognize and automatically open GPG encrypted file in ASCII armored format?

gpg -ca passwords.txt create encrypted ASCII file passwords.txt.asc. Emacs open the file as a normal text file: -----BEGIN PGP MESSAGE----- Version: GnuPG v2.0.19 (GNU/Linux) ...
5
votes
3answers
4k views

wget - How to download recursively and only specific mime-types/extensions (i.e. text only)

How to download a full website, but ignoring all binary files. wget has this functionality using the -r flag but it downloads everything and some websites are just too much for a low-resources ...
3
votes
1answer
446 views

Items in context menu in Lubuntu

I am using Lubuntu 11.10. When I call the context menu (right click) many programs appear to open some file. For example, for .tex files, besides TeXstudio and Leafpad, Gnumeric (what a strange ...
0
votes
0answers
219 views

Is there a graphic tool to add new url schemes like XX://?

I would like to add a few url scheme, e.g magnet://, and add a simple mimetype for it. So that I would be able to handle these links within my browser. Is there any graphic tool I could utilize ?
4
votes
1answer
241 views

How to fix xdg-mime for text formats

My xdg-mime makes mistakes. It recognizes an .html file containing Java code as a C++ file. I don't quite know the internal mechanism of xdg (eg. how it determines filetype). And I want to know how ...
2
votes
1answer
358 views

Detect file-type with the help of magic-file and rename file-suffix accordingly

I have a folder (the iPhone Backup) with various files without a suffix. I want to run a batch process over these files, which detects each file's file-type (with the help of the magic-file database ...
1
vote
1answer
196 views

Where to submit new mimetypes?

I've defined new mimetypes with file suffix, where should I submit my work, so that it will be included in future linux/unix distros ?
1
vote
1answer
1k views

Sending HTML with Mutt (or another terminal mail client)

While I can find some scattered info on the topic, I can't seem to find a straight walkthrough (or even a definite answer)... Basically I'm too low on the totem pole to start sending plain-text ...
18
votes
4answers
6k views

How to properly and easy configure `xdg-open` without any enviroment?

I'm using OpenBox window manager without any desktop enviroment. xdg-open behaves strangely. It opens everything with firefox. $ xdg-settings --list Known properties: default-web-browser ...
5
votes
1answer
357 views

How can I configure OpenBox session for opening files by mime type?

I've started using OpenBox and I really like it. But my chromium opens everything with firefox. Is there any fix for that? I'm looking for most lightweight solution, but also with easy and fast ...
2
votes
2answers
327 views

How to add mimetype bindings?

I got an error message when launching "xdg-open" , No applications found for mimetype: inode/mount-point How should I add a binding for "dolphin" ?
4
votes
1answer
2k views

How to setup default browser?

How to change default browser for opening url-s ? For sanity check, I tried: xdg-open 'http://unix.stackexchange.com' And it opens in other browser. I found information about assigning ...
7
votes
3answers
3k views

How to remove Notepad from the applications list?

After installing Wine, Notepad has became a default application to open unknown textual files by double click. I'd like to eliminate this behaviour and remove Notepad from the list of applications ...
2
votes
1answer
844 views

Fixing mime type on Ubuntu

I am using Ubuntu 10.04. Sometime back after an update, all files in Ubuntu started showing a mime type of text/plain. This means that double clicking on any file opened it using gvim which is really ...
6
votes
1answer
268 views

What could cause strange behavior in file(1) command?

What could cause file(1) command to output application/msword application/msword (yes, twice in a row) as the mime type for some of the .doc files? Normally it prints just application/msword. If run ...
1
vote
0answers
176 views

Desktop Actions and mime types for a DRM file format

I want to handle a DRM file format, which adds an encryption wrapper outside of the protected content. Please see the diagram. _________________________ | DRM wrapper MIME | ...
3
votes
1answer
496 views

How to get the icon for a MIME type?

How to get the icon for a MIME type? I don't want to use g_file_info_get_icon() because its input parameter is a file, not a MIME type. My use case: I have a wrapper file which embeds a media ...
0
votes
2answers
3k views

How can I get the error code (exit code) of “xdg-mime query filetype” command?

I ran xdg-mime query filetype <file name> to check the MIME type of a file, and it failed. How can I print the error code (exit code) of the xdg-mime command? I want to know what error ...
2
votes
2answers
940 views

Why does `xdg-mime query filetype …` fail to find a new added file type?

I installed a new file type to share MIME database. But xdg-mime query filetype cannot tell the new type. This problem only happens on my own Linux OS which does not use GNOME or KDE as its desktop. ...
2
votes
1answer
339 views

How is MIME type “text/html” registered to shared-mime-info? Where is its *.xml file?

On Ubuntu 10.10, which XML file under the directory /usr/share/mime/applications is for MIME type text/html? I checked xml.xml and xhtml+xml.xml, but neither has a glob pattern of *.html. So where is ...
3
votes
5answers
3k views

Script to list only files of type ASCII text in the current directory?

How to write a shell script which searches the current UNIX directory and returns the names of all files of type ASCII text?
3
votes
2answers
333 views

Is there a glibc API that can find the default handing application for a MIME type on linux?

I want to find the default handling application in my C program. Is there a C API with same functionality as xdg-mime query default mime-type on Linux?
2
votes
2answers
205 views

Can shared-mime-info associate a MIME type to a desktop applications?

I can add a new MIME type in shared MIME-info, but how can I associates this MIME type with an application?