Office 2007 mime-type problem in KDE
May 14, 2015 1 Comment
Although Microsoft Office 2007 file types are normally opened by the correct Office 2007 application (running with WINE) in my Gentoo Linux Stable amd64 installation, KDE 4.14.3 on my new Clevo notebook opened
*.xlsm (Excel 2007 macro-enabled spreadsheet) files with Ark instead of Excel 2007. For some reason the
*.xlsm filetype was registed in the xdg-mime database to use the Ark application:
On the other hand, as you can see below, *.docx documents are correctly registed in the xdg-mime database:
The Office 2007 mime types are listed on the Web page Office 2007 File Format MIME Types for HTTP Content Streaming. Notice the uppercase ‘E’ in the mime-type
I had already used ‘System Settings’ > ‘File Associations’ in KDE to configure the file association for
*.xlsm files, but this made no difference.
I searched my installation and found the file
*.docx) and the file
*.xlsb), but the file
*.xlsm) did not exist.
Then I found the freedesktop.org bug report ‘subclasses declared have wrong case‘ about the package
shared-mime-info. One of the commenters stated the problem is in fact due to a bug in KDE.
I followed the work-around given in the bug report:
I then used KDE ‘System Settings’ > ‘File associations’ again, searched for
.xlsm and removed Ark from the list of applications for
application/vnd.ms-excel.sheet.macroenabled.12, then logged-out and back in to KDE. Double-clicking on
*.xlsm files now opens them in Excel 2007 again, the file
/usr/share/mime/application/vnd.ms-excel.sheet.macroenabled.12.xml now exists and the mime-type has been set correctly:
(I don’t have this problem opening
*.xlsm files on my Compal laptop, which also has Version 1.4 of
shared-mime-info installed and is also running KDE 4.14.3, albeit under Gentoo Testing ~amd64 rather than Gentoo Stable amd64, so perhaps the KDE bug has already been fixed in the Testing branch.)