Change terminal colors when connecting to remote server, Linux

6

2

I have a habit of changing the terminal background to another color scheme when connected to a remote server. This prevents lots of theoretical, unfortunate mishaps.

Is there a way to change the desktop background automatically, preferably to a color different color scheme for each server? I use konsole, but willing to change a terminal emulator for this feature.

Thanks,

Udi

Adam Matan

Posted 2009-09-01T15:47:43.250

Reputation: 5 930

I'm a bit confused - do you want to change the terminal background or the desktop background? – None – 2009-09-01T16:46:47.500

I upvoted this because it's a great technique and something I already do... in fact I use unique colors using the prompt command for each server... the prompts are the same, but the colors i type in and the base color is different for each of my servers. it's the easiest way of looking at a terminal withouth having to read anything (even a title bar or prompt) and KNOW FOR SURE, which server you're connected to. – Joshua K – 2009-10-24T05:01:38.377

Answers

4

Hm, changing background colors could get messy, but changing the color of the prompt when you login to your remove server should be easy. Just add it to your .bashrc file.

jweede

Posted 2009-09-01T15:47:43.250

Reputation: 6 325

2

I like that idea: you could have a bright red background like this one: http://hardlosers.r09.railsrumble.com/permalink/44

– Doug Harris – 2009-09-01T18:24:08.240

0

You could make a different terminal profile for each server, and use a different color scheme for each. This would require you to start a new terminal for each new connection, instead of just using ssh in an existing one.

Ryan C. Thompson

Posted 2009-09-01T15:47:43.250

Reputation: 10 085