You are not logged in.
Pages: 1
Hi, I have a little problem and is very ....... strange
In console my prompt looks like :
;root@Depto:~[11:39][root@Depto ~]#
and in a terminal just;
[11:39][root@Depto ~]#
my PS1 is
PS1='[`date +'%H:%M'`][[33[01;31m]u[33[37m]@[33[01;34m]h[33[32m] w[33[00m]]$ '
and I don't know why..... please help, is not a big deal, but it noise me
thanks
Offline
I don't understand the problem... do you want the prompt to look like this? Do you want a different prompt?
Offline
Make sure your $TERM is set to 'linux' when in the console (if you change it manually then you need to restart bash too to fix your prompt).
Offline
I don't understand the problem... do you want the prompt to look like this? Do you want a different prompt?
the problem is the first part of the prompt in console i.e. ";root@Depto:~"
only in console, not in terminal
other....
TERM=xterm-color in both, term & console
last notice.....
when i do a ssh login to others machines (in console) I get the same promt
like: ;carlos@FIREWALL:~[carlos@FIREWALL carlos]$
and in the local machine ";carlos@FIREWALL:~" don't exist
I DON' LIKE THIS ";carlos@FIREWALL:~"
Offline
could it be some problem with a double ps1 declaration,
both in /etc/profile ansd someplace else like ~/.bashrc
arch + gentoo + initng + python = enlisy
Offline
I think the order is:
~/.bashrc and then /etc/profile
could you post your
echo $PS1
from both console and terminal?
Offline
*hint*
Make sure your $TERM is set to 'linux' when in the console
*hint*
Offline
I think you should take the hint CarLost. incidentally i3839, (and this is purely because I want to learn), how is it normally done? I mean how does the system know to set $TERM to linux in a console and xterm or rxvt or something like that in a terminal? (termcap?)
Offline
*hint*
i3839 wrote:Make sure your $TERM is set to 'linux' when in the console
*hint*
I already do that! but don't work
the .bashrc should not pass trough a ssh login...... I repeat, that is only in console, not in terminal
I check env (& set) both (console& term) & are the same, are equals
My $PS1 are in the first post
Offline
i3839 wrote:*hint*
i3839 wrote:Make sure your $TERM is set to 'linux' when in the console
*hint*
I already do that! but don't work
the .bashrc should not pass trough a ssh login...... I repeat, that is only in console, not in terminal
I check env (& set) both (console& term) & are the same, are equals
My $PS1 are in the first post
he's not saying they should be the same...
in a previous post you stated they were both "xterm-color".... i3839 is saying you need to switch from "xterm-color" to "linux"
Offline
he's not saying they should be the same...
in a previous post you stated they were both "xterm-color".... i3839 is saying you need to switch from "xterm-color" to "linux"
OK I repeat, I do this... and restart .bashrc ..... even I reboot the system and get the same result
I have ArchLinux at work too and there I don't have that problem....
I still looking for an answer in other places to.... just in case
Offline
ok post your PS1 contents from all the following files, if they exist:
/etc/profile
~/.bashrc
~/.bash_profile
~/.profile
Offline
how does the system know to set $TERM to linux in a console and xterm or rxvt or something like that in a terminal? (termcap?)
Normally the terminal program should be smart enough to know it's own termname, but somehow Arch's rxvt version isn't (can't remember having this problem with another rxvt version). So how to work around this issue is just a matter of creativity. Simplest would be to always call e.g. rxvt with the -tn option, or to set the termName X resource setting to "rxvt", can also set other things there, e.g.
In ~/.Xdefaults:
rxvt.termName: rxvt
rxvt.background: black
rxvt.foreground: white
Offline
ok post your PS1 contents from all the following files, if they exist:
/etc/profile
~/.bashrc
~/.bash_profile
~/.profile
OK!!!!!! I fix the problemmmmmmm
realy thanks to everyone
the proble was a line in /etc/profile
if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o "$TERM" = "rxvt" ]; then
PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}07"'
fi
maybe I put my fingers there
I just unset and done...... THANKS
Offline
that's the problem that i3839 had pointed out earlier:
the PROMPT_COMMAND variable is pushed on the front of PS1 - in an xterm/rxvt/aterm/whatever this is parsed and set to the window title... in a real terminal it is not parsed and is output instead.... as the if statement above the command states, it only uses it for the right terminals.... if your console was set to "linux" it would not hit inside that if statement and PROMPT_COMMAND would not exist...
Offline
that's the problem that i3839 had pointed out earlier:
the PROMPT_COMMAND variable is pushed on the front of PS1 - in an xterm/rxvt/aterm/whatever this is parsed and set to the window title... in a real terminal it is not parsed and is output instead.... as the if statement above the command states, it only uses it for the right terminals.... if your console was set to "linux" it would not hit inside that if statement and PROMPT_COMMAND would not exist...
Ok, just abobe the PROMPT_COMMAND line I found an export TERM=xterm-color, thats is because I get the problem
I don't know the PROMPT_C... is for the windows title before
Thanks a lot
Offline
Pages: 1