LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-04-2003, 01:15 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,673

Rep: Reputation: 55
Starting terminal problem


Hi all folk,

On starting 'terminal' (console window) it popup

bash-2.05b$

not as
satimis@localhost satimis>$

Kindly advise how to fix it

Thanks

B.R
satimis
 
Old 10-04-2003, 01:36 AM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
here are my bashrc files, modify for your distro, I have no idea what you are using





/home/user/.bashrc

# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

/etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

# by default, we want this to get set.
# Even for non-interactive, non-login shells.
if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
umask 002
else
umask 022
fi

# are we an interactive shell?
if [ "$PS1" ]; then
if [ -x /usr/bin/tput ]; then
if [ "x`tput kbs`" != "x" ]; then # We can't do this with "dumb" terminal
stty erase `tput kbs`
elif [ -x /usr/bin/wc ]; then
if [ "`tput kbs|wc -c `" -gt 0 ]; then # We can't do this with "dumb" terminal
stty erase `tput kbs`
fi
fi
fi
case $TERM in
xterm*)
if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
else
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
fi
;;
screen)
if [ -e /etc/sysconfig/bash-prompt-screen ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
else
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"'
fi
;;
*)
[ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
;;
esac
# Turn on checkwinsize
shopt -s checkwinsize
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "

if [ "x$SHLVL" != "x1" ]; then # We're not a login shell
for i in /etc/profile.d/*.sh; do
if [ -r "$i" ]; then
. $i
fi
done
fi
fi
# vim:ts=4:sw=4



What you need to do is set PS1
 
Old 10-04-2003, 12:50 PM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,673

Original Poster
Rep: Reputation: 55
Quote:
Originally posted by DavidPhillips
here are my bashrc files, modify for your distro, I have no idea what you are using

/home/user/.bashrc

# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

/etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

# by default, we want this to get set.
# Even for non-interactive, non-login shells.
if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
umask 002
else
umask 022
fi

# are we an interactive shell?
if [ "$PS1" ]; then
if [ -x /usr/bin/tput ]; then
if [ "x`tput kbs`" != "x" ]; then # We can't do this with "dumb" terminal
stty erase `tput kbs`
elif [ -x /usr/bin/wc ]; then
if [ "`tput kbs|wc -c `" -gt 0 ]; then # We can't do this with "dumb" terminal
stty erase `tput kbs`
fi
fi
fi
case $TERM in
xterm*)
if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
else
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
fi
;;
screen)
if [ -e /etc/sysconfig/bash-prompt-screen ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
else
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"'
fi
;;
*)
[ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
;;
esac
# Turn on checkwinsize
shopt -s checkwinsize
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "

if [ "x$SHLVL" != "x1" ]; then # We're not a login shell
for i in /etc/profile.d/*.sh; do
if [ -r "$i" ]; then
. $i
fi
done
fi
fi
# vim:ts=4:sw=4

What you need to do is set PS1
Hi,

Thanks for your advice.

I could not find /home/satimis/.bashrc

There is a file /home/satimis/.bash_history
# cat /home/satimis/.bash_history
yes
su -
su -
ssh -X root@localhost
echo PS1
echo $PS1
su -
echo $PS1
su -
su -
echo $PS1
echo $PS1
Firebird
echo $PS1
thunderbird
su -
su -
echo $PS1
cat /etc/bashrc

bash-2.05b$ echo $PS1
\s-\v\$

I could not find the abovementioned line on /etc/bashrc

$ cat /etc/bashrc
......
shopt -s checkwinsize
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
......

I have another RH8.0 box running without problem. I compared /etc/bashrc of these 2 boxes and found the above line looking the same. Can I copy /etc/bashrc of RH8.0 to RH9.0. Their hardware configurations are different.

B..R.
satimis
 
Old 10-06-2003, 12:42 PM   #4
unworthy
LQ Newbie
 
Registered: Sep 2003
Distribution: Ubuntu
Posts: 4

Rep: Reputation: 0
I would say to try commenting out ( with a # before the line ) the line in your .bashrc and add one below it like PS1="\u@\h:\w$ ". You can always change it back if you want.
 
Old 10-06-2003, 01:32 PM   #5
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
If it doesn't exist you can create .bashrc
here's the important stuff in my .bashrc:

# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
PS1="[\u@\h \w]--> "
 
Old 10-07-2003, 06:48 AM   #6
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,673

Original Poster
Rep: Reputation: 55
Quote:
Originally posted by Blinker_Fluid
If it doesn't exist you can create .bashrc
here's the important stuff in my .bashrc:

# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
PS1="[\u@\h \w]--> "
Hi Blinker_Fluid,

Thanks for your advice.

Could I only copy those 6 (six) lines onto the file created and save the file to /home/satimis/.bashrc

Thanks in advance.

B.R.
satimis
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting Fedora in the terminal TheDude611 Fedora 8 10-02-2008 07:18 AM
Terminal cmd for starting Matlab M-file editor without starting matlab fubzot Linux - Software 2 02-15-2005 07:49 AM
Starting services from terminal ExploiT Linux - General 4 09-18-2004 11:04 PM
Starting program with terminal TazLinux Linux - General 8 02-26-2003 08:16 AM
Starting a forking program in terminal Ztyx Linux - General 2 11-09-2002 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration