3

In Dolphin/Konqueror files that are supposed to have "unknown" file type have "Microsoft Help Attribute Definition File" as their type.

This also affect files without extension with special symbols in them(such as ^[[2J^[[0;0f I have at the begnning of .xsession-errors), swapfile, softlinks(to those files + dangling links).

In System Settings/File associations "Microsoft Help Attribute Definition File" is a description for "application/octet-stream" type(see octet-stream.xml below).

It seems that they use it like some sort of fallback or default entry, because when I enter directory all of the files(not directories) for a few moments have this type(non-recognized?). Problem is specific to those file browsers, I installed Thunar, Tux Commander, Double Commander and they work fine. Files itself are okay:

[ ~]$ file .xsession-errors
.xsession-errors: UTF-8 Unicode text, with very long lines, with CRLF, LF line terminators, with escape sequences
[ ~]$ file --mime-type .xsession-errors
.xsession-errors: text/plain
[ ~]$ file link
link: broken symbolic link to 43399594

Tried to spot this type files, found some in ~/.local/share/mime/ but any changes(with subsequent update-desktop-database update-mime-database calls and even reboot) gave nothing.

Thought that it may be due to wine office 2010 installation so erased wine mime, desktop and so files(link limit, you may find it on wine FAQ page under "4.3. How do I clean the Open With List?") to no avail. Then deleted wine prefix - same result. Wasn't able to find anything with google either (most of the problems there related to wrong application starting and not file type recognition).

Tested on a new user - all work like a charm. From there my .xsession-errors have type "unknown"

According to bug 337708 seems that it related to shared-mime-info. Didn't find anything specific.

octet-stream.xml

<?xml version="1.0" encoding="utf-8"?>
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/octet-stream">
  <!--Created automatically by update-mime-database. DO NOT EDIT!-->
  <comment>Microsoft Help Attribute Definition File</comment>
  <glob-deleteall/>
  <glob pattern="*.bin"/>
  <glob pattern="*.hxd"/>
  <glob pattern="*.hxh"/>
  <glob pattern="*.hxi"/>
  <glob pattern="*.hxq"/>
  <glob pattern="*.hxr"/>
  <glob pattern="*.hxs"/>
  <glob pattern="*.hxw"/>
</mime-type>

few pictures with dolphin, thunar, master-fast-print-screen while folder was loading

[ ~]$ uname -a
Linux Erefan 3.17.6-1-ARCH #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014 x86_64 GNU/Linux KDE 
[ ~]$ dolphin --version
Qt: 4.8.6
KDE Development Platform: 4.14.3
Dolphin: 4.14.3

p.s. .xsession-errors used just as an example, actually many files have that wrong type.


Edit 1: After additional testing on new user I concluded that it is related to wine office 2010 installation. Specifically this installation put new octet-stream.xml file in ~/.local/share/mime/application/ which overrides the original one in /usr/share/mime/application/ . Actually installation provide application-octet-stream.xml in packages folder which is then used by update-mime-database to generate octet-stream.xml. Original file actually define "unknown" type of file. I'm not very familiar with syntax but it looks like there is nothing special. So I manually modified the application-octet-stream.xml to comply with the original + added icon(see below). So far all work just fine.

So if you want to try steps are as follows:

Check all by yourself in case anything happens you'll be the one to blame.

1. modify ~/.local/share/mime/packages/application-octet-stream.xml (see below).

2. run "update-mime-database ~/.local/share/mime/".

3. probably restart current session.

application-octet-stream.xml

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
    <mime-type type="application/octet-stream">
        <comment>unknown</comment>
        <icon name="unknown"/>
        <glob pattern="*.hxd"/>
        <glob pattern="*.hxh"/>
        <glob pattern="*.hxi"/>
        <glob pattern="*.hxq"/>
        <glob pattern="*.hxr"/>
        <glob pattern="*.hxs"/>
        <glob pattern="*.hxw"/>
    </mime-type>
</mime-info>

Next step - xml files have ugly windows icon(seems that office installation is the one to blame ) and I wonder why it doesn't change through normal File Associations settings.

  • 1
    I have no idea what you are asking. – Nifle Dec 22 '14 at 12:52
  • 1
    basically all files that are supposed to be of "unknown" type now have "Microsoft Help Attribute Definition File" type dropbox with example – lundibundi Dec 22 '14 at 19:30
  • The title and question talk about a filetype association that is being used but should not. The bug reference talks about Dolphin failing to recognize filetypes (opposite problem). Have you looked in System Settings | File Associations? See if this is useful for extracting the magic number info: unixhelp.ed.ac.uk/CGI/man-cgi?file – fixer1234 Dec 22 '14 at 20:02
  • @fixer1234, hopefully clarified it a bit. Thanks for "magic", will research a bit later. That bug reference there is not for nothing but solely to state that "Shared mime info" is used in kde in comparison to "file"(don't know whether they are related or not though). p.s System Settings | File Associations info is already there - octet-stream.xml file – lundibundi Dec 22 '14 at 21:43
  • 1
    Dandling links, swapfile, files with unicode text(as "file" stated) for sure are not "Microsoft Help Attribute Definition File". I think it's obvious but I checked it on new user and any of them have "unknown"/link type. Plus checked files in my directory - all have proper file type (unknown, link). – lundibundi Dec 22 '14 at 22:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.