I'm using Gnome terminal and I want to change the background color or the profile through a command so I can group some commands in an alias to visually differentiate my windows when I run certain processes. I'm running Ubuntu, and bash is my shell. Are there commands in to do this?
Join Stack Overflow to learn, share knowledge, and build your career.
|
|
|
you can use setterm like this
|
|||||||||
|
|
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)
"man gnome-terminal" has lots of useful information |
||||
|
|
|
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. 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"
4) Save and close
6) Voila! |
|||||
|
|
try the following command from a desktop launcher:
Using |
||||
|
|
|
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. |
|||
|
|
|
To create 4 terminals with different backgrounds and titles you need to add the below lines to the .bashrc_profile file
add the below lines to file
close any open terminals you may have then re-open a new terminal and type 'term1' hit enter and repeat for all 4 now you have 4 unique terminals open! |
||||
|
|
|
I used to do this with command line arguments to xterm. I set up my .olvwm (am I dating myself) to execute 4 xterms with different background colours. |
|||
|
|
|
i have created some functions, based on github code from other threads. Sorry i don't remember. You can put these functions in your ~/.bashrc file As you can see, if you call "create_random_profile", First, it will check and delte any previous random profile you have created. Second, it will create a random name profile in gnome terminals. Third, it will set that name in an environment variable that you can use to change your color in predefined functions. See last function function setcolord(). This should be useful, to have many terminals with different colors. Besides, with predefined functions you can change these colors on the fly. Enjoy it!
By the way you can save time if you create the terminal using already the random. You can do that calling:
|
||||
|
|