View previous topic :: View next topic |
Author |
Message |
Negated Void l33t
Joined: 25 Dec 2002 Posts: 672
|
Posted: Sun May 18, 2003 7:34 pm Post subject: Getting my linux console 'just perfect' |
|
|
Sorry to ask a million questions.
In KDE i have the 'linux console' little button on my panel. It opens a console w/ the black background and the console font and all that jazz. But my prompt is bash-2.05b, instead of the proper where i am/what computer i'm on one. I can get it by doing a source /etc/profile.
How do i get it to always just have the cool prompt?
Thanks!
-Matt |
|
Back to top |
|
|
red_over_blue Guru
Joined: 16 Dec 2002 Posts: 310
|
Posted: Sun May 18, 2003 7:38 pm Post subject: |
|
|
Put the following in .bashrc in your home directory
Code: |
# Change the window title of X terminals
case $TERM in
xterm*|rxvt|eterm)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$ HOME/~}\007"'
;;
screen)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HO ME/~}\033\\"'
;;
esac
# Setup prompt colors
export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
|
and this in .bash_profile, also in your home directory
Code: |
# /etc/skel/.bash_profile:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/skel/.bash_profile,v 1.10 2002/11/18 19:39:22 azarah Exp $
#This file is sourced by bash when you log in interactively.
[ -f ~/.bashrc ] && . ~/.bashrc
|
Last edited by red_over_blue on Sun May 18, 2003 7:41 pm; edited 1 time in total |
|
Back to top |
|
|
gigel Guru
Joined: 14 Jan 2003 Posts: 369 Location: .se/.ro
|
Posted: Sun May 18, 2003 7:40 pm Post subject: |
|
|
Code: | (~)$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
[ -r ~/.bashrc ] && source ~/.bashrc
. ~/.bashrc
# User specific environment and startup programs
PATH=$PATH
export PATH
unset USERNAME
(~)$ cat .bashrc
[ -r /etc/profile] && source /etc/profile
#color for ls
eval `dircolors -b /etc/DIR_COLORS`
alias ls="ls --color=auto"
alias ll="ls --color -l"
|
this may help you _________________ $emerge sux
|
|
Back to top |
|
|
perry Tux's lil' helper
Joined: 18 Nov 2002 Posts: 142 Location: Cornfields of Indiana
|
Posted: Sun May 18, 2003 11:59 pm Post subject: |
|
|
If the button is running konsole, you can change it execute "konsole -ls" which will make it open up with a login shell environment. |
|
Back to top |
|
|
|