After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 317239 - gif gets wrong content-type with gnome-vfs2-2.6.1-38.4
gif gets wrong content-type with gnome-vfs2-2.6.1-38.4
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: MIME and file/program mapping
2.6.x
Other All
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2005-09-26 12:50 UTC by Cecil Westerhof
Modified: 2006-03-05 18:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Cecil Westerhof 2005-09-26 12:50:14 UTC
Please describe the problem:
When including a gif in a message or signature the content type is set to 
text/plain. This should be image/gif.

Steps to reproduce:
1. Send an e-mail with a gif image. 


Actual results:
Content-type is set to text/plain

Expected results:
content-type is set to image/gif

Does this happen every time?
Yes

Other information:
No.
Comment 1 André Klapper 2005-09-26 18:45:16 UTC
if i right-click on the attachment and choose "properties" in the composer of
2.4.0, the mime type of an attached gif file is correctly set to "image/gif".

it's also correct in the received email, the source view says "Content-Type:
image/gif".

if i remember correctly, the mime types are read from gnome and aren't evolution
specific. which gnome-version are you running?
Comment 2 André Klapper 2005-09-26 18:46:30 UTC
err, only tested this with plain text and attachments. are you refering to html
and embedded images? hmm. should retest. i like the word "hmm" by the way if i
re-read this. ;-)
Comment 3 Cecil Westerhof 2005-09-26 19:53:39 UTC
It was HTML with embedded images. It was for a signature. But when I put a gif
as an attachement the problem is the same.

When I right-click the attachement says text/plain and I can not change it.

I am not using gnome, I am working with KDE. Is there a way to set the
content-types for Gnome from within KDE?
Comment 4 André Klapper 2005-09-26 19:59:16 UTC
being unable to edit the mime type is bug 206058, uhm, the rest i don't really
know. will try to reproduce tomorrow.
Comment 5 Cecil Westerhof 2005-09-26 20:09:10 UTC
I do not really want to edit it. ;-} Then every time I send an e-mail with a gif
I need to change it.
But knowing how to set the default would be *very* helpfull.
Comment 6 Cecil Westerhof 2005-09-28 12:11:42 UTC
I checked with gnome-file-types-properties and by extension gif it says
image/gif. So I do not think Evolution gets its content-type from Gnome.
Comment 7 parthasarathi susarla 2005-09-28 12:20:38 UTC
Evolution indeed gets all its file types/association from gnome. Gnome-vfs to be
more specific. Am really not sure why this problem occurs though. It works
pretty fine for me.
Comment 8 Cecil Westerhof 2005-09-28 13:30:49 UTC
I tried using gnome instead of KDE: same result.
I tried severall type of graphics:

gif and eps gives text/plain
bmp, jpg and png gives: application/octet-stream

gnome-vfs2 is installed, but I do not see it as a command. The only commands I
see are:
gnome-about                              gnome-display-properties              
  gnome-mouse-properties                   gnome-sound-properties
gnome-accessibility-keyboard-properties  gnome-dump-metadata                   
  gnome-moz-remote                         gnome-system-log
gnome-at-properties                      gnome-file-types-properties           
  gnome-name-service                       gnome-theme-manager
gnome-audio-profiles-properties          gnome-font-properties                 
  gnome-network-preferences                gnome-theme-thumbnailer
gnome-background-properties              gnome-font-viewer                     
  gnome-open                               gnome-thumbnail-font
gnome-bug                                gnome-gen-mimedb                      
  gnome-panel                              gnome-typing-monitor
gnome-cd                                 gnome-help                            
  gnome-panel-control                      gnome-ui-properties
gnome-control-center                     gnome-help-NLD                        
  gnome-panel-preferences                  gnome-volume-control
gnome-default-applications-properties    gnome-keybinding-properties           
  gnome-panel-screenshot                   gnome-window-properties
gnome-desktop-item-edit                  gnome-keyboard-properties             
  gnome-pilot-make-password
gnome-dictionary                         gnome-keyring-daemon                  
  gnome-search-tool
Comment 9 parthasarathi susarla 2005-09-28 14:49:33 UTC
Cecil, could you try the command gnomevfs-info followed by the file name.

eg: $ gnomevfs-info <filename.gif>

and see what file typ you get for the gif (or for that matter any file). 
Thanks.
Comment 10 Cecil Westerhof 2005-09-28 15:09:32 UTC
gnomevfs-info logoMoving.gif
Name              : (null)
UID               : 0
GID               : 0

gnomevfs-info logo.bmp
Name              : (null)
UID               : 0
GID               : 0

gnomevfs-info logo.jpg
Name              : (null)
UID               : 0
GID               : 0

gnomevfs-info logo.png
Name              : (null)
UID               : 0
GID               : 0

gnomevfs-info SMS01.eps
Name              : (null)
UID               : 0
GID               : 0

gnomevfs-info ~/bin/test.sh
Name              : test.sh
Type              : Regular
MIME type         : text/plain
Size              : 362
Blocks            : 8
I/O block size    : 4096
Local             : YES
SUID              : NO
SGID              : NO
Sticky            : NO
Permissions       : 1600700
Link count        : 1
UID               : 1000
GID               : 100
Access time       : Tue Aug 23 00:47:52 2005
Modification time : Mon Jul  7 21:55:27 2003
Change time       : Sun Mar 27 21:58:16 2005
Device #          : 64771
Inode #           : 768561
Readable          : YES
Writable          : YES
Executable        : YES

Something is a bit fishy here I am afraid.
Comment 11 parthasarathi susarla 2005-09-28 15:24:57 UTC
yikes!! you bet gnome-vfs does not seem to be working. Typically you would get :
$ gnomevfs-info ch891205.gif 
Name              : ch891205.gif
Type              : Regular
MIME type         : image/gif
Default app       : xv.desktop
Size              : 17454
Blocks            : 40
I/O block size    : 4096
Local             : YES
SUID              : NO
SGID              : NO
Sticky            : NO
Permissions       : 600644
Link count        : 1
UID               : 1000
GID               : 100
Access time       : Tue Sep 13 14:47:12 2005
Modification time : Thu Mar 15 11:54:16 2001
Change time       : Thu Aug 11 21:42:48 2005
Device #          : 773
Inode #           : 2836882
Readable          : YES
Writable          : YES
Executable        : NO


Moving this bug to gnome-vfs.
Comment 12 André Klapper 2005-09-28 15:30:03 UTC
cecil, could you please post the output of
1) "rpm -q gnome-vfs2" (in order to get the version number of vfs, you can set
it yourself in this bug report if you like) and
2) "ps ax|grep vfs" (in order to see if vfs is running at all) here?

thanks in advance...
Comment 13 Cecil Westerhof 2005-09-28 15:39:36 UTC
rpm -q gnome-vfs2
gnome-vfs2-2.6.1-38.4

ps ax|grep vfs
 7425 pts/6    S+     0:00 grep vfs
Comment 14 André Klapper 2005-09-28 15:46:29 UTC
hmm. ok, so vfs is not running at all, because it should normally look like:

ps ax|grep vfs
 7650 ?        Sl     0:00 /opt/gnome/sbin/gnome-vfs-daemon
--oaf-activate-iid=OAFIID:GNOME_VFS_Daemon_Factory --oaf-ior-fd=27
32419 pts/1    D+     0:00 grep vfs

this is beyond my knowledge, don't know much of that stuff, e.g. where vfs
should be initiated.
so leaving this for the gnome-vfs-people. :-)
Comment 15 Cecil Westerhof 2005-09-28 16:09:58 UTC
I tried running /opt/gnome/sbin/gnome-vfs-daemon. That does not help.
Comment 16 Christian Neumair 2005-09-28 17:25:26 UTC
Cecil: Maybe you should add /opt/gnome/lib/bonobo/servers to
/etc/bonobo-activation/bonobo-activation-config.xml?
Comment 17 Cecil Westerhof 2005-09-28 17:42:48 UTC
cat /etc/bonobo-activation/bonobo-activation-config.xml
<?xml version="1.0"?>

<oafconfig>

<searchpath>
    <!-- Examples: -->
    <!-- <item>/opt/gnome2/lib/bonobo/servers</item> -->
    <!-- <item>/usr/local/gnome2/lib/bonobo/servers</item> -->
    <!-- <item>/usr/local/lib/bonobo/servers</item> -->
    <!-- <item>/opt/gnome2/bonobo-activation/lib/bonobo/servers</item> -->
</searchpath>

</oafconfig>

I changed it to:

<?xml version="1.0"?>

<oafconfig>

<searchpath>
    <item>/opt/gnome/lib/bonobo/servers</item>
    <!-- Examples: -->
    <!-- <item>/opt/gnome2/lib/bonobo/servers</item> -->
    <!-- <item>/usr/local/gnome2/lib/bonobo/servers</item> -->
    <!-- <item>/usr/local/lib/bonobo/servers</item> -->
    <!-- <item>/opt/gnome2/bonobo-activation/lib/bonobo/servers</item> -->
</searchpath>

</oafconfig>

I'll reboot and look what happens.
Comment 18 Christian Neumair 2005-09-28 17:46:10 UTC
No need to reboot, just run bonobo-slay and try it again. You can also use
bonobo-browser to see whether OAFIID:GNOME_VFS_Daemon_Factory is running.
Comment 19 Cecil Westerhof 2005-09-28 19:07:10 UTC
bonobo-slay gives:

The following processes are still running on the system.
These processes will be terminated.

NOTE:  Killing these processes may affect other applications
on the system that use bonobo.

6496    /opt/gnome/lib/bonobo/bonobo-activation-server
6496    /opt/gnome/lib/bonobo/bonobo-activation-server
6567    /opt/gnome/lib/evolution-data-server-1.0
6567    /opt/gnome/lib/evolution-data-server-1.0
6567    /opt/gnome/lib/evolution-data-server-1.0
6567    /opt/gnome/lib/evolution-data-server-1.0
6493    /opt/gnome/lib/evolution/2.0/evolution-alarm-notify
6496    /opt/gnome/lib/bonobo/bonobo-activation-server
6496    /opt/gnome/lib/bonobo/bonobo-activation-server
6567    /opt/gnome/lib/evolution-data-server-1.0
6567    /opt/gnome/lib/evolution-data-server-1.0
6567    /opt/gnome/lib/evolution-data-server-1.0
6567    /opt/gnome/lib/evolution-data-server-1.0
6493    /opt/gnome/lib/evolution/2.0/evolution-alarm-notify
6496    /opt/gnome/lib/bonobo/bonobo-activation-server

bonobo-browser is not known on my system.

When I run bonobo-activation-run-query I get:
number of results: 1
OAFIID:Empty:1999102

I see that bonobo is not installed, so I'll install it now.
Comment 20 Cecil Westerhof 2005-09-28 19:41:09 UTC
That did not help either.

On another system with evolution 1.4 and SUSE 9.1 (the system I have the problem
with is SUSE9.2) there is no problem (with png-files).
Comment 21 Cecil Westerhof 2005-09-29 03:13:32 UTC
It becomes very strange indeed. I also tried it on a notebook with SUSE 9.2 and
Evolution 2.0.1. There it also worked with a png-file. Evolution looked
different on this machine, so I need to find the difference between the two
machines. (But I do not have a clue how to do that.)

What is also strange is that on this notebook gnomevfs-info ~/bin/test.sh gives
also:
Name              : (null)
UID               : 0
GID               : 0

So I am a bit flabergasted.
Comment 22 Christophe Fergeau 2005-09-29 07:13:27 UTC
Do you have shared-mime-info installed?
Comment 23 Cecil Westerhof 2005-09-29 07:45:35 UTC
It is installed, but with ps I do not get any running process with mime in it.
Comment 24 Christophe Fergeau 2005-09-29 08:00:47 UTC
That's normal, but you should have /usr/share/mime/globs and
/usr/share/mime/magic files. I didn't notice you were using gnome-vfs 2.6, I'm
not even sure this old version used those files actually...
Comment 25 Cecil Westerhof 2005-09-29 08:54:07 UTC
ll /usr/share/mime/globs
-rw-------  1 root root 11K 2005-09-10 14:07 /usr/share/mime/globs

Can the permissions be the problem? Should it not be -rw-r--r--?

sudo grep gif /usr/share/mime/globs
application/x-tgif:*.obj
image/gif:*.gif

ll /usr/share/mime/magic
-rw-------  1 root root 9,9K 2005-09-10 14:07 /usr/share/mime/magic

With SUSE 9.2 gnome-vfs is 2.6.1. Should I upgrade manually?

On the other hand, on the notebook should be the same version. And there it works.
Comment 26 Christophe Fergeau 2005-09-29 08:57:03 UTC
I wouldn't recommand to upgrade manually, unless someone from your distribution
support tells you to do s. Try to change all permissions in /usr/share/mime so
that all files in there are readable by everyone though, this could indeed cause
problems.
Comment 27 Cecil Westerhof 2005-09-29 09:18:42 UTC
Okay, I will not upgrade then.
I changed all permissions in /usr/share/mime (recursivly), but to no avail.
Comment 28 Cecil Westerhof 2005-09-29 09:27:40 UTC
I was to quick. Closing and starting again was enough. It looks like everything
is okay now.

The only strange thing is that the output of gnomevfs-info is:
Name              : (null)
UID               : 0
GID               : 0

But I think that we can say: problem solved.

Maybe it would be nice to get a warning that the files are not readable. That
would have saved me a lot of time.
Comment 29 Christophe Fergeau 2006-03-05 18:27:45 UTC
Marking as fixed per last comment