Re: GURUS: Attachment types - how does this work?



On 2003.03.06 08:44:44 +0000 Philip Rhoades wrote:

i know you asked for gurus, but i'll answer anyway

> 
> Question 1:
> 
> I got an Excel spreadsheet from someone and the header had:
> 
> Content-Type: application/octet-stream; name="Bnkjul02.xls";
>  x-mac-type="584C5334"; x-mac-creator="5843454C"
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename="Bnkjul02.xls"
> 
> When I look at the attachment icon it confirms the 
> "application/octet-stream" type and does not recognise it as an Excel 
> spreadsheet.
> 

the sender didn't specify a mime type for the attachment, instead
he chose the specify application specific (x-*) types which probably
make a lot of sense for eudora or windows or whatever but make
no sense whatsoever for anything outside it. 'application/octet-stream'
is the fallback type for 'look, this isn't text so don't display it
but i got no clue to what it is'

note that dos/windows is particularly stupid when it comes to MIME
and opening attachment (in fact, that's the basis of an whole range
of outlook exploits) - it uses the mime information to display
the icon but when it feed the attachment to the "open" bits
of the system they use the *extention* (remember x-midi attachments
containing .bat and .pif)

in UNIX world in general "extention" is non existing concept
( '.' is a regular character in a file name) so UNIX relies
in file content to figure out file types and MIME information
for internet messages.

> I sent myself an Excel spreadsheet and that header has:
> 
> Content-Type: application/vnd.ms-excel
> Content-Disposition: attachment; filename="bcs_bcb.xls"
> Content-Transfer-Encoding: base64
> 
> This is correctly recognised as an Excel spreadsheet and prompts me to open 
> it with Star Office.
> 

that header says 'look, this file was created with MS-Excel' so
gnome-vfs looks at it and says "oh, we got an application that claims
to know about it" 
> 
> Question 2:
> 
> I didn't get an answer when I posted this before so I'm trying again:  How 
> can I manually edit Gnome config files (RH 7.3/8.0) to specify particular 
> applications (eg xpdf) for particular attachments (eg *.pdf files)?  I 
> can't run the Gnome desktop on these user's X terminals.
> 
RH7 = gnome1.4
look into ~/.gnome/mime-info/user.*
just create the types you want in a complete desktop and replicate this
to your users, or create the entries by hand

RH8 = gnome2
i'm pretty sure it's somewhere in gconf, dig around :)


-- 
Carlos Morgado - chbm(at)chbm(dot)nu - http://chbm.nu/ -- gpgkey: 0x1FC57F0A
http://wwwkeys.pgp.net/ FP:0A27 35D3 C448 3641 0573 6876 2A37 4BB2 1FC5 7F0A
Software is like sex; it's better when it's free. - Linus Torvalds



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]