Re: Firefox file associations

2010-03-18 Thread Oleg Goldshmidt
Hi,

Quoted below is the original post from a thread I started back in
December. I have just found if not a solution then a workaround, so I
am posting it here in the hope that it will useful at least to
diagnose the problem if it ever happens to anyone.

On Wed, Dec 16, 2009 at 5:28 PM, Oleg Goldshmidt p...@goldshmidt.org wrote:
 Hi,

 Pardon my stupidity and confusion, I have what seems to be a rather
 simple question, but I feel lost.

 How can I add/modify a file/application association in Firefox? On
 Linux or on WinXP for that matter? I tried to read every FM I could
 find and the answer seems, amazingly, you can't. It seems so basic
 that I refuse to believe there is no solution unless/until someone
 here confirms the sad state of affairs.

 Here is the specific problem. I want to click on a link to a CSV file
 to open it in a spreadsheet, be it OOCalc or Gnumeric or Linux, Excel
 on Windows, etc. However, Firefox (3.5.5 on both platforms) apparently
 recognizes it as a text file and cheerfully opens it itself, as plain
 text, which is not what I want. The Edit-Preferences (Tools-Options
 on WIndows) popup has an Applications tab that lists Actions, but
 CSV is not listed and there isn't any way to add it.

There have been numerous suggestions, all were very much appreciated,
but none worked. Please don't offer any new ones without first
studying the December thread carefully.

I am now on FF 3.5.8 on Linux and 3.6 on Windows and the problem persists.

I found what the problem was, and a workaround for me. In my case, I
have control over the web server that has the files.

First, the default MIME type for the web SERVER should NOT be
text/plain. I run Apache on Linux, so I

a) added

text/csvcsv

to the proper place in /etc/mime.types,

b) changed DefaultType from text/plain to
application/octet-stream in /etc/httpd/conf/httpd.conf,

c) restarted httpd.

Then, on a client with Firefox I went to the profile directory
(~/.mozilla/firefox/*.default or whatever) and renamed mimeTypes.rdf.

Then started Firefox, cleared the cache and the history, clicked on a
link to a CSV file, and it prompted me for an application. Choose
oocalc, tick the Always do it from now on box, voila...

It worked for me only after I had done ALL of the above. E.g., just
moving mimeTypes.rdf away (or trying to add a custom CSV stanza to it)
did not work. Apparently, FF assigns a higher preference to the MIME
type coming from the server than to its own or system association
tables or anything else. Thus, if the server thinks it is text/plain
there is no way to convince FF that it is not.

Despite the fact that changing the server configuration helped resolve
the issue I insist that it is a problem with Firefox - Konqueror on
Linux and IE on WIndows did not have a problem with DefaultType
text/plain on the server. I have not investigated what they do
differently.

Hope this helps someone, anyway (well, I know it did, someone from
Switzerland who has the same problem and found the thread contacted me
off list).

-- 
Oleg Goldshmidt | p...@goldshmidt.org

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Firefox file associations

2009-12-17 Thread Oleg Goldshmidt
On Wed, Dec 16, 2009 at 7:55 PM, Shlomi Fish shlo...@iglu.org.il wrote:


 In Firefox 3.6-beta on Mandriva Cooker I accessed:

3.6 or 3.5.6? I don't see 3.6 anywhere on FF site...

 Edit - Preferences - Applications - CSV Document - Action and it worked.

FWIW, FF on my XP was just updated to 3.5.6, and nothing has changed.
CSV is not on the list, and I still can't modify or add file
associations.

-- 
Oleg Goldshmidt | p...@goldshmidt.org

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Firefox file associations

2009-12-17 Thread shimi
On Thu, Dec 17, 2009 at 12:11 PM, Oleg Goldshmidt p...@goldshmidt.orgwrote:

 On Wed, Dec 16, 2009 at 7:55 PM, Shlomi Fish shlo...@iglu.org.il wrote:

 
  In Firefox 3.6-beta on Mandriva Cooker I accessed:

 3.6 or 3.5.6? I don't see 3.6 anywhere on FF site...

  Edit - Preferences - Applications - CSV Document - Action and it
 worked.

 FWIW, FF on my XP was just updated to 3.5.6, and nothing has changed.
 CSV is not on the list, and I still can't modify or add file
 associations.



http://kb.mozillazine.org/File_types_and_download_actions#Managing_content_types_-_Firefox_3

File types are added to the list after first being seen by the browser and
acted upon...

-- Shimi
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Firefox file associations

2009-12-17 Thread Oleg Goldshmidt
On Thu, Dec 17, 2009 at 12:40 PM, shimi linux...@shimi.net wrote:

 http://kb.mozillazine.org/File_types_and_download_actions#Managing_content_types_-_Firefox_3

 File types are added to the list after first being seen by the browser and
 acted upon...

I mentioned this article in my original post. There is no plugin for
csv files (or for txt file, or for shell scripts, or for C files - all
of these and more are treated as text, I guess), and there is no
save/open dialog for them that would allow me to set the action.

-- 
Oleg Goldshmidt | p...@goldshmidt.org

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Firefox file associations

2009-12-17 Thread shimi
On Thu, Dec 17, 2009 at 1:13 PM, Oleg Goldshmidt p...@goldshmidt.org wrote:

 On Thu, Dec 17, 2009 at 12:40 PM, shimi linux...@shimi.net wrote:

 
 http://kb.mozillazine.org/File_types_and_download_actions#Managing_content_types_-_Firefox_3
 
  File types are added to the list after first being seen by the browser
 and
  acted upon...

 I mentioned this article in my original post. There is no plugin for
 csv files (or for txt file, or for shell scripts, or for C files - all
 of these and more are treated as text, I guess), and there is no
 save/open dialog for them that would allow me to set the action.


I see...

What happens if you force it? i.e. use a PHP script that has:

?php

header('Content-disposition: attachment; filename=whatever.csv');

?

and browse to it?

If you don't have a server with a PHP to host this on, I can create such a
URL for you...

-- Shimi
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Firefox file associations

2009-12-17 Thread Tomer Cohen
I guess that these associations come from the operating system, maybe from
Gnome/GTK as Firefox is built on top of GTK.

2009/12/17 shimi linux...@shimi.net

 On Thu, Dec 17, 2009 at 1:13 PM, Oleg Goldshmidt p...@goldshmidt.orgwrote:

 On Thu, Dec 17, 2009 at 12:40 PM, shimi linux...@shimi.net wrote:

 
 http://kb.mozillazine.org/File_types_and_download_actions#Managing_content_types_-_Firefox_3
 
  File types are added to the list after first being seen by the browser
 and
  acted upon...

 I mentioned this article in my original post. There is no plugin for
 csv files (or for txt file, or for shell scripts, or for C files - all
 of these and more are treated as text, I guess), and there is no
 save/open dialog for them that would allow me to set the action.


 I see...

 What happens if you force it? i.e. use a PHP script that has:

 ?php

 header('Content-disposition: attachment; filename=whatever.csv');

 ?

 and browse to it?

 If you don't have a server with a PHP to host this on, I can create such a
 URL for you...

 -- Shimi

 ___
 Linux-il mailing list
 Linux-il@cs.huji.ac.il
 http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il




-- 
Tomer Cohen
http://tomercohen.com
Sent from Ramat Gan, Israel
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Firefox file associations

2009-12-17 Thread Shlomi Fish
On Thursday 17 Dec 2009 12:11:16 Oleg Goldshmidt wrote:
 On Wed, Dec 16, 2009 at 7:55 PM, Shlomi Fish shlo...@iglu.org.il wrote:
  In Firefox 3.6-beta on Mandriva Cooker I accessed:
 
 3.6 or 3.5.6? I don't see 3.6 anywhere on FF site...
 

It's 3.6-beta , not 3.5.6

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-1.9.2/

It ships as part of Mandriva Linux Cooker.

  Edit - Preferences - Applications - CSV Document - Action and it
  worked.
 
 FWIW, FF on my XP was just updated to 3.5.6, and nothing has changed.
 CSV is not on the list, and I still can't modify or add file
 associations.
 

OK. Maybe try fudging with the user.js file or do as Tomer (who is the local 
Mozilla contact) says.

Regards,

Shlomi Fish

-- 
-
Shlomi Fish   http://www.shlomifish.org/
Star Trek: We, the Living Dead - http://shlom.in/st-wtld

Bzr is slower than Subversion in combination with Sourceforge. 
( By: http://dazjorz.com/ )

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Firefox file associations

2009-12-17 Thread Oleg Goldshmidt
On Thu, Dec 17, 2009 at 1:39 PM, Tomer Cohen to...@gmx.net wrote:
 I guess that these associations come from the operating system, maybe from
 Gnome/GTK as Firefox is built on top of GTK.

Not on Windows ;-).

My Linux desktop is KDE, not Gnome, are you saying FF may honor Gnome
settings and ignore KDE's anyway? If so, it's a pretty serious bug.

As I mentioned, Konqueror (on Linux) and IE (on Windows) do the right thing.

-- 
Oleg Goldshmidt | p...@goldshmidt.org

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Firefox file associations

2009-12-17 Thread Oleg Goldshmidt
 OK. Maybe try fudging with the user.js file or do as Tomer (who is the local
 Mozilla contact) says.

Well, I am looking for a solution that a normal user can use without
hacking javascript or PHP (cf. shimi's message).

I need to post (automatically, programmatically) files of different
types - including txt and csv - and make them accessible through a web
server. I want a normal Windows or Linux user with a mainstream
browser to be able to open the files in an expected way - for csv it
is spreadsheet, for txt it is a text editor of choice, etc.

Take a Windows user. As things stand now, she will be fine as long as
she uses IE. If she decides on Firefox, it won't work as intended and
there is no configuration that can make it work. Does this sound
right?

In my specific situation I may circumvent the problem by making the
files available through a samba/CIFS server. This is a workaround, not
a solution. It also requires Linux users to do more work - either
mount the share or use a samba browser or use Konqueror rather than
Firefox...

I am quite surprised that this is not trivially configurable in FF. If
this forum does not offer an obvious solution 24h after OP then maybe
I need to file a bug with Mozilla... I'll consider it.

-- 
Oleg Goldshmidt | o...@goldshmidt.org

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Firefox file associations

2009-12-16 Thread Oleg Goldshmidt
Hi,

Pardon my stupidity and confusion, I have what seems to be a rather
simple question, but I feel lost.

How can I add/modify a file/application association in Firefox? On
Linux or on WinXP for that matter? I tried to read every FM I could
find and the answer seems, amazingly, you can't. It seems so basic
that I refuse to believe there is no solution unless/until someone
here confirms the sad state of affairs.

Here is the specific problem. I want to click on a link to a CSV file
to open it in a spreadsheet, be it OOCalc or Gnumeric or Linux, Excel
on Windows, etc. However, Firefox (3.5.5 on both platforms) apparently
recognizes it as a text file and cheerfully opens it itself, as plain
text, which is not what I want. The Edit-Preferences (Tools-Options
on WIndows) popup has an Applications tab that lists Actions, but
CSV is not listed and there isn't any way to add it. The docs say that
the only way to add a new file type to the list is the first time you
click on a link to this type of file, where it offers you to download
or open with. In this case I doubt even that was ever available
since apparently it is just a text file to Firefox. I found a
knowledge base article saying the only way to modify file
associations is to install a SeaMonkey add-on. I went to look at the
add-on - it seems totally obsolete, is supposed to work with FF 2.0
and is known to be buggy with 3.1. I will think a dozen times before
installing it.

Firefox does not seem to look at system customizations in this case
either. I *know* my KDE associates CSV files with OOCalc and Windows -
with Excel (the latter is the default, I think). Konqueror and IE do
the right thing.

FWIW, my browser of choice is Konqueror which is mostly sane. However,
I am testing something and I can't afford to omit Firefox from the
list of target browsers.

What am I missing? Has Firefox been dumbed down to this extent?

Thanks in advance,

-- 
Oleg Goldshmidt | p...@goldshmidt.org

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Firefox file associations

2009-12-16 Thread Shlomi Fish
On Wednesday 16 Dec 2009 17:28:20 Oleg Goldshmidt wrote:
 Hi,
 
 Pardon my stupidity and confusion, I have what seems to be a rather
 simple question, but I feel lost.
 
 How can I add/modify a file/application association in Firefox? On
 Linux or on WinXP for that matter? I tried to read every FM I could
 find and the answer seems, amazingly, you can't. It seems so basic
 that I refuse to believe there is no solution unless/until someone
 here confirms the sad state of affairs.
 

In Firefox 3.6-beta on Mandriva Cooker I accessed:

Edit - Preferences - Applications - CSV Document - Action and it worked.

 Here is the specific problem. I want to click on a link to a CSV file
 to open it in a spreadsheet, be it OOCalc or Gnumeric or Linux, Excel
 on Windows, etc. However, Firefox (3.5.5 on both platforms) apparently
 recognizes it as a text file and cheerfully opens it itself, as plain
 text, which is not what I want. The Edit-Preferences (Tools-Options
 on WIndows) popup has an Applications tab that lists Actions, but
 CSV is not listed and there isn't any way to add it. The docs say that
 the only way to add a new file type to the list is the first time you
 click on a link to this type of file, where it offers you to download
 or open with. In this case I doubt even that was ever available
 since apparently it is just a text file to Firefox. I found a
 knowledge base article saying the only way to modify file
 associations is to install a SeaMonkey add-on. I went to look at the
 add-on - it seems totally obsolete, is supposed to work with FF 2.0
 and is known to be buggy with 3.1. I will think a dozen times before
 installing it.
 
 Firefox does not seem to look at system customizations in this case
 either. I *know* my KDE associates CSV files with OOCalc and Windows -
 with Excel (the latter is the default, I think). Konqueror and IE do
 the right thing.
 
 FWIW, my browser of choice is Konqueror which is mostly sane. However,
 I am testing something and I can't afford to omit Firefox from the
 list of target browsers.
 
 What am I missing? Has Firefox been dumbed down to this extent?
 
 Thanks in advance,
 


Regards,

Shlomi Fish

-- 
-
Shlomi Fish   http://www.shlomifish.org/
Parody on The Fountainhead - http://shlom.in/towtf

Bzr is slower than Subversion in combination with Sourceforge. 
( By: http://dazjorz.com/ )

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il


Re: Firefox file associations

2009-12-16 Thread Oleg Goldshmidt
Shlomi Fish shlo...@iglu.org.il writes:

 In Firefox 3.6-beta on Mandriva Cooker I accessed:

 Edit - Preferences - Applications - CSV Document - Action and it
 worked.

Can you also add a new file type?

-- 
Oleg Goldshmidt | p...@goldshmidt.org

___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il