I would like to make a C program (GTK) that reads a .desktop file. The only thing I need from the .desktop file is the exec command. Is there something built into GTK that would allow me to interact with .desktop files? Or do I have to use the standard file IO methods?
Read .desktop files programmatically
text processing;c;.desktop
GLib's GKeyFile class could be what you are looking for.