You are not logged in.

#1 2010-04-15 04:27:44

bsdson.tw
Member
From: Taiwan
Registered: 2005-05-06
Posts: 161

some problems with the mime type of a .doc file and Open-office

Hi,

I know there are some discussions about this problem over the Internet,
but it's a little bit different and also I want to know what your situations are.

The problem begins with Thunar, which treats .doc and .txt the same. If I ask Thunar to open a .doc file with open-office, Thunar will also open a .txt file with open-office. And vice versa.

Then I tried to open those 2 files by xdg-open, that gives me the same result. So I think the problem is not in Thunar itself, but the mapping between the file type and the default application.
By xdg-mime, I can know the mime type of a .doc file is:

[~:henry 11:33]$ xdg-mime query filetype Desktop/Untitled\ 1.doc
application/vnd.ms-office; charset=binary

And by "/usr/share/applications/writer.desktop", I found the mime types registered by open-office writer are:

application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/vnd.stardivision.writer;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;

which do not contain "application/vnd.ms-office".

This might be one of the reasons of the problem.
Anyone has the same, or similar problem?
BR,
Henry

Offline

#2 2010-04-16 04:14:15

bsdson.tw
Member
From: Taiwan
Registered: 2005-05-06
Posts: 161

Re: some problems with the mime type of a .doc file and Open-office

bump smile

Offline

#3 2010-04-19 02:02:24

bsdson.tw
Member
From: Taiwan
Registered: 2005-05-06
Posts: 161

Re: some problems with the mime type of a .doc file and Open-office

excuse me,
but... isn't there anyone who has the same issue?
I thought there are plenty people who are using Xfce here...
or did not I explain the issue clearly?

Offline

#4 2011-02-25 22:32:01

Coward
Member
Registered: 2009-06-24
Posts: 9

Re: some problems with the mime type of a .doc file and Open-office

Have you tried this:

Set default program for doc:
xdg-mime default writer.desktop "application/vnd.ms-office"

Set default program for txt:
xdg-mime default emacs.desktop text/plain

Offline

#5 2011-02-26 11:34:47

owain
Member
Registered: 2009-08-24
Posts: 251

Re: some problems with the mime type of a .doc file and Open-office

This may or may not be the same problem as the OP, but I've found there's a problem with kdelibs hogging *.doc associations in Thunar.  Removing the following lines from /usr/share/mime/packages/kde.xml prevents it:

<mime-type type="text/plain"> <!-- As discussed on xdg list, *.doc is needed here for disambiguation -->
  <glob pattern="*.doc"/>
</mime-type>

(Such a helpful comment they included there...)

Unfortunately, this needs to be done each time kdelibs gets upgraded.

Offline

#6 2011-02-26 16:07:01

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: some problems with the mime type of a .doc file and Open-office

Coward, you may have not noticed, but the thread you are replying to is close to one year old. wink

Closing this one under the necro-bumping rule.


ᶘ ᵒᴥᵒᶅ

Offline

Board footer

Powered by FluxBB