I have Windows XP and Kubuntu 12.04 on my desktop. I use Gmail and Yahoo mail through Firefox. If I get an attachment using XP, I know how to navigate to C:/Program Files/XYZ/xyz.exe to open the attachment, and tick the Firefox dialog box so that future Xyz files, will automatically open in Firefox. In Kubuntu, the same dialog box appears, but it is not clear how to navigate to the Linux eqivalent of xyz.exe. I have to save the file first, when it will be opened on clicking (provided I have first correctly set SystemSettings>FileAssociations). I would prefer to choose which attachments I save, so need to know the Kubuntu folder which corresponds to XP's "Program Files". and the file/extension equivalent of xyz.exe. Firefox's help menu doesn't seem to have this information.
Go to the Edit menu in Firefox and select Preferences. Then select the General tab at the top of the Preferences window. There is a section called Downloads, where you can set Firefox to download files to a specific folder, or have it ask every time where you want the file to download to. If you set it to ask every time, then when you try to download a file it will give you an option to either download the file or open it, and you can check a box to have Firefox default to whatever behaviour you choose.
Edit: I guess I misunderstood your question.
I guess you saying that xyz is the program that you want to use to open the file that you click on, and you are looking for the location of the executable file for xyz.
There are a few locations to find program files (binary files):
/bin, /usr/bin, /usr/local/bin are good places to start. There may be some other locations also. If you want to find a particular program you can type
whereis programname in a terminal and it will tell you where the binary files are. These do not have to have an extension as they do in Windows.