Coming from Windows background here.
Is it an acceptable practice for GUI Linux applications to store their data files (not user-specific) at hard-coded locations (e. g. /etc/myapp/stuff)? I couldn’t find any syscalls that would return the preferred directory for app data. Is there a convention out there as to what goes where?
Generally speaking, yes there is a convention. On most Linux systems, application configuration files are typically located at
/etc/appname/. You’ll want to consult the LSB (Linux Standard Base) and the Linux FHS (Filesystem Hierarchy Standard) for their respective recommendations.Also, if you are targeting your application towards a specific Linux distro, then that distro vendor probably has their own specific recommendations as far as packaging and related-conventions are concerned. You’ll want to look at your distro vendor’s developer pages for more information.