Skip to content

Config won't parse

Pluma exits right after start with a TOML error in the log.

The error to look for

tail -20 /tmp/pluma.log and look for lines like:

load config: toml: line N (last key "X"): <reason>

Three common reasons:

1. Duplicate key

toml: line 9 (last key "open_browser"): Key 'open_browser' has already been defined.

The TOML parser is strict — every key must appear at most once. Usually happens when:

  • You hand-edited a key that was already in the seed.
  • Pluma's upgrade pass appended a missing key, then you added the same key yourself later.

Fix:

grep -n open_browser ~/.config/pluma/config.toml

Should return at most one line. If you see two, delete one (keep the value you actually want).

2. Invalid value type

toml: line N (last key "encrypt_at_rest"): expected boolean, got string

A key got a value of the wrong shape. encrypt_at_rest = "true" (with quotes) is a string; TOML wants encrypt_at_rest = true. Same for arrays: card_dirs = "/foo" (string) instead of card_dirs = ["/foo"].

Fix: look at the line in question; match the type the config reference lists for that key.

3. Stray quote / brace / bracket

toml: line N: expected '=' or '\n', but got <character>

Manual edit slipped a typo. Open config.toml, look at line N, find the problem.

Quick recovery: regenerate

The seed is canonical. Move your broken file aside and let Pluma regenerate:

mv ~/.config/pluma/config.toml ~/.config/pluma/config.toml.broken
./pluma

Pluma writes a fresh config.toml with every option at its default + comments. Diff against your broken copy to retrieve the values you actually wanted:

diff ~/.config/pluma/config.toml{,.broken}

Re-apply your real settings to the fresh file.

Why duplicates happen

Pluma's upgrade pass (when the on-disk schema is missing a key the new build knows about) APPENDS the missing section with its seed comment. It doesn't deduplicate. So if you:

  1. Add open_browser = false to your config by hand.
  2. The upgrade pass runs and appends open_browser = true because it scanned for key = (with space) and your hand-edit was key=false (no space).

…you end up with two. Fixed in commit 1626bdf (the scan now ignores spacing), but old configs from before that fix can still have leftover duplicates. The dedupe is one-line:

awk '!seen[$1]++' ~/.config/pluma/config.toml > /tmp/dedup.toml && mv /tmp/dedup.toml ~/.config/pluma/config.toml

(But this loses comments. The "move + regenerate" recovery above is friendlier.)