1

I try the following the prescriptions of this answer : How to change Gedit embeded terminal plugin colors?

I used them successfuly with ubuntu 14.04 and gedit 3.10.1, without clearing the palette.

With 16.04 and gedit 3.18.3, it doesn't work.

I try to clear the palette clear. There is allways an error message if the argument is totally black.

[] is accepted, but the colors are not changed.

Any help ?

Something similar here, without answer : https://stackoverflow.com/questions/37795936/not-able-to-clear-palette-settings-for-gedit-terminal-plugin-in-dconf-editor-ub

Tarass
  • 251

1 Answers1

1

From the source code of the gedit terminal plugin (/usr/lib/x86_64-linux-gnu/gedit/plugins/terminal.py) it seems the settings are read from /org/gnome/terminal/legacy/profiles first. On my machine (Ubuntu 16.04) there is some key group containing only the two values "scrollback-unlimited" and "use-theme-transparency". The keys "foreground-color", "background-color" and "palette" were missing from the default profile.

The terminal plugin assumes incorrectly that all required keys are present if you create a new profile from gnome-terminal. To enforce complete key creation you need to switch back and forth between different palette settings and I also had to create two profiles and switch "Edit/Preferences/Profiles/Profile used when launching a new Terminal" back and forth as well (this ensures that the key org.gnome.terminal.legacy.profiles/default is set).

However, I think that settings under "org.gnome.gedit.plugins.terminal" should have precedence over the system settings concerning the terminal plugin in gedit. The user may want one color scheme for the system terminal and a different one for the terminal plugin.

So finally I changed the python script function get_profile_settings back to how it was in previous Ubuntu versions (just added the comment #) and got the desired result.

def get_profile_settings(self):
#        profiles = self.settings_try_new("org.gnome.Terminal.ProfilesList")
#        if profiles:
#            default_path = "/org/gnome/terminal/legacy/profiles:/:" + profiles.get_string("default") + "/"
#            settings = Gio.Settings.new_with_path("org.gnome.Terminal.Legacy.Profile",
#                                                  default_path)
#        else:
        settings = Gio.Settings.new("org.gnome.gedit.plugins.terminal")

        return settings