How to change colors of Urxvt Terminal Emulator? (Solved)

Booting, installing, newbie
Message
Author
musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#21 Post by musher0 »

This subject was discussed before.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
drunkjedi
Posts: 882
Joined: Mon 25 May 2015, 02:50

#22 Post by drunkjedi »

Ohh Hello musher,
I didn't post as a disrespect to you. I would never do that sir.
I just thought the takenp person who reopened the thread might be interested in quick tool that edits .xdefaults
Everyone isn't into learning manual ways.
I on other hand like it.
I did look at your way and will try when I get time.

Cya later.

User avatar
a_salty_dogg
Posts: 180
Joined: Sun 15 Dec 2013, 19:08

#23 Post by a_salty_dogg »

@musher0

Thanks but "-fg black" had no effect.
It's only the initial "root#" which displays in neon yellow anyhow; all the commands typed and all responses show in perfectly legible black, apart from that one item.

Xenial 7-06 already has Urxvt Terminal Control installed as standard, but it seems to offer no option to change colour of that "root#".

No worries anyway: tbh I always prefer to install and use Sakura, which I've always found far friendlier and more civilised than Urxvt.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#24 Post by musher0 »

Thanks for the thanks.

Then you could try

Code: Select all

-fg white -bg black
Now the yellow prompt should be against a black background.
OR
if your backdrop is dark rather than light, and you feel adventurous, you
could try

Code: Select all

-tr -sh 50 -tint SaddleBrown
This will let the dark color of your backdrop show through as the
background of your console, with a brown shading of 50 %. You can
change "SaddleBrown", if you don't like brown, to "CadetBlue" or
"VioletRed4", or any other named color listed in file /root/.rgb.txt.

Also, you can try a "solarized" effect if you push the shade (-sh) over 100.
-sh can go from 0 to 255, but at very high levels it tends to blur everything
with the -tint color. (Please see attached pic.)

~~~~~~~~

In any case, basic ANSI foreground colors are as follows:
[30m -- set foreground color to black
[31m -- ... red
[32m -- ... green
[33m -- ... yellow
[34m -- ... blue
[35m -- ... magenta (purple)
[36m -- ... cyan
[37m -- ... white
Source: http://pueblo.sourceforge.net/doc/manua ... codes.html

I don't know Sakura, but I know that LxTerminal picks up the same
prompt -- and colors in the prompt -- as urxvt. So perhaps you would
have the same contrast problem in Sakura.

If so, may I suggest that your have a look at your /root/.bashrc file, if it
has a "PROMPT" or "PS1" string in it (usually towards the bottom). Now,
within the "PROMPT" or "PS1" string, look for an expression "[33m". That
would be your annoying yellow color. You could change it to any other
thirty-something number except 36 or 37 to get proper contrast, as per
the ANSI color table above.

IHTH.

~~~~~~~~~~
P.S. The formulas for the prompt in the attached console pic are:
PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-10}; else CurDir=$DIR; fi';titlebar="\D{Le %A %d %B %G, %r}"
PS1="Croyez pour être forts; aimez pour être heureux. \e[1;36m(Hugo)\e[m | \D{%a %d %b, %R}\n[\$CurDir]>"
Not from me, BTW (except choice of motto), but I lost the ref., sorry.
Attachments
solarized-urxvt.jpg
Recipe for this one is:
urxvt -bg #271F0C -fg black -bd #BDBDBD" -tr -tint AntiqueWhite1 -sh 150
(155.16 KiB) Downloaded 244 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
a_salty_dogg
Posts: 180
Joined: Sun 15 Dec 2013, 19:08

#25 Post by a_salty_dogg »

Yep, you hit it spot on, changing 33m to 31m in PS1 string changed the "prompt" font to red instantly, much more tolerable to the eye, many thanks!

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#26 Post by musher0 »

Good to hear! My pleasure!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
a_salty_dogg
Posts: 180
Joined: Sun 15 Dec 2013, 19:08

#27 Post by a_salty_dogg »

Update - As you forecast, it also changed the "prompt" font colour in Sakura from its default green to red, but that's still very acceptable with the existing black background and white text foreground, so happy to live with that.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#28 Post by Mike Walsh »

Hi, tallboy/orrin/Flash et al.
tallboy wrote:
Flash wrote:What kind of sadistic psychopath made dark blue letters on a black background the default configuration?
Probably the same guy who used yellow on white in Xenial...

Orrin, follow the link supplied by drunkjedi in his post above:
http://www.murga-linux.com/puppy/viewtopic.php?t=97337
Dark blue on black (in Slacko); I believe that's like as not Mr. Amadio.....
And yellow on white (in Xenial).....I believe that's probably Mr. Broughton!

(Dearie me. Poor old Micko & Phil; they work themselves into a frazzle to bring you ungrateful heathens some of the most 'classic' Puppies you've ever seen......and all you lot can do is moan about the default terminal colors!! :lol:)

Only kidding.....

Actually, I'm glad I found this thread. I've finally been able to modify URXVT in Slacko 570 (been wondering how to do it for ages!); okay, the default's a reasonable white on black, but the font's a bit small.....and I do prefer yellow on dark blue, with a slightly larger italic font. (The old 'peepers' aren't improving with age; I'm getting this last few months so's I've bumped the DPI settings up one notch throughout the kennels. Don't see the point in squinting when I don't need to!) I did try Phil's URXVT settings .pet for it, but 570 uses the older urxvt, which doesn't respond to it (probably writes to a different location).

Menu->Graphic->GColorChooser2 gave me the hex values for the colours I wanted.....and Menu->Desktop->Font Manager let me get the font names and values correct for the fonts. And it's all worked nicely.


Mike. :wink:

Topoignaz
Posts: 3
Joined: Tue 08 Dec 2015, 00:37

Thank you, musher0!

#29 Post by Topoignaz »

musher0 wrote:
If so, may I suggest that your have a look at your /root/.bashrc file, if it
has a "PROMPT" or "PS1" string in it (usually towards the bottom). Now,
within the "PROMPT" or "PS1" string, look for an expression "[33m". That
would be your annoying yellow color. You could change it to any other
thirty-something number except 36 or 37 to get proper contrast, as per
the ANSI color table above.
Dark blue over black is not the most convenient combo on your terminal when you have eyesight issues. It comes with age, so I just revived this old account to thank musher0, who fixed my little problem.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#30 Post by musher0 »

My pleasure, Topoignaz! Glad I could be of help.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply