This forum has been archived. All content is frozen. Please use KDE Discuss instead.

CHANGING KONSOLE COLORS IN KDE USING THE SHELL

Tags: None
(comma "," separated)
ngotrungkien
Registered Member
Posts
1
Karma
0
The K Desktop Environment (KDE) includes a great terminal program called Konsole. Using Konsole you can access the Linux command line from within KDE. With Konsole you can change the background and foreground colors of your terminal window, and one of the best features is the ability to set the colors using the command line or Linux shell. This allows you to do some cool things like change the color scheme depending on the program you are running.
Changing the color scheme is as simple as typing:

konsoleprofile colors= ColorSchemeName
For example:

konsoleprofile colors=WhiteOnBlack
You can create your own custom color scheme by selecting Settings menu > Configure Profiles > choose “Shell” and click on “Edit” button > Appearance tab.
Image
Changing color scheme on a per program basis
Say you login to a remote server via SSH. It would be helpful if the color profile changed to reflect that you were actually logged into a remote server. You can do that with konsoleprofile.

First you setup a bash alias that resets the color profile to your default one:

alias resetcolors='konsoleprofile colors=WhiteOnBlack;'
Then setup aliases that change the color profile and log you into the remote server:

alias sshadmin =konsoleprofile colors =WhiteOnDarkBlue

Now if you type sshadmin the color scheme will be changed and you will be logged in via SSH. When you log out, the color scheme will reset back to the default!

This technique is especially helpful when you want to differentiate between different SSH accounts. For example if you are logged in as root you can have it change the background color to red so that you know you have to be careful what you type.
User avatar
Cat22
Registered Member
Posts
8
Karma
0
How do you change the background color (specifically its intensity) when text is highlighted? The current coloring in Konsole 21.04.0 (KDE 5.81.0 Plasma 5.21.5) has a very faint background color for highlighted text and I'd like to make it more visible by making the background color brighter.
User avatar
jboero
Registered Member
Posts
6
Karma
0
Cat22 wrote:How do you change the background color (specifically its intensity) when text is highlighted? The current coloring in Konsole 21.04.0 (KDE 5.81.0 Plasma 5.21.5) has a very faint background color for highlighted text and I'd like to make it more visible by making the background color brighter.


I've noticed this too. I played around with the profile color settings (Breeze theme) for a while but couldn't get it to work right even though I noticed the Green on White theme worked fine. Then I realized what's up: Highlight is the Foreground color but it can't be pure white. Anything that is full WHITE will be blended with the background color which is just plain stupid. If you make it just tiny bit OFFWHITE it will work fine and highlight is visible again.
User avatar
Cat22
Registered Member
Posts
8
Karma
0
I can't seem to get this to work.
In konsole i went to edit current profile and selected appearance. (I'm using Linux colors) and then Edit.
I changed the foreground->Intense color and the "color 8"->Intense color both to #f0f0e2 and and it didn't make any difference.
The background looks the same, even in a new konsole window
What am I doing wrong?


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]