LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Association of File Extensions With KDE 4.5.5 (https://www.linuxquestions.org/questions/linux-newbie-8/association-of-file-extensions-with-kde-4-5-5-a-4175413563/)

tb75252 06-26-2012 08:39 PM

Association of File Extensions With KDE 4.5.5
 
I am very inexperienced with Linux.

I have KDE 4.5.5 installed.
I connect to the mail server at work via Microsoft Exchange/Office Outlook Web Access. The web browser used is Firefox 13.

When I click on an attachment to an e-mail message, a window pops up asking if I want to save the attachment or if I want to search for an application to open it.

How do I set things up such that when I click on an attachment with a specific file type, the application of choice is launched and the attachment is opened?

For instance, if the attachment has a .jpg extension, how do I always open the attachment by launching GIMP? Or an .xls attachment with LibreOffice Calc? I tried looking for these applications when the window pops up, but I cannot find them!

I might need a fairly detailed explanation...

Thanks.

Kustom42 06-27-2012 02:37 PM

Linux does nothing with file extensions, it determines file types by looking at the contents of the file. With linux there really isn't a double click association with files like there is in Windows. You would download the file, open LibreOffice then open your .xls.

414N 06-27-2012 03:13 PM

Quote:

Originally Posted by Kustom42 (Post 4713556)
Linux does nothing with file extensions, it determines file types by looking at the contents of the file. With linux there really isn't a double click association with files like there is in Windows. You would download the file, open LibreOffice then open your .xls.

This is kinda unrelated. The OP asks for a way inside Firefox to associate file types with some kind of program.
There are 2 ways to do it: you can specify the path to the executable you want to open the file with (i.e. /usr/bin/gimp for gimp) or you can delegate the work to the desktop environment using, for every kind of file, the program /usr/bin/xdg-open (which just calls upon the default program associated to the file type inside the environment). Any way you do it, after the executable choice you have to tick "Do this authomatically for files like this from now on" in order to automate file opening when in Firefox.

Kustom42 06-27-2012 04:33 PM

I don't use firefox, wasn't aware of that feature. Thanks for pointing it out 414N, on an OS level though I don't know of any other solution.

TroN-0074 06-27-2012 08:45 PM

1 Attachment(s)
You have to thick a check on the 'Do this automatically for files like this from now on' on the mozilla download dialog box see picture attached on this post

John VV 06-27-2012 09:02 PM

for some standard file like a PDF
okular is used and there "should " be a check box like in the office example above

but
if it is say something like a torrent magnet link and not just a *.jpg
then you need to add the code in
Code:

about:config
--- warning untested - i do not have any MS xlsx files right now
something like this
Code:

network.protocol-handler.app.xlsx /opt/libreoffice3.5/program/soffice
network.protocol-handler.expose.xlsx false
network.protocol-handler.external.xlsx false

i like to leave boolean options set to false so a pop up window dose pop up

but just Google "about:config" for something like 3,460,000 hits

the top 15 should do you .

tb75252 06-28-2012 12:05 AM

Thanks for your suggestions.

Just in case some other inexperienced user is wanting to do the same thing, here are the steps that I followed to associate a file extension with a specific application. These instructions are good for e-mails with attachments. (In my case, I want to associate a .jpg attachment with GIMP.) I am using Slackware 13.37 with KDE 4.5.5 and Firefox 13.

1) When clicking on the .jpg attachment, a window pops up.
2) I selected the option Open With and clicked on the Browse button.
3) On the next pop-up window, I selected File System in the left column.
4) In the right column I selected usr and then bin.
5) In the right column I selected gimp-2.6 and then clicked the Open button.
6) I put a check mark in the Do this automatically for files like this from now on statement and clicked the
Ok button.

With Slackware 13.37, the next time that I click on a .jpg file (as an attachment to an e-mail), the initial pop-up window will still appear but all I have to do is click on the Ok button and GIMP will launch.

I was taking a look at openSUSE 12.1 with KDE 4.7.2 and the process of associating files with a specific application appears to be different --and easier! But I have not investigated it.


All times are GMT -5. The time now is 08:27 PM.