https://bugs.kde.org/show_bug.cgi?id=496925
Bug ID: 496925 Summary: Sonnet does not find installed hunspell dictionaries on Nixos Classification: Frameworks and Libraries Product: frameworks-sonnet Version: unspecified Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: martin.sandsm...@kde.org Reporter: alister.h...@gmail.com CC: kdelibs-b...@kde.org Target Milestone: --- SUMMARY It seems that sonnet can only use hunspell dictionaries installed in certain hard-coded locations, and does not even look in $DICPATH. This means that hunspell dictionaries installed on platforms like NixOS or Guix are not available in KDE applications, although they work fine with hunspell itself and other applications that don't use sonnet, like firefox and mousepad, at least if $DICPATH is set. Ideally I think sonnet should use exactly the same logic to find hunspell dictionaries as the hunspell cli tool does. It should at least use $DICPATH if that is set, anyway. STEPS TO REPRODUCE 1. Install NixOS, including KDE, and a hunspell dictionary e.g.: environment.systemPackages = with pkgs; [ hunspellDicts.en_GB-ise kdePackages.sonnet ]; # allow Firefox etc to see our system dictionary environment.sessionVariables.DICPATH = "${pkgs.hunspellDicts.en_GB-ise}/share/hunspell"; services.desktopManager.plasma6.enable = true; services.displayManager.defaultSession = "plasmax11"; services.xserver.enable = true; 2. try calligrawords or some other KDE app and see spellchecking does not work. Look in the settings and see KDE thinks there are no available dictionaries. OBSERVED RESULT Sonnet cannot find any dictionaries, so there is no spellchecking in any KDE apps. Firefox, hunspell (cli tool), mousepad etc recognise the dictionary and spellchecking works. EXPECTED RESULT Sonnet should see the dictionary, and spellchecking should work in KDE apps. SOFTWARE/OS VERSIONS Operating System: NixOS 24.11 KDE Plasma Version: 6.2.3 KDE Frameworks Version: 6.8.0 Qt Version: 6.8.0 Kernel Version: 6.6.63 (64-bit) Graphics Platform: X11 ADDITIONAL INFORMATION This ticket at NixOS https://github.com/NixOS/nixpkgs/issues/14430 has a checkbox next to the action "fix sonnet: complain upsteam about them not obeying XDG Standard", but I couldn't find a relevant KDE ticket or anything, so I'm not sure how they "complained", and given how old the NixOS ticket is, it seemed worth filing this here. Note there is also mention there of $XDG_DATA_DIRS being relevant for enchant and firefox; I haven't tested to check that. Guix has a ticket at https://issues.guix.gnu.org/63934 I see years ago there used to be HUNSPELL_MAIN_DICT_PATH in the sonnet code, which I think might have allowed a custom location to be specified at build time, but that is gone now. -- You are receiving this mail because: You are watching all bug changes.