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

Booting, installing, newbie
Message
Author
orrin
Posts: 140
Joined: Tue 06 Sep 2016, 01:09
Location: sparks, NV
Contact:

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

#1 Post by orrin »

Is there any way to change the colors on the Terminal Emulator?
The blue is unreadable on my monitor.
Attachments
Screenshot.jpg
(18.76 KiB) Downloaded 712 times

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

#2 Post by drunkjedi »


User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#3 Post 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

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#4 Post by Semme »

Radky's Control all-the-way!
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

orrin
Posts: 140
Joined: Tue 06 Sep 2016, 01:09
Location: sparks, NV
Contact:

#5 Post by orrin »

Thanks guys, I will take a look as /root/.Xdefaults
[color=#FF0000]Engineer/Photographer/Webmaster[/color]
[img]https://i.postimg.cc/fL9MypfV/sig-image.png[/img]

orrin
Posts: 140
Joined: Tue 06 Sep 2016, 01:09
Location: sparks, NV
Contact:

#6 Post 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?
[color=#FF0000]Engineer/Photographer/Webmaster[/color]
[img]https://i.postimg.cc/fL9MypfV/sig-image.png[/img]

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

#7 Post 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.

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#8 Post 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).

april

#9 Post by april »

In case you want to put it back
alias ls='ls --color=auto'

orrin
Posts: 140
Joined: Tue 06 Sep 2016, 01:09
Location: sparks, NV
Contact:

#10 Post 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!
[color=#FF0000]Engineer/Photographer/Webmaster[/color]
[img]https://i.postimg.cc/fL9MypfV/sig-image.png[/img]

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#11 Post by Flash »

What kind of sadistic psychopath made dark blue letters on a black background the default configuration? :lol:

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

#12 Post by drunkjedi »

Lol Flash.

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

User avatar
takenp
Posts: 101
Joined: Wed 05 Aug 2015, 23:27
Location: Moskva
Contact:

#13 Post by takenp »

thank you orrin, finally have changed that awful blue color for dirs )
to =96

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

#14 Post 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.
Attachments
green-transparent-terminal.jpg
(Pic 2) Result of the urxvt one-liner above.
(217.13 KiB) Downloaded 382 times
ls-listing-blue.jpg
(Pic 1) ls listing with the &quot;new&quot; blue.
(214.65 KiB) Downloaded 395 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#15 Post 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.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#16 Post 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
True freedom is a live Puppy on a multisession CD/DVD.

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

#17 Post 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:
Attachments
capture30601.png
(3.03 KiB) Downloaded 317 times

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

#18 Post 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?
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#19 Post by drunkjedi »

Radky's urxvt control app I linked earlier works in all pups I tested.
I even use it in Fatdog64.
Works nicely.

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

#20 Post 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.
Attachments
terminals-menu.jpg
(45.55 KiB) Downloaded 321 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply