[SOLVED] Customize gnome-terminal

Issues related to applications and software problems
Post Reply
erbr
Posts: 6
Joined: 2017/12/06 14:18:29

[SOLVED] Customize gnome-terminal

Post by erbr » 2018/02/13 08:56:01

Hi,
Im trying to change the default encoding, from UTF-8 to ISO-8859-15, in gnome-terminal for all users on a Centos7 computer but it will not work.
I have used the following methods, do you have any idea how to solve this?

In dconf-editor, I set a custom value and set "Use default value" to off:
/org/gnome/terminal/legacy/encodings

Created a file with the correct ISO in /etc/dconf/db/local.d/ and then excecuted dconf update

With gsettings:
gsettings set org.gnome.Terminal.Legacy.Settings encodings "['ISO-8859-15']"

Please help :)
Last edited by erbr on 2018/02/13 14:03:22, edited 1 time in total.

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: Customize gnome-terminal

Post by pjsr2 » 2018/02/13 09:55:41

Why do you want to change the character encoding to anything other than UTF-8? Everything in your system is using UTF-8.

If changing to ISO-8859-15 is your solution to a problem, be aware that this solution may create more problems than it solves.

erbr
Posts: 6
Joined: 2017/12/06 14:18:29

[SOLVED] Re: Customize gnome-terminal

Post by erbr » 2018/02/13 13:45:04

I solved it like this:

With dconf:
[org/gnome/terminal/legacy]
schema-version=uint 32 3
encodings=['ISO-8859-15']

and I also have to run the following command for each user (created a file in /etc/profile.d/script.sh:

gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \')/ encoding 'ISO-8859-15'


@pjsr: I know but we have a system that cant use UTF-8. In this case we solve it with the settings described here.

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: [SOLVED] Customize gnome-terminal

Post by pjsr2 » 2018/02/13 15:56:33

Putting the gsettings command in a script in /etc/profile.d makes that it as executed in every shell, even when you are not in a Gnome desktop.

You could put it in a .desktop file in /etc/xdg/autostart, so it is only executed when the user starts the graphical desktop session.

Post Reply