Home » Questions » Computers [ Ask a new question ]

change konsole-profile according to application in KDE

change konsole-profile according to application in KDE

Using the Konsole terminal-emulator with KDE on Kubuntu 9.10 , I would like to have a different konsole profile (colors, icons) whenever I ssh into a server, so I can easily spot in which konsole tab i'm on the local machine and which i'm on the remote server. I have the different profiles set up, as for now I change that profile manually from the gui ...

Asked by: Guest | Views: 250
Total answers/comments: 2
Guest [Entry]

The way to go is to alter the bashrc on the remote server, and set there a different text color.
Guest [Entry]

"The best way I have found is to create bash aliases to connect the servers. For example:

alias resetcolors=""konsoleprofile colors=Local""
alias ssh-saturn=""konsoleprofile colors=SaturnColors; ssh -X saturn; resetcolors; echo 'Welcome back'""'!'

Where saturn is the name of the server, SaturnColors is the desired profile when connected to the server, Local is your default color scheme for your localhost, and -X is whatever ssh flags you want to use. Now, when you type ssh-saturn, the konsole colors will change and you will connect to the server, after which, your color scheme will be reset (and receive a welcome back message).

This assumes that you have setup ssh keyless login."