Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting my linux console 'just perfect'
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Negated Void
l33t
l33t


Joined: 25 Dec 2002
Posts: 672

PostPosted: Sun May 18, 2003 7:34 pm    Post subject: Getting my linux console 'just perfect' Reply with quote

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
View user's profile Send private message
red_over_blue
Guru
Guru


Joined: 16 Dec 2002
Posts: 310

PostPosted: Sun May 18, 2003 7:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
gigel
Guru
Guru


Joined: 14 Jan 2003
Posts: 369
Location: .se/.ro

PostPosted: Sun May 18, 2003 7:40 pm    Post subject: Reply with quote

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
:D
Back to top
View user's profile Send private message
perry
Tux's lil' helper
Tux's lil' helper


Joined: 18 Nov 2002
Posts: 142
Location: Cornfields of Indiana

PostPosted: Sun May 18, 2003 11:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum