associated file types

I have a file of type .for extension .In a guui based unix environment like solaris if I double click on that file a specific program designed by me has to run which takes this file as the parameter and exceutes the program.

Can anyone help me?

You have files with extension .for - are these fortran files? You state when you click on that file a program runs. What is your specific problem?

Help with what? What is your question?

I don't know the answer - but I think his question is:
how to create an association using his windowing system.

Also depends which Windowing system he's using, newer Solaris comes with both CDE and Gnome.

We need

  • A question
  • More information

Peace
ZB

i think he means an autorun like in windows:
douple click on the icon... file extension will be read and the preferd application will start dealing with that file...

like:
blabla.jpg --> paint
blabla.html --> browser
blabla.doc --> word

g P

thats what i think he means too. well it depends on what gui you are using. if you are using KDE then it has its own way of doing it, if you are using gnome it has ITs own way of doing it.

suggestion:

click on it as if you were opening it, what happens? does it ask you want you want to run it with? look in that box for something that says "always open with this" or something similar.

we need more info such as what gui you are using to give you a specific answer.

In windows afile type .txt is associated with notepad.exe.So when we double click the icon then notepad application opens.
In a similar way I have a file .for( user defined type)and I want to associate that file type to an application myapp.So when I double click this file in a solaris or gui based unix how i should do it.

There is no one single way to do it. There are different windowing systems. Each one requires different stuff.
I still don't know enough to answer.

Which specific windowing system do you want?

if you dont know what windowing system or complete desktop package you are using, try this, open up the default text editor, click on HELP at the top, then click on ABOUT.