Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello,
I have installed fluxbox on my computer, but the xterm that comes with it only displays "bash-2.05b#". Does anyone know the command to make fluxbox display the location it is currently in.

Look in /etc/bashrc and/or /etc/profile to see what the setting is... Maybe one of the lines should look something like (one single line),
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
taurus

Hi taurus,
I looked into the /etc/profile using the cat command but there was no PROMT_COMMAND. Im kind of new to linux, so if you think I should add this command, could you please tell me the easiest way to do it.

Did you look in /etc/bashrc as well? You should see that line in /etc/bashrc and if not, add it at the end of that file by using a text editor,
pico /etc/bashrc
Save it and run this at the prompt,
source /etc/bashrc
taurus

I looked for the /etc/bashrc but it doesn't exist on my computer. Then I found a nice program (xedit) that let me easily add the lines of code to /etc/profile. I then ran source /etc/profile and it worked with errors on the new lines. It did however give me the hostname and location, so I went back and deleted the new lines. After running source /etc/profile again everything worked great and I got everything I needed. I guess that the code was written another way earlier, even though no place said PROMPT_COMMAND.
Unfortunately, every time I close xterm it forgets the source /etc/profile and goes back to the other bash-2.05b#. Is there a way to make this automatic?
Thanks again.

You need to create a .bashrc in your home directory, ~, that contains this line then,
xedit ~/.bashrc
source /etc/profileLog out completely and back in again. All the prompts should display the right setting now :)
taurus

Thank you so much. The xterm now opens right to these settings.
For others I used:
vi .bashrc (return)
(the letter i)source /etc/profile (esc)
:wq (return)I have just a few more quick questions and I really appriciate all your help. The xterm now starts up with a dumb quote and the font color for some of the files is really hard to see. If possible could you point out what I can delete to remove the quote and change the colors.
Here is /etc/profile :
# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.# Set the values for some environment variables:
export MINICOM="-c on"
export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man
export HOSTNAME="`cat /etc/HOSTNAME`"
export LESSOPEN="|lesspipe.sh %s"
export LESS="-M"# If the user doesn't have a .inputrc, use the one in /etc.
if [ ! -r "$HOME/.inputrc" ]; then
export INPUTRC=/etc/inputrc
fi# Set the default system $PATH:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games"# For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in
# the $PATH. Some means of connection don't add these by default (sshd comes
# to mind).
if [ "`id -u`" = "0" ]; then
echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
if [ ! $? = 0 ]; then
PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
fi
fi# I had problems using 'eval tset' instead of 'TERM=', but you might want to
# try it anyway. I think with the right /etc/termcap it would work great.
# eval `tset -sQ "$TERM"`
if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then
TERM=linux
fi# Set ksh93 visual editing mode:
if [ "$SHELL" = "/bin/ksh" ]; then
VISUAL=emacs
# VISUAL=gmacs
# VISUAL=vi
fi# Set a default shell prompt:
#PS1='`hostname`:`pwd`# '
if [ "$SHELL" = "/bin/pdksh" ]; then
PS1='! $ '
elif [ "$SHELL" = "/bin/ksh" ]; then
PS1='! ${PWD/#$HOME/~}$ '
elif [ "$SHELL" = "/bin/zsh" ]; then
PS1='%n@%m:%~%# '
elif [ "$SHELL" = "/bin/ash" ]; then
PS1='$ '
else
PS1='\u@\h:\w\$ '
fi
PS2='> '
export PATH DISPLAY LESS TERM PS1 PS2# Default umask. A umask of 022 prevents new files from being created group
# and world writable.
umask 022# Set up the LS_COLORS and LS_OPTIONS environment variables for color ls:
if [ "$SHELL" = "/bin/zsh" ]; then
eval `dircolors -z`
elif [ "$SHELL" = "/bin/ash" ]; then
eval `dircolors -s`
else
eval `dircolors -b`
fi# Notify user of incoming mail. This can be overridden in the user's
# local startup file (~/.bash.login or whatever, depending on the shell)
if [ -x /usr/bin/biff ]; then
biff y
fi# Append any additional sh scripts found in /etc/profile.d/:
for file in /etc/profile.d/*.sh ; do
if [ -x $file ]; then
. $file
fi
done# For non-root users, add the current directory to the search path:
if [ ! "`id -u`" = "0" ]; then
PATH="$PATH:."
fi

Just comment out those lines after LS_COLORS & LS_OPTIONS. And regarding the dumb quote, I believe the program that runs that is called fortune!!! Either rename it to something else or see which script file calls it...
taurus

Thanks again taurus,
Deleting those parameters after LS_COLORS & LS_OPTIONS made the colors go back to black and white. Also, after puttering around I finally found that the code that causes the fortune to run is actually in /etc/profile.d not /etc/profile. Hopefully someone will read this and not make the same mistakes I did, becuase I had corrupted the game pretty good and was getting some bad error messages after loading up.Thanks for all your help!

![]() |
SuSe Download
|
Sound drivers
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |