Page 1 of 2

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

Posted: Mon 26 Sep 2016, 00:58
by orrin
Is there any way to change the colors on the Terminal Emulator?
The blue is unreadable on my monitor.

Posted: Mon 26 Sep 2016, 01:20
by drunkjedi

Posted: Mon 26 Sep 2016, 03:27
by Flash
There's a much simpler way, but I can't find the file that needs to be modified. I've done it, years ago and it was easy to do.

Edit: Here you go:
http://www.murga-linux.com/puppy/viewto ... 148#797148
http://www.murga-linux.com/puppy/viewtopic.php?t=68624
http://www.murga-linux.com/puppy/viewtopic.php?t=48756

Posted: Mon 26 Sep 2016, 09:48
by Semme
Radky's Control all-the-way!

Posted: Mon 26 Sep 2016, 16:42
by orrin
Thanks guys, I will take a look as /root/.Xdefaults

Posted: Mon 26 Sep 2016, 17:15
by orrin
I changed the forground/background to:

urxvt.foreground:yellow
urxvt.background:#494949
urxvt.underlineColor:ffff00000000

It looks better, but the filenames with the ls command are still
the unreadable blue!

I saw no options to change that in /root/.Xdefaults.

What is underline color and why does it have 12 digits rather than the usual 6 to defime a color in hex?

Posted: Mon 26 Sep 2016, 17:44
by drunkjedi
That's because 'ls' command is actually an 'alias' of 'ls --color'.
You can remove the alias.
Or I believe you can set color of ls commands with LS_COLORS= option in config file.
But I am not sure.
Please google.

Posted: Mon 26 Sep 2016, 18:02
by Sailor Enceladus
orrin wrote:and why does it have 12 digits rather than the usual 6 to defime a color in hex?
I guess 16 million colors was not enough so it lets you have 281 trillion. :lol:
drunkjedi wrote:That's because 'ls' command is actually an 'alias' of 'ls --color'.
You can remove the alias.
Or I believe you can set color of ls commands with LS_COLORS= option in config file.
But I am not sure.
Please google.
Nice find drunkjedi. I tried ls --color=never and that restored it to white/default (typing /bin/ls worked too).

Posted: Mon 26 Sep 2016, 20:17
by april
In case you want to put it back
alias ls='ls --color=auto'

Posted: Mon 26 Sep 2016, 20:52
by orrin
Does anyone know where the DIR_COLOR config file is located in
Slacko 64-6.3.2 ??

Using echo $LS_COLORS, I found that the only colors that are set are bd=33 & cd=33 so that dark blue for directories (di) must be a default.

UPDATE:

I found the colors are set in /etc/profile
I added di=32 and now the directories display as a very readable green!

Posted: Tue 27 Sep 2016, 03:47
by Flash
What kind of sadistic psychopath made dark blue letters on a black background the default configuration? :lol:

Posted: Tue 27 Sep 2016, 04:12
by drunkjedi
Lol Flash.

Orrin, thanks for sharing your findings, will look at it later.
Mark this topic as solved if you feel so.

Posted: Sun 13 May 2018, 20:31
by takenp
thank you orrin, finally have changed that awful blue color for dirs )
to =96

Posted: Mon 14 May 2018, 01:12
by musher0
Hello, orrin and all.

This is what I have in my .Xresources:

Code: Select all

!!!!!!!!!!!!!!!!!!!!!!!!
! Couleurs de la console ! composite par moi
! Inspiré de : https://wiki.gentoo.org/wiki/Rxvt-unicode
! Relevé le 2017-11-19 à 03h15
*background: #0f0f0f
*foreground: #c8c8c8

!black
*color0:  #251f1f
*color8:  #5e5e5e
!red
*color1:  #eb4509
URxvt*color9:  #FF5454
!green
*color2:  #94e76b
URxvt*color10: #54FF54
!yellow
*color3:  #ffac18
URxvt*color11: #FFFF54
!blue
*color4:  #46aede
URxvt*color12: #5454FF
!magenta
*color5:  #e32c57
URxvt*color13: #FF54FF
!cyan
*color6:  #d6dbac
URxvt*color14: #54FFFF
!white
*color7:  #efefef
URxvt*color15: #FFFFFF
The inspiration came from:
https://wiki.gentoo.org/wiki/Rxvt-unicode

As you can see below in Pic 1, the < ls > listing is still blue, but much
paler, so more readable.

~~~~~~~~~~

Also here are a few lines concerning "color" when you type
< urxvt -help > in console. They override the settings in .Xresources or
.Xdefaults.
-/+ip or -/+tr turn on/off inherit parent pixmap [In other
words, -tr and -ip allow you to have a transparent urxvt console.]

-tint color tint color
-sh number shade background by number %.
-blr HxV gaussian blur radii to apply to the root background [seldom used]
-fade number fade colors by number % when losing focus
-fadecolor color target color for off-focus fading

-bg color background color
-fg color foreground color
-hc color highlight color
-cr color cursor color
-pr color pointer color [this one and the following are useful...]
-pr2 color pointer bg color [... to increase the contrast of the pointer]
-bd color border color [of course -b width number has to be there as well
otherwise -bd is meaningless.]
If your urxvt has been perl-enabled at compilation time, you can also
color the "tab line" on top of urxvt proper (below the title bar provided by
the WM) through the following settings:
-tab-bg colour tab background colour (-pe tabbed)
-tab-fg colour tab foreground colour (-pe tabbed)
-tabbar-bg colour tab bar background colour (-pe tabbed)
-tabbar-fg colour tab bar foreground colour (-pe tabbed)
These settings are used like so:

Code: Select all

urxvt -bg Sienna4 -fg cornsilk -tr -sh 89 -tint green -fade 78 -fadecolor white -hc blue -cr yellow -pr red -pr2 white -b 20 -bd bisque -sr
(Q.v. pic 2)

In the above one-liner, I used "named" colors available in file
/usr/share/X11/rgb.txt, but I could as well have used any traditional hex
color instead, such as #FFFFFF for white, #FFE4C4 for bisque, etc. The
gcolor2 utility is a good source to find -- and refine -- hex colors.

Please note that I now routinely install and use urxvt-9.22 in all my
Puppies. If you have a lesser version of urxvt, such as the version from
2008 that most Puppies come with, the "fade" settings will not be
available. (Also the -icon setting will not be available. Customized urxvt
icons are beyond the scope of this thread, but I thought I should mention
it anyway.)

~~~~~~~~~~

Finally, ANSI-colors can be used in any console. This means that you can
use a variety of additional colors, plus bold, italics, reverse colors, blinking,
etc, to spice up your prompts or console texts. Here are a few references
for ANSI-codes:
http://pueblo.sourceforge.net/doc/manua ... codes.html
https://en.wikipedia.org/wiki/ANSI_escape_code
http://ascii-table.com/ansi-escape-sequences-vt-100.php

To learn more about ANSI Escape codes, you could go, for example, to
http://www.dogpile.com/info.dogpl.rss/s ... ANSI+codes
or to any good search engine, and take it from there.

For the record, an ANSI code is written thus in a script:

Code: Select all

echo -e "\e[34mHi there!\e[0m"
That is: "backslash e forward bracket color number m" to set a color on
before the text, and "backslash e forward bracket zero m" to turn any
ANSI code off. Of course no spaces between the commands, because
that's what they are: ANSI commands.

I mention it because not all ANSI docs explain how to achieve good
results in Linux bash.

IHTH.

Posted: Mon 14 May 2018, 11:13
by musher0
Hello all.

I have just corrected a few small errors in my post above. Everything in it
should now be kosher. Thanks for your understanding.

BFN.

Posted: Mon 14 May 2018, 23:56
by tallboy
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

Posted: Tue 15 May 2018, 00:25
by a_salty_dogg
tallboy wrote: Probably the same guy who used yellow on white in Xenial...
Neon yellow on light blue default # in 7.06... even better! :roll:

Posted: Tue 15 May 2018, 03:43
by musher0
Quick solution:
Right-click on the console icon.
In 2nd line type:
-fg black
Save.

Re-click on the console icon. What do you see?

Posted: Tue 15 May 2018, 04:25
by drunkjedi
Radky's urxvt control app I linked earlier works in all pups I tested.
I even use it in Fatdog64.
Works nicely.

Posted: Tue 15 May 2018, 05:36
by musher0
Hi drunkjedi and all.

Except radky's a lazy man's tool. You do not learn anything about
configuring urxvt when you use the radky tool. (With all due respect
to radky.) And the changes you do with it are permanent.

Whereas you can have a host of terminals for every need: long
terminals to read text, large terminals to process databases or diff's,
bland or multi-colored terminals, even configure a tiny one as a straight
launcher and another one to drop down from the top of the screen "a la
Kuake" (with some help from wmctrl), by manipulating the settings
directly, as I explained a couple of posts up.

It's hurrah for the radky solution and shoo for the musher0 solution, or
am I getting this wrong? Why is this starting to look like discrimination?

Or is it plain old ignorance?

I summarized five years of experience with urxvt terminals in that post.
It took me over two hours to write it. "Thank you's" are the only salary
you get for contributing tutorials to Puppy Linux. A simple "Thank you"
would have been nice. One "thank you", just one, would have made me
feel like it was worth it.

Or everybody here forgot their good manners all at the same time? Hey,
if you don't want me to share my experience with you, some people
elsewhere will be glad to take it in.

BFN.