You are not logged in.
Hi all,
while I know that openoffice can open those freakin' docx files, I would like to be able to open them by just clicking on them in thunar. However, it seems that thunar recognises them as files of type "zip archive". Of course, I want to associate OOo by default to them, but not to zip archives in general. Does anyone have an idea where I would have to intervene?
TIA,
Andreas
Offline
I seem to have the same problem as you just with pdf and xoj files. It is really annoying, every time i set it by rightclicking and choosing what application has to open it, and then restart my computer the settings vanish.
IBM Thinkpad X60 Tablet | Zen-sources | My AUR Builds
Offline
i had the same trouble. I wiped my mime-config from my home and problem solved. (But I had to set by hand some associations).
They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.
Offline
Where is this file you talk about?
IBM Thinkpad X60 Tablet | Zen-sources | My AUR Builds
Offline
delete .local/share/mime directory.
Sorry about it, I forgot completly to post the path ^^!
They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.
Offline
Sorry, I was referring to another issue. When dealing with openoffice's odt files, thunar recognizes them as files of (MIME, I suppose) type "ODT File". I set thunar to always open with openoffice and that's it. I want to do the same for Microsoft's *.docx files, but they're recognized by thunar as "zip archive" type files. Now how can I have openoffice open one part of "zip archive" files (namely, those that end in *.docx) and the other part (ending in *.zip) with xarchiver?
Offline
dunno that...
They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.
Offline
I have a similar (I guess) problem. Thunar recognizes .doc files as a plain text file and tries to open it with kwrite. Of course I don't want to to assign openoffice to all plain text files. After reading this thread I deleted my .local/share/mime, it helped for a while, but now the problem is back again.
Offline
Right click > Open with Other Application > Pick something and click on the make default box.
Offline
This causes all plain text files to be open with openoffice, which is obviously not what I want.
Offline
I had a try with
mimetype -aD somedocfile.doc
and that pointed me to a line
text/plain:*.doc
in both /usr/share/mime/globs and /usr/share/mime/globs2. I commented that out and now at least the mimetype command identifies the file in question as application/msword. thunar still opens it with leafpad, but I suppose that was a good first step.
Offline
Thanks for the clue! I think I found the right solution.
The 'mimetype' command doesn't work for me. However I looked at the /usr/share/mime/globs and /usr/share/mime/globs2 files. They indeed contained 'text/plain:*.doc'. However at the beginning of these files there is an information that these files are generated automatically by 'update-mime-database' and should not be modified.
I found an information that update-mime-database reads the files in /usr/share/mime/packages. There it is! kde.xml contains lines:
<mime-type type="text/plain"> <!-- As discussed on xdg list, *.doc is needed here for disambiguation -->
<glob pattern="*.asc"/>
<glob pattern="*.txt"/>
<glob pattern="*.doc"/>
</mime-type>
Well... I don't see a good reason to keep the *.doc there. I removed the line and run
update-mime-database /usr/share/mime
restarted xfce and now it seems to work fine. So I think this is an upstream bug in kdelibs.
Offline
Senjin, thanks. The issue of being able to control mimetypes so as to get the proper icon in thunar has been bothering me for a while. Your solution has pointed me in the right direction. In this case, clearly the kde people know it causes a problem:
<!-- As discussed on xdg list, *.doc is needed here for disambiguation -->
yet have gone ahead tagging .doc as text/plain for "disambiguation", whatever that means. I just wonder if we are getting to a situation where developers are making decisions for users for reasons that are unrelated to the real world...
Offline
Just for the records, I think what is meant by disambiguation (I've read in the xdg archives, but I don't have the url anymore) is this:
There are *.doc files that are not MS Word but indeed plaintext files (e.g. /usr/share/kbd/keymaps/i386/qwerty/no-latin1.doc, /usr/lib/python2.6/pdb.doc). So the idea was - AFAIU - to associate the glob '*.doc' with textfiles and to have some "magic" recognise MS-Word-specific strings only inside Word files and in those cases overrule the plaintext association with the application/msword association. Maybe the word files I have have a different string in them, which leads to them being associated with plaintext only, but I suppose that would be the end from which to tackle this properly (bugreport to xdg etc.) ... if only I cared about the non-msword doc files. But since I don't, I have followed senjin's route - thanks from me, too.
Offline
Thanks a lot senjin, I could by no way find the solution.
All your base are belong to us
Offline
Well... that's rather a hack than a solution. I think it might be because xfce and kde treats the mime types different way...
Offline
Thank you so much senjin, nice hack!
I was getting very frustrated with this
"If at first an idea is not absurd, then there is no hope for it." A. Einstein
Offline
Unfortunately you need to repeat the trick each time you update kde or prevent pacman from updating the problematic files.
Offline