12

If I'm running gnome-terminal with multiple tabs open, is it possible to switch the profile of a given tab at the bash prompt, with instant effect, and without altering the profile of the other tabs?

I understand how to use gconftool or gconftool-2 to change elements of a profile (such as the background), but I don't know how to actually switch the profile for a specific tab or window.

Any advice is appreciated.

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
Hackett
  • 121
  • 1
  • 1
  • 3

4 Answers4

5

It does not answer your question in particular, but since it might help others, I leave it here regardless.

If there was a way to change the current profile, you could have different profiles for each tab.

You can list all existing profiles using:

gconftool-2 --all-dirs /apps/gnome-terminal/profiles

You can get the current profile using:

gconftool-2 --get /apps/gnome-terminal/global/default_profile

And you can set a new default profile (solarized-light in this case) using:

gconftool-2 --set --type string /apps/gnome-terminal/global/default_profile solarized-light
Igor Mikushkin
  • 1,250
  • 16
  • 25
blueyed
  • 27,102
  • 4
  • 75
  • 71
2

I think you can do this through gconf-editor which maintains the settings for everything in gnome. See the gconf-editor manual and section on gnome-terminal.

From the terminal, you can make changes with gconftool-2

Dana the Sane
  • 14,762
  • 8
  • 58
  • 80
  • 2
    Thanks for the response. I guess my issue is that if I use gconftool-2 to alter the background of 1 tab's profile, this affects the background of all the other tabs too. If I set each tab to use a different profile, then there's no way of each tab knowing which profile its on. A bit of a catch 22 :) – Hackett Mar 29 '09 at 12:48
  • This kind of thing seems lacking with gnome software, I heard a similar complaint about having separate desktop wallpapers. This might be something that will be fixed eventually due to demand though. – Dana the Sane Mar 29 '09 at 20:55
1

I'm working on something similar, I think it could help you to use gnome-terminal --help which will show you some commands you can use to open terminal with certain profiles you will need to figure out how to write the line at prompt to open with the tabs and profiles you want ....once you have the hard part figured out you can add the line to your bashrc

Run nano ~/.bashrc to open up the bash configuration file, which gets run every time you open a terminal. Then add the line to the bottom save and close.

jazzpi
  • 1,399
  • 12
  • 18
drew
  • 19
  • 1
0

Even though the question is about GNOME Terminal and the command line, it's worth knowing that MATE Terminal (a GNOME Terminal fork) allows profile switching via a simple keyboard shortcut.

santos
  • 79
  • 3