You are not logged in.
Pages: 1
Can't change my user bash prompt color, while root prompt does work correctly and changes colors whenever I edit /root/.bashrc
My root and user .bashrc are identical except for the colors:
# Check for an interactive session
[ -z "$PS1" ] && return
alias ls='ls --color=auto'
#PS1='[\u@\h \W]\$ '
PS1='\[\e[1;33m\][\u @ \@ \w]\$ \[\e[0;32m\]'
#setup XIM environment, needn't if use SCIM as gtk-immodules
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export XMODIFIERS="@im=ibus"
What overrides my user ~/.bashrc PS1 colors?
.Xdefaults
! Xft settings ---------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
! xterm ----------------------------------------------------------------------
xterm*geometry: 120x40
!XTerm*faceName: xft:Dejavu Sans Mono:pixelsize=14
xterm*font: -xos4-terminus-medium-*-*-*-14-*-*-*-*-*-koi8-u
xterm*dynamicColors: true
xterm*utf8: 2
xterm*eightBitInput: true
xterm*saveLines: 512
xterm*scrollTtyKeypress: true
xterm*scrollTtyOutput: false
xterm*scrollBar: true
xterm*rightScrollBar: false
xterm*loginShell: true
xterm*jumpScroll: true
xterm*multiScroll: true
xterm*toolBar: false
xterm*background: #242424
xterm*foreground: #43D15F
Last edited by tasty_minerals (2011-08-26 10:09:49)
lenovo thinkpad EDGE 13'
Offline
PS1='\[\e[1;33m\][\u @ \@ \w]\$ \[\e[0;32m\]'
Produces yellow prompt and green input - is this what you wanted?
xterm*background: #242424
xterm*foreground: #43D15F
This determines xterm behavior wrt to font color.
Offline
PS1='\[\e[1;33m\][\u @ \@ \w]\$ \[\e[0;32m\]'
Produces yellow prompt and green input - is this what you wanted?
xterm*background: #242424 xterm*foreground: #43D15F
This determines xterm behavior wrt to font color.
ahh, yes, definitely, my bad.
thank you
lenovo thinkpad EDGE 13'
Offline
Actually that does work in any other terminal, except "xterm", xterm root coloring however works.
So, user bash prompt colors work in anything but "xterm".
Disabling background and foreground values in .Xdefaults do not help except for xterm turns b/w.
Xterm root coloring works right. Any ideas?
Last edited by tasty_minerals (2011-08-26 09:55:37)
lenovo thinkpad EDGE 13'
Offline
After disabling the xterm colors, have you sourced .Xdefaults again? Open a new xterm and try again. Disabling the colors fixes things here.
Offline
What do you mean "sourced"?
I did "xrdb -load .Xdefaults"
changed .bashrc values to PS1='\[\e[1;32m\][\u @ \@ \w]\$ \[\e[0;35m\]'
but xterm user colors font is black bg is white, while root colors correspond to PS1='\[\e[1;31m\][\u @ \@ \w]\$ \[\e[0;35m\]'
Other terminals work just fine, but I use xterm mostly. Hmmm
Last edited by tasty_minerals (2011-08-26 10:05:35)
lenovo thinkpad EDGE 13'
Offline
Sorry, I actually don't use .Xdefaults, I keep this stuff in .xinitrc.
You can create a file (I named it 'filename' here) with those pesky xterm colors and your PS1
[karol @ 12:06 ~]$ cat filename
xterm*background: #242424
xterm*foreground: #43D15F
PS1='\[\e[1;33m\][\u @ \@ \w]\$ \[\e[0;32m\]'
and run
. filename
Offline
well all works fine now, it seems like I somehow commented "!xterm*dynamicColors: true"
thanks
Last edited by tasty_minerals (2011-08-26 10:09:30)
lenovo thinkpad EDGE 13'
Offline
well all works fine now, it seems like I somehow commented "!xterm*dynamicColors: true"
I just wanted to ask you to comment it out, as I simply didn't know what it does ;P
Offline
tasty_minerals wrote:well all works fine now, it seems like I somehow commented "!xterm*dynamicColors: true"
I just wanted to ask you to comment it out, as I simply didn't know what it does ;P
I deleted .Xdefaults and recreated it with uncommented "xterm*dynamicColors: true" and it seems to run well now.
lenovo thinkpad EDGE 13'
Offline
Pages: 1