PDA

View Full Version : [ubuntu] setterm settings not 'sticking'



mikeh123
May 2nd, 2008, 04:57 AM
hi,
just a small thing, i want to be able to set the foreground colour of a terminal to red when ssh ing to other machines (just as a warning to myself not to muck about too much).


setterm -term linux -foreground red

works for the next command, but then reverts immediately back to the default profile. anyone know how to make this stick so it lasts for the session, so i can ssh in, set the color, then when exit, reverts back ? i don't want to change the .bashrc or .bash_profile on other machines on the network just for this.

this does what i want, but of course in a new xterm window.


xterm -fg red -e ssh peters@168.192.2.50 &

cheers,
mike.

jshears
February 17th, 2009, 09:16 PM
Guess the reply to this is a little late, but for the benefit of anyone else reading this... you must use the -store option with setterm in order to make the settings "stick"

for example:

setterm -term linux -background black -foreground green -store

will change the terminal to black background and green text and store the settings for the duration of the session. :D

henriquemaia
October 30th, 2010, 12:36 PM
Guess the reply to this is a little late, but for the benefit of anyone else reading this... you must use the -store option with setterm in order to make the settings "stick"


Well, your reply was still very useful to me, so thanks a lot.

How do I make the changes permanent reboot-wise?