Silverblue: customizing gsettings for flatpak gnome-text-editor

Hello there

On fedora workstation, one can enable vim-style keybindings in gnome-text-editor with the following command:

gsettings set org.gnome.TextEditor keybindings vim

This does not work on silverblue and has no effect:

❯ gsettings set org.gnome.TextEditor keybindings vim
No such schema “org.gnome.TextEditor”

So I tried shelling into the text editor sandbox, but that was not effective either

❯ flatpak enter org.gnome.TextEditor bash
bash-5.2$ gsettings set org.gnome.TextEditor keybindings vim
No such schema ?org.gnome.TextEditor?

How can I edit the settings for this sandboxed app? Preferably, by having the flatpak use my global dconf settings db

1 Like

You’ll probably want to ask that to the upstream developers directly: Issues · GNOME / gnome-text-editor · GitLab

Try using: flatpak run --command=/bin/bash org.gnome.TextEditor

3 Likes

That did it, thanks.

❯ flatpak run --command=/bin/bash org.gnome.TextEditor
bash: starship: command not found
[📦 org.gnome.TextEditor ~]$ gsettings set org.gnome.TextEditor keybindings vim
[📦 org.gnome.TextEditor ~]$ 
exit
1 Like

For anyone else interested, this is how you can automatically run multiple commands inside the sandbox. Once the commands are run, it automatically exits the sandbox.

This is part of a script I have to set up Gnome.

echo "(
	gsettings set org.gnome.TextEditor show-line-numbers true
	gsettings set org.gnome.TextEditor spellcheck false
	gsettings set org.gnome.TextEditor restore-session false
)" | flatpak run --command=sh org.gnome.TextEditor
3 Likes

This is an alternate way of editing flatpak application settings

Flatpak application settings file for the TextEditor is located at:
~/.var/app/org.gnome.TextEditor/config/glib-2.0/settings/keyfile

In OP’s case, he would add

  • keybindings=vim

to the keyfile location above.

These changes are read instantly!

2 Likes