LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to setup firefox to automatically download a .rar instead of viewing a .rar... (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-setup-firefox-to-automatically-download-a-rar-instead-of-viewing-a-rar-656276/)

trist007 07-16-2008 11:16 PM

How to setup firefox to automatically download a .rar instead of viewing a .rar...
 
If I wanted to post some .rar files on my website for download, how do I configure firefox to download the .rar file instead of opening it and viewing the src. I know that I could just wait for the source to load on the page and then click save page as, but these .rar files are huge.

Also, how do I view available RAM in terminal?

Lastly, I have a core 2 duo chip that is 64 bit compatible. I ran uname -a and I'm running fedora 8 in 32 bit mode since i686 comes out. How do I change to 64 bit mode? I don't remember the os prompting me for a selection to install 64 or 32 bit mode. Do I have to get another version of Fedora 8?

David the H. 07-16-2008 11:51 PM

If a binary file is opening up as if it were a text page, then it's not a browser issue, it's the webserver that's misconfigured. The server is sending out the file with the wrong mime-type, and so your browser thinks it's actually a text file. It's possible to use certain browser extensions or proxy filters to change the mime-type to match the file extension, but that only works on an individual level, and it can cause other headaches in the meantime. You really need to contact the hosting administrator and have them correct it there.

The top command can show you the current memory situation, in addition to the processes that are currently active.

Finally, yes, you almost certainly need to download and install the 64bit operating system separately. I don't remember ever seeing any installer, or even live cd for that matter, that has both options available. Not that I've been looking, however. :)

trist007 07-17-2008 07:06 AM

I'm the hosting admininstrator. How would I go about changing the mime-type of the .rar files? I uploaded the .rar files in binary. These aren't text files so I'd think binary would be the format to use. In firefox--Options--Content--File Types--Manage, I then click on the small box above the scroll bar on the right and click on mime type but there's no x-rar type. I've tried downloading the .rar file on this browser so shouldn't it include the x-rar to the list of mime types?

David the H. 07-17-2008 02:47 PM

I've never had to deal with web administration, so have no idea. It depends on the webserver you use. Check your documentation or google for it. But it's probably not a problem with the files themselves, nor with Firefox; it's a problem with the Content-Type header the server is sending them out with. Some servers serve out all unknown/unconfigured mime-types as text/plain, so when the browser gets the file, it thinks it's a text file and tries to load it in main window. You have to configure the server so that rar files are served as binary files, then Firefox and other browsers will know to try to save them instead.

Here, let's check and see if this is really the problem. Open up one of the files in Firefox and let it load completely in a browser window (you get a huge page full of gibberish characters, right?). Then open up the "page info" dialog (crtl+i) and check the header information. Look for the "Content-Type" header line. What does it say the mime-type is? If it says text/plain or something other than rar, then your server is configured wrong.

trist007 07-17-2008 04:26 PM

On the web server I found a file named
/etc/mime.types

I tried adding rar to the
application/octet-stream

that didn't work, so I added a line

application/x-rar rar

but that didnt' work either. After every change I save the file and restart the proftpd daemon. Do I need to upload those files again after these changes to make them have an effect?

FranDango 07-18-2008 06:52 AM

Even if your not the system administrator, you can override certain settings of the web server by adding the new setting to a so called '.htaccess' file (for Apache servers). However, it still depends on the main configuration what settings are allowed to be overwritten. The .htaccess file settings are valid only for the given web-directory and it's sub-directories.

Have a look at the documentation on apache.org for the proper syntax of .htaccess files or Google for .htaccess to find some tutorial.

Linux Archive


All times are GMT -5. The time now is 10:39 PM.