Hi all,
what I'm trying to do is swittching to a different gnome-terminal profile when doing "su" or "su -".
What I also want to do is reverting back to the previous profile when exiting from su.
I've tried many different things:
1) using the setterm command. This is nice, but only works with 8-bit colors, right? I want the fancy 32-bit colors gnome-terminal appearance.
2)setting the PS1 environment variable: same as above
3) using the gconftool-2 command. This is the most attractive way but a bit cumbersome:
as far as I've seen the current tab/window profile is not stored anyway, so I have to write a script with gnome-terminal --save-config=FILE | grep ProfileID in order to know what the current profile is,
backup the current profile gconf keys with gconftools-2 --dump
use gconftool-2 --set and change the colors in this way
so far it's quite ok. But then how can I revert back to the previous profile? a gconftool-2 from the new shell is not going to work (I guess because gconfd is not runnig for the new (super)user.
Does anyone have any suggestion for all this?
Regards,
w.