If ispell-wrapper keeps picking the wrong language for you, select-default-iwrap lets you set a personal default without touching the system-wide one. The choice lands in ~/.ispell-default, so it needs no root and affects only your account. Allow about five minutes, plus a little longer if you first need to work out which dictionary you actually want.
This guide follows select-default-iwrap from dictionaries-common 1.29.7, installed on the reference system. The local manual page is dated 7 September 2023 and documents a command with no options: it starts the selection process and writes the chosen value to your home directory.
Check that the command is available. This is a read-only step and needs no elevated privileges:
$ command -v select-default-iwrap
/usr/bin/select-default-iwrap
$ dpkg-query -W -f='${Package} ${Version}\n' dictionaries-common
dictionaries-common 1.29.7
Checkpoint: If command -v prints nothing, stop here. The command belongs to the dictionaries-common package; installing packages is outside this per-user configuration task, so use your normal package-management process first.
Before changing anything, see whether you already have a personal choice. This does not invoke ispell and does not alter the file:
$ if test -e "$HOME/.ispell-default"; then
> printf 'current user setting: '
> cat "$HOME/.ispell-default"
> else
> echo 'no per-user setting'
> fi
ispell-wrapper falls back in a documented order: an explicit language option, then the ISPELLDEFAULT environment variable, then this user file, then the system-wide file at /etc/dictionaries-common/ispell-default.Run the command as the account that will use ispell-wrapper:
$ select-default-iwrap
The program displays the available ispell dictionaries as numbered choices. Select the number for the language you want, then submit it at the prompt. The command has no documented flags, so do not append a guessed language name or a --help option as part of this workflow.
This is an interactive terminal operation. Piping a number into standard input is not a reliable shortcut, because the installed selector reads the terminal for its choice. If you are connected through a restricted session with no usable terminal, run it from a normal interactive shell instead.
There is no sudo in this step. Running it as root would select a setting for the root account, not yours, and may write to the wrong home directory.
After the selector returns, check that the user file now exists and contains a value:
$ test -s "$HOME/.ispell-default" && {
> printf 'saved user setting: '
> cat "$HOME/.ispell-default"
> }
saved user setting: SELECTED_LANGUAGE
Replace SELECTED_LANGUAGE in the example with the language value printed on your machine; the exact spelling and available choices depend on the dictionaries installed there. If the command says no ispell dictionary is installed, it returns without creating the user setting: install one through your normal administrator-approved process, then rerun the selector.
Checkpoint: A successful configuration has a non-empty ~/.ispell-default. A file that exists but is empty is not a useful selection. Do not hand-edit it to an unverified name: the wrapper matches the stored value against installed languages.
ispell-wrapper is the consumer of this setting. Use its dry-run mode with a real readable text file to inspect the command it would run without launching ispell:
$ ispell-wrapper --dry-run /path/to/readable-text-file.txt
... command for the selected language ...
The exact dry-run line depends on your installed dictionaries and the other wrapper configuration, so treat it as host-specific. Confirm it names the intended language or dictionary parameters. If ISPELLDEFAULT is set in your shell, it outranks ~/.ispell-default; check it with:
$ if test -n "${ISPELLDEFAULT-}"; then
> printf 'ISPELLDEFAULT=%s\n' "$ISPELLDEFAULT"
> else
> echo 'ISPELLDEFAULT is unset'
> fi
Unset or correct that environment variable in the shell, service, editor or login configuration that supplies it, if it is masking your new user choice. Do not remove a setting globally just to make one test pass.
If you selected the wrong language, rerun select-default-iwrap and choose again: that is the normal undo path and overwrites only your user selection. If you want to fall back to the higher-priority environment or system defaults, preserve the file before removing it:
$ mv -- "$HOME/.ispell-default" "$HOME/.ispell-default.backup"
$ test ! -e "$HOME/.ispell-default" && echo 'per-user setting removed'
per-user setting removed
Do not run the mv command if the first check showed that no file exists. The backup is your recovery copy: restore it with mv -- "$HOME/.ispell-default.backup" "$HOME/.ispell-default" if the fallback behaves unexpectedly. Removing the backup is optional and irreversible, so keep it until the wrapper has been tested.
select-default-iwrap is available from dictionaries-common 1.29.7 or a compatible release.~/.ispell-default exists and contains a non-empty selected value.ISPELLDEFAULT so an environment variable is not masking the user setting.ispell-wrapper --dry-run shows the expected language or dictionary parameters.