Change Gnome Terminal profile from CLI


is it possible to change the gnome terminal profile/theme by command line. I found explanations how to change the profile settings or even create a new one, but not how to switch the profile from command line.

I want to have different profiles for different users.

get profiles ID .

gsettings get org.gnome.Terminal.ProfilesList list

then examlpe :

gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:SET_PROFILE_ID_HERE/ cursor-background-color

real example :

gsettings get org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/ cursor-background-color

use set to change value and get to get value and list-recursively to list all key/value.

gsettings list-recursively org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/

I have old python script maybe it might help you a bit (google translate).

Thanks for your reply. But this only changes the settings of a profile. I want to switch between existing profiles.

you can change default profile and exit and run terminal again ,I don’t know another way .

gsettings set org.gnome.Terminal.ProfilesList default PROFILE_ID

1 Like