In GNOME terminal, you reach it through the Application menu along the top of the screen or in the right corner of the window. In Preferences, click the plus symbol (+) next to Profiles to create a new theme profile. In your new profile, click the Colors tab.
“tput setaf” sets foreground color, “tput setab” sets background color, and “tput sgr0” resets all the settings to terminal default. There are 8 standard colors encoded in numbers from 0 to 7 (in order: black, red, green, yellow, blue, magenta, cyan, white).
you can use setterm like this
setterm -term linux -back blue -fore white -clear
Assuming you know what profile you want before you open your terminal:
Right-click on your Panel and "Add to Panel" and add a custom application launcher
You can define position, size and profile (which takes care of colours, fonts, etc)
gnome-terminal --hide-menubar --geometry 115x40+0+0
gnome-terminal --window-with-profile=logs --hide-menubar --geometry=144x15+0-55
"man gnome-terminal" has lots of useful information
try the following command from a desktop launcher:
gnome-terminal --window-with-profile=site2 -x ssh site2
Using -x ssh
means that the terminal will only be active on the remote site, so completely removing the possibility of typing a command on the wrong machine because you've exited from a terminal command line ssh.
You want to use gconftool.
Gnome holds its settings in a hierarchy similar to the Windows Registry. Once you know the path to the item you want to change you can set that item's value with gconftool from the command line.
Use gconf-editor to browse through the Gnome settings.
Use gconftool to set the value of an item in your script.
In your case, you want to do the following:
gconftool --type string --set /desktop/gnome/background/primary_color "#dadab0b08282"
Obviously you'll want to replace that color value with whatever color you want.
1) Create a terminal profile with the color and settings you desire, and call it "myGterm"
2) Edit your .bashrc
file.
3) Add the following line:
alias Gterm='gnome-terminal --window-with-profile=myGterm'
4) Save and close .bashrc
5) Open a terminal and type:
$ Gterm
6) Voila!
I looked into it and it turns out this is not possible. I filed bug: http://bugzilla.gnome.org/show_bug.cgi?id=569869
gconftool-2 can get/set profile properties, but there is no way to script an existing, open gnome-terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With