I've been working on a Qt-based C++ program called RoboJournal. It uses Hunspell for spell-checking purposes. Right now, it automatically installs its own dictionary files (en_US.dic) into the user's home folder (i.e. ~/.robojournal/en_US.dic). This works fine as-is on OSes like Windows that provide no compatible dictionaries out of the box but there is a design problem I want to fix:
On Linux, there are several instances of en_US.dic (most notably in /usr/share/hunspell/en_US.dic) This copy is obviously meant to be shared between all programs that use Hunspell, which means that my program should use it if possible instead of relying on its own copy. However, the copy in /usr/share/hunspell/ requires superuser rights to modify; while this means that users may read from it they can't add words to it unless the program is running with superuser permissions or unless I chmod the file to allow everyone to write to it. This problem makes the /usr/share/hunspell/en_US.dic copy much less useful.
Is there a way for users to modify the /usr/share/hunspell/en_US.dic file without having superuser permissions or requiring them to chmod the file first? My Debian package maintainer said that my app should use global system resources whenever possible.