If you have a local web server, try serving the files off it. I tried that and Apache gave a .java file a content-type of text/plain, which Firefox then opened "inline".
I think the problem may be that Firefox is not recognizing the content type of a local file and therefore doesn't know what to do with it. Just for kicks I chose /usr/bin/firefox as the program to open it with. The new firefox window asked me the same question - "Open With or Save to Disk". Not a solution to your problem, but a workaround. Owen On Wed, Sep 27, 2006 at 05:43:31PM -0700, Joseph Mack NA3T wrote: > I'm using firefox 1.5.0.7 to look through the (java) swing > tutorial, which I've downloaded and installed on some > localdirectory. I start with the > url=file:/directory/index.html > > After a bit of poking around I click on a link to the source > code of some file I'm interested in. I had hoped the code > would come up in a window. Instead I get a box with > > o save to disk > o open with ... java compiler /other > > I go to firefox->preferences->download->fileextensions to > find that "java" isn't a known file extension so apparently > running the java compiler is built in. > > "other" leads me to a directory viewer, so I tell firefox to > use /usr/bin/less as the viewer (and stupidly tell it to do > this everytime for this type of file). Firefox (and the > windowing system) hangs - I ctrl/alt/F1 out of Xorg and > startx again. Now when I try to look at a java file, the > windowing system hangs every time. I find that `less` is in > ~/.mozilla/.../mimetypes.rdf. > > What did the original mimetypes file look like? Go to > another linux machine with the same version of firefox - > there's no java entries anywhere in the mimetypes.rdf file > here (is firefox 1.5.0.7 different on each machine?), but > this firefox (successfully) opens the java file (with > gedit). There's no gedit in the mimetypes.rdf file or in the > preferences->download->fileextensions. > > It's like I'm trapped on a windows machine. > > I'd really like the java code just to appear in a firefox > window as text. Anyone know how to do this? > > Thanks Joe > > -- > Joseph Mack NA3T EME(B,D), FM05lw North Carolina > jmack (at) wm7d (dot) net - azimuthal equidistant map > generator at http://www.wm7d.net/azproj.shtml > Homepage http://www.austintek.com/ It's GNU/Linux! -- TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ : http://trilug.org/faq/ TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
