Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-28-2002, 03:56 PM   #1
LQ Newbie
Registered: Oct 2001
Location: Newport, RI
Posts: 14

Rep: Reputation: 1
how do I change mime type?

I have a file1.sxc file which is an OpenOffice spreadsheet. I CAN open this file by first running OpenOffice and then opening the file from OpenOffice. I WANT TO open this file by clicking on it. Unfortunately, in file properties, this file is identified with the MIME type "application/zip", which is wrong. Furthermore, the MIME type "application/zip" is NOT identified with the .sxc extension in my GNOME control center. If I open this file in OpenOffice and do a "save as" .sxc file, I still get the "application/zip" MIME type.

How do I edit the MIME type of this file to change it from "application/zip" to "application/vnd.sun.xml.calc", which I think is what I want?

In general, my question is, How do you edit the file properties to give a file a different MIME type, other than by simply changing the file extension?

Thanks for any responses.
Old 06-10-2002, 04:19 AM   #2
Senior Member
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
I think that this thread will tell you how to do it.

Old 06-10-2002, 09:14 AM   #3
LQ Newbie
Registered: Oct 2001
Location: Newport, RI
Posts: 14

Original Poster
Rep: Reputation: 1

My version of Gnome that came with RH 7.2 does NOT allow one to DEselect the "detect file types by their mime types rather than their extension" option as described by Calum in his posting.

My particular problem happened because Gnome File Types and Programs was not properly handling the .sxc (spreadsheet) and .sxw (word processor) file types, even though the .sxc and .sxw extensions were explicitly associated with OpenOffice 1.0 in "File Types and Programs". All my .sxc and .sxw files were being interpreted as type "application/zip". As a result, I couldn't get OpenOffice to appear in the application menu when I right-clicked a .sxc or .sxw file.

My work-around was to delete the line containing "application/zip" from the file /etc/gnome-vfs-mime-magic. Apparently, Gnome has a "magic" file-type interpreter which interprets the file-type based on information other than the file extension. This "magic" interpreter seems to override what is in "File Types and Programs". Deleting that line from /etc/gnome-vfs-mime-magic seems to allow the Gnome "File types and programs" entries related to .sxc and .sxw to work properly.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
OOCalc Mime Type FYZ Linux - Software 0 08-25-2005 03:51 AM
Can't find Mime Type cootetom SUSE / openSUSE 20 08-16-2005 01:58 PM
change mime type dARkHunTEr Linux - Software 0 08-03-2003 12:30 PM
Mime type settings saravanan1979 Linux - Newbie 0 04-15-2002 05:53 AM
Missing MIME type odat Programming 1 08-16-2001 05:54 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration