3

Background

With previous GNOME Terminal releases updating the colour scheme was a breeze. Just 5 lines of code were enough to do the trick.

gconftool-2 -s -t bool   /apps/gnome-terminal/profiles/Default/use_theme_background false
gconftool-2 -s -t bool   /apps/gnome-terminal/profiles/Default/use_theme_colors     false
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/background_color     '#121212121212'
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/foreground_color     '#f1f1ebebebeb'
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/palette              '#484848483e3e:#dcdc25256666:#8f8fc0c02929:#d4d4c9c96e6e:#5555bcbccece:#93935858fefe:#5656b7b7a5a5:#acacadada1a1:#8f8f89897272:#ffff26267676:#b9b9fcfc3232:#fffff7f78080:#6b6be9e9ffff:#aeae8282ffff:#6b6bffffe4e4:#eaeaebebdada'

Now, with GNOME Terminal 3.14.2, which uses dconf, one has to run a script of more than 100 lines (here is a copy) that creates a new profile and does many things I have difficulties understanding.

Main question

I am wondering now if there is an analogous to my previous 5-line script for the new GNOME Terminal, and if not, why.

Secondary question

I run the script that takes care of everything, automatically, and I'd like to 'undo' what it has done, but I don't know what that is. I thought I could select the Default profile, in Edit / Preferences / Profiles, but there I could find only the profile created by the script.

So I've created a new one. Does this mean that there was no profile originally, or that the script has overwritten the Default one?

Side note

This answer is a step-by-step guide about both dconf and the older gconftool-2.

Experiments

I'm trying to make sense of this big script by running it on a mock user, so that the environment is still pristine.

I've noticed that there is no

/org/gnome/terminal/legacy/profiles:/

And all I can run is

colours@debian:~$ dconf list /org/gnome/terminal/legacy/
schema-version

What's happened to the Default profile I was previously able to tweak? O.o

OK, some more progress... By unticking the Use colours from the system theme I get to see a profile:/ and <profile id>. From there, I can change the background colour by dconf write, although it is still not clear how one gets the list of all available configurable parameters.

So, it looks like with the newer version of GNOME Terminal the Default profile is missing. Therefore, one needs first to create a profile in order to be able to modify the default appearance. This behaviour is new, and it created some confusion in my thought line.

The answer to my first question could hypothetically be:

  1. create a Default profile,
  2. apply the dconf settings,
  3. manually switch to the Default profile.

Let's see if I fix the point 3. with an automatic profile selection.

Atcold
  • 1,593
  • 2
  • 13
  • 21
  • @don_crissti, thank you for commenting. 1. I thought as well that I could simply use lines 59-67, but it did not work. 2. The OS (Ubuntu) was just freshly installed (on a VM), so... there is not much 'on my side'. But I will try again from scratch. Do you have any other suggestions about 1.? The script is still quite obscure for me... Sorry... – Atcold Nov 02 '15 at 15:37
  • @don_crissti, the *point* is that **before** I was in control of what was going on when I was modding my terminal and **now** there's a lot of stuff going on, and I have difficulties understanding it. – Atcold Nov 02 '15 at 20:18
  • @don_crissti, OK, will do. Thank you for mentoring. I'd never thought about creating a mock user. – Atcold Nov 03 '15 at 21:18
  • 1
    @don_crissti, of course, of course, I'm a 'good student'. I always do my homework and prepare a nice results write-up! :) – Atcold Nov 04 '15 at 22:57
  • @don_crissti, it looks like there is no default profile with the new *Gnome Terminal*. What I mean is that `/org/gnome/terminal/legacy/profiles:/` is missing at the beginning. So, there is no pre-existent profile. I'm updating my question... – Atcold Nov 13 '15 at 07:01
  • Actually, there is some sort of "empty profile" which is not accessible via `dconf` (definitely a bug). With a fresh user account, if you open a terminal (without touching the preferences or creating a profile) and run: `gsettings list-keys org.gnome.Terminal.Legacy.Profile:/` you'll get the full list of keys and you can even get their values with `gsettings get ...` Not sure whether they've missed something here or it's just "work in progress"... – don_crissti Nov 13 '15 at 12:18
  • @don_crissti, I `gsettings set org.gnome.Terminal.Legacy.Profile:/ use-theme-colors false` (and I can correctly see it with `get`), but nothing chances. If I go `Edit -> Profile Preferences -> Colours`, then the tick on *Use colours from the system theme* is still there... I don't know what to do... I feel dumb :( – Atcold Nov 18 '15 at 00:06
  • Yeah, as I said it's most likely a bug or something they've overlooked...just ignore that. Check for a "default" profile (not the "ghost profile" mentioned in my above comment) and if you can't find one just create one. Then create your "special colors profile" etc... – don_crissti Nov 18 '15 at 00:14
  • OK, I see. **I have to create a new profile**, because no longer there is a `Default` profile. And I think this almost answers my question. Minimal script: (1) creation of new profile, (2) apply new settings, (3) switch to new profile. Before I could simply do (2). OK. I hope I got it right this time. – Atcold Nov 18 '15 at 00:18

0 Answers0