Open text file from motif app

Open text file from motif app

Post by ragini » Sat, 24 Apr 2004 08:20:56


Hi,

I have a motif application on linux, from which I want to open a text
file. I want this text file to be opened in gedit or kedit or any
other editor depending on the file association in the file manager.

Right now I am using the exec call and passing in the full path for
gedit. However, as I want this to run on any desktop environment
(gnome, kde,...) and I do not want to hard code this value.

Is there API which opens a text file, or any other better approach for
doing this?

Thanks,
Ragini.
 
 
 

Open text file from motif app

Post by wv955 » Sun, 25 Apr 2004 18:46:24


How about using the getenv("EDITOR") when you exec()