3

I'd like to change the background color of the Ubuntu terminal emulator to say, red. However, I want to do it using the commandline, like the Windows equivalent color 0F, since I'm making a program that has changing the background color as a core function and I don't really want it to rely on any dependencies, unless it is really necessary.

Regarding the comment saying there's already an answer to this:

The answer on the question requires a package in order for it to work. I need a way for it to work without a package.

tequila
  • 41

1 Answers1

1

below script is to change only the Default Profile terminal background color.

script:

#!/bin/bash

defaultprofile=$(gsettings get org.gnome.Terminal.ProfilesList default)
profileID=$(echo "$defaultprofile" | cut -d "'" -f 2)
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$profileID/ background-color yellow

enter image description here

dessert
  • 40,956