You are not logged in.

#1 2010-01-14 20:22:24

flo08
Member
From: Poland
Registered: 2010-01-10
Posts: 25

[SOLVED] No colors in urxvt, "alias" don't work

When I type "ls" then don't show me colors in the folders and files, but "ls --color" works correctly
It seems that the "alias" does not work in the urxvt, in an xterm, the terminator, roxterm colors are displayed correctly
What's wrong?
My config:

~/.bashrc:

alias ls='ls --color=auto'

~/.Xdefaults

! rxvt-unicode ---------------------------------------------------------------

! font preference
urxvt*font:      -*-terminus-*-*-*-*-*-*-*-*-*-*-*-*
urxvt*boldFont:  -*-terminus-*-*-*-*-*-*-*-*-*-*-*-*
!initial size
urxvt*geometry:           120x35
!internal whitespace
urxvt*internalBorder:     5
!fade text n% upon unfocus
urxvt*fading:             20
!darken=(0 to 100) lighten=(-1 to -100)
urxvt*shading:            30
!tint background with this color
urxvt*tintColor:          black
!set to 32-bit for real transparency (compositing required)
!urxvt*depth:             24
!save n lines of scrollback buffer
urxvt*saveLines:          32767
!flash screen for attention
urxvt*visualBell:         true
!jump to bottom (prompt) on keypress
urxvt*scrollTtyKeypress:  true
!jump to bottom (prompt) when tty gets new lines
urxvt*scrollWithBuffer:   false
!jump to bottom (prompt) on tty output
urxvt*scrollTtyOutput:    false
!toggle scrollbar
urxvt*scrollBar:          false
!scrollbar styles: rxvt, plain, next or xterm
urxvt*scrollstyle:        plain
!scrollbar alignment
urxvt*scrollBar_right:    true
urxvt*scrollColor:        #777777
urxvt*cursorColor:        #ffcc00
!is this a login shell?
urxvt*loginShell:         true
!set the TERM environment variable
urxvt*termName:           rxvt-unicode
!enable pseudo-transparency (requires depth: 24 (see above))
urxvt*inheritPixmap:      true
!delimiters for double-click mouse selection
urxvt*cutchars:           "()*,<>[]{}|'
!screen dump settings
urxvt*print-pipe:         cat > $(echo urxvt.dump.$(date +'%Y%M%d%H%m%S'))
!secondary screen scroll (default enabled)
urxvt*secondaryScroll:    true
!de-iconify (map) on receipt of a bell character
urxvt*mapAlert:           true
!inhibit writing record into the system log file utmp
urxvt*utmpInhibit:        true
!! BEGIN urlLauncher settings !!
urxvt*perl-lib:           /usr/lib/urxvt/perl/
urxvt*perl-ext-common:    default,matcher
urxvt*urlLauncher:        /usr/bin/firefox
urxvt*matcher.button:     1
!! END urlLauncher settings !!

!transparent=0000 opaque=ffff
urxvt*background: rgba:1111/1111/1111/dddd
The colors 0-7 are the 'normal' colors, while colors 8-15 are their 'bright' counterparts (used for highlighting, etc.)

! terminal colors ------------------------------------------------------------

! tangoesque scheme
*background: #111111
*foreground: #babdb6
! Black (not tango) + DarkGrey
*color0:  #000000
*color8:  #555753
! DarkRed + Red
*color1:  #ff6565
*color9:  #ff8d8d
! DarkGreen + Green
*color2:  #93d44f
*color10: #c8e7a8
! DarkYellow + Yellow
*color3:  #eab93d
*color11: #ffc123
! DarkBlue + Blue
*color4:  #204a87
*color12: #3465a4
! DarkMangenta + Mangenta
*color5:  #ce5c00
*color13: #f57900
!DarkCyan + Cyan (both not tango)
*color6:  #89b6e2
*color14: #46a4ff
! LightGrey + White
*color7:  #cccccc
*color15: #ffffff

/etc/DIR_COLORS

# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# Copyright (C) 1996, 1999-2009
# Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
# Below, there should be one TERM entry for each termtype that is colorizable
TERM Eterm
TERM ansi
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM console
TERM cygwin
TERM dtterm
TERM eterm-color
TERM gnome
TERM gnome-256color
TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mach-color
TERM mlterm
TERM putty
TERM urxvt
TERM urxvtc
TERM rxvt
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM screen
TERM screen-256color
TERM screen-256color-bce
TERM screen-bce
TERM screen-w
TERM screen.linux
TERM vt100
TERM xterm
TERM xterm-16color
TERM xterm-256color
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
DIR 01;34 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
 # numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
EXEC 01;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
# If you use DOS-style suffixes, you may want to uncomment the following:
#.cmd 01;32 # executables (bright green)
#.exe 01;32
#.com 01;32
#.btm 01;32
#.bat 01;32
# Or if you want to colorize scripts even if they do not have the
# executable bit actually set.
#.sh 01;32
#.csh 01;32
 # archives or compressed (bright red)
.tar 01;31
.tgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.lzma 01;31
.tlz 01;31
.txz 01;31
.zip 01;31
.z 01;31
.Z 01;31
.dz 01;31
.gz 01;31
.lz 01;31
.xz 01;31
.bz2 01;31
.bz 01;31
.tbz 01;31
.tbz2 01;31
.tz 01;31
.deb 01;31
.rpm 01;31
.jar 01;31
.rar 01;31
.ace 01;31
.zoo 01;31
.cpio 01;31
.7z 01;31
.rz 01;31
# image formats
.jpg 01;35
.jpeg 01;35
.gif 01;35
.bmp 01;35
.pbm 01;35
.pgm 01;35
.ppm 01;35
.tga 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35
.tiff 01;35
.png 01;35
.svg 01;35
.svgz 01;35
.mng 01;35
.pcx 01;35
.mov 01;35
.mpg 01;35
.mpeg 01;35
.m2v 01;35
.mkv 01;35
.ogm 01;35
.mp4 01;35
.m4v 01;35
.mp4v 01;35
.vob 01;35
.qt 01;35
.nuv 01;35
.wmv 01;35
.asf 01;35
.rm 01;35
.rmvb 01;35
.flc 01;35
.avi 01;35
.fli 01;35
.flv 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35
.yuv 01;35
.cgm 01;35
.emf 01;35
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axv 01;35
.anx 01;35
.ogv 01;35
.ogx 01;35
# audio formats
.aac 00;36
.au 00;36
.flac 00;36
.mid 00;36
.midi 00;36
.mka 00;36
.mp3 00;36
.mpc 00;36
.ogg 00;36
.ra 00;36
.wav 00;36
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axa 00;36
.oga 00;36
.spx 00;36
.xspf 00;36

Last edited by flo08 (2010-01-15 09:55:38)

Offline

#2 2010-01-14 22:44:18

mjheagle8
Member
From: /home/mjheagle8
Registered: 2009-07-12
Posts: 186

Re: [SOLVED] No colors in urxvt, "alias" don't work

try adding

URxvt*dynamicColors: on

to your ~/.Xdefaults


Desktop/Laptop - DWM :: VM - screen
Registered Linux User Number 483137 :: Victory! :: GitHub

Offline

#3 2010-01-14 23:11:36

flo08
Member
From: Poland
Registered: 2010-01-10
Posts: 25

Re: [SOLVED] No colors in urxvt, "alias" don't work

mjheagle8 wrote:

try adding

URxvt*dynamicColors: on

to your ~/.Xdefaults

nope. sad still no color

201001151280x800.th.png

Any idea?

Offline

#4 2010-01-14 23:17:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] No colors in urxvt, "alias" don't work

This may not be all that helpful - but it may rule out one (obvious) approach: try encasing the alias in double quotes

alias ls="ls --color=auto"

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2010-01-14 23:28:13

flo08
Member
From: Poland
Registered: 2010-01-10
Posts: 25

Re: [SOLVED] No colors in urxvt, "alias" don't work

jasonwryan wrote:

This may not be all that helpful - but it may rule out one (obvious) approach: try encasing the alias in double quotes

alias ls="ls --color=auto"

Nope. The same thing all the time sad All terminals without urxvt works correctly.

Offline

#6 2010-01-14 23:38:21

tlvb
Member
From: Sweden
Registered: 2008-10-06
Posts: 297
Website

Re: [SOLVED] No colors in urxvt, "alias" don't work

Some more suggestions that may help pinpoint where the problems lies:
$ ls --color=auto #If it works when explicitly typing it, it seems to be a problem with the alias
$ ls --color=always #If this works then it seems to be (from man ls) that the output from ls is not considered to be outputted to a terminal (i.e. auto is a mode that gives nice colour codes in the terminal, but strips the colour control characters when the output is piped to e.g. grep)
$ ls --color=always|hexdump -C #In the rightmost column, you should except for the directory names get a lot of stuff like .[01;34m (numbers and the amount of them will vary). These are the colour escape codes (the '.' is in this case really a '\x1b'), and it seems that ls is printing them, but they are not interpreted by the terminal.
I always find hexdump essential when I need to see what is actually outputed to the terminal. :)

Last edited by tlvb (2010-01-15 00:42:44)


I need a sorted list of all random numbers, so that I can retrieve a suitable one later with a binary search instead of having to iterate through the generation process every time.

Offline

#7 2010-01-14 23:40:32

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: [SOLVED] No colors in urxvt, "alias" don't work

Which rxvt are you using? Maybe try rxvt-unicode-256color from Community repo. Other than that, I'm not sure. I guess make sure you're in bash: ps p $$   ,also try typing: alias ls='ls --color=auto' directly into terminal and then try it again by typing: ls ,to see if the colors show up. EDIT: oops, tlvb beat me. tongue

Last edited by milomouse (2010-01-14 23:40:55)

Offline

#8 2010-01-14 23:54:12

flo08
Member
From: Poland
Registered: 2010-01-10
Posts: 25

Re: [SOLVED] No colors in urxvt, "alias" don't work

milomouse wrote:

Which rxvt are you using? Maybe try rxvt-unicode-256color from Community repo. Other than that, I'm not sure. I guess make sure you're in bash: ps p $$   ,also try typing: alias ls='ls --color=auto' directly into terminal and then try it again by typing: ls ,to see if the colors show up. EDIT: oops, tlvb beat me. tongue

Hmm When I type in urxvt

alias ls='ls --color=auto'

and next:

ls

I have colors but in already session terminal. When I reboot or open new window urxvt the problem returns.
it looks that the file ~/.bashrc don't cooperated with urxvt

I use:

rxvt-unicode 9.06-3

before I used rxvt-unicode-256color, but it was more the same

Last edited by flo08 (2010-01-14 23:58:43)

Offline

#9 2010-01-15 00:36:17

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED] No colors in urxvt, "alias" don't work

Silly question:
Is the alias ls='ls --color=auto' known at all to urxvt when you open a new one?
What does the alias command tell?


To know or not to know ...
... the questions remain forever.

Offline

#10 2010-01-15 00:46:46

flo08
Member
From: Poland
Registered: 2010-01-10
Posts: 25

Re: [SOLVED] No colors in urxvt, "alias" don't work

bernarcher wrote:

Silly question:
Is the alias ls='ls --color=auto' known at all to urxvt when you open a new one?
What does the alias command tell?

No. Alias is stored in the current window. In the new window, there's still no color.

as the image:
201001151280x800.th.png

Offline

#11 2010-01-15 00:48:58

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] No colors in urxvt, "alias" don't work

I think bernarcher wanted to know what happened when you issued the comand

alias

(as do I) smile


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#12 2010-01-15 00:57:23

flo08
Member
From: Poland
Registered: 2010-01-10
Posts: 25

Re: [SOLVED] No colors in urxvt, "alias" don't work

jasonwryan wrote:

I think bernarcher wanted to know what happened when you issued the comand

alias

(as do I) smile

Sorry. But
picture shows what happened after the command alias in two windows

201001151280x800.th.png

Last edited by flo08 (2010-01-15 00:59:04)

Offline

#13 2010-01-15 01:09:06

tlvb
Member
From: Sweden
Registered: 2008-10-06
Posts: 297
Website

Re: [SOLVED] No colors in urxvt, "alias" don't work

Does it help if you source .bashrc before the command?
Do you have a .bash_profile file? If not, echo . $HOME/.bashrc>$HOME/.bashrc and see if that helps, if the file is already present, check that it contains a reference to .bash_profile...

That might be it, for reference, see http://www.joshstaiger.org/archives/200 … le_vs.html

Last edited by tlvb (2010-01-15 01:11:21)


I need a sorted list of all random numbers, so that I can retrieve a suitable one later with a binary search instead of having to iterate through the generation process every time.

Offline

#14 2010-01-15 01:17:04

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] No colors in urxvt, "alias" don't work

According to the output of alias - you don't have any aliai (plural of alias?) in your .bashrc. Is the "ls -" one the only one in your .bashrc, or are there others there?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#15 2010-01-15 01:28:08

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED] No colors in urxvt, "alias" don't work

Obviously, your .bashrc is not treated properly when you start an interactive bash shell in urxvt.
Most likely your .bashrc is not read by bash. I needed to force this in my .bash_profile, like:

$ cat .bash_profile 
. $HOME/.bashrc

# Make sure the users bin directory will be searched in first place.
if [ -d $HOME/bin ]
then
    export PATH=$HOME/bin:$PATH
fi

Last edited by bernarcher (2010-01-15 01:28:55)


To know or not to know ...
... the questions remain forever.

Offline

#16 2010-01-15 02:01:26

Chokkan
Member
Registered: 2009-04-06
Posts: 129

Re: [SOLVED] No colors in urxvt, "alias" don't work

I also think it maybe something related to your .bash_profile. Do you have one, and what is in it?


< Daenyth> tomkx: my girlfriend is linux
< Daenyth> srsly
< Daenyth> she loves the way I «make install»
< Daenyth> all her /dev entries are mode 7 for me

Offline

#17 2010-01-15 08:49:23

flo08
Member
From: Poland
Registered: 2010-01-10
Posts: 25

Re: [SOLVED] No colors in urxvt, "alias" don't work

bernarcher wrote:

Obviously, your .bashrc is not treated properly when you start an interactive bash shell in urxvt.
Most likely your .bashrc is not read by bash. I needed to force this in my .bash_profile, like:

$ cat .bash_profile 
. $HOME/.bashrc

# Make sure the users bin directory will be searched in first place.
if [ -d $HOME/bin ]
then
    export PATH=$HOME/bin:$PATH
fi

yeah! smile now urxvt working correctly!

I've created the file ~/.bash_profile and pasted it

Thanks all:)

Offline

#18 2010-01-15 09:39:16

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: [SOLVED] No colors in urxvt, "alias" don't work

You may want to edit your first post and change the title to include "[SOLVED]" so others with the same problem will look here before making their own threads. Anyway, glad to hear you got it working and welcome again to the Arch forums big_smile

Offline

Board footer

Powered by FluxBB