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