Jump to content

Information Trouble In The Console... [solved]


Recommended Posts

When you run the console it tells you where you are mounted an which user you are logged in as... well, not for me it don't. All I get is 'bash-3.00$'.

 

as an eksample I'm installing alpha centauri

 

bash-3.00$ su
Password:
bash-3.00# cd /mnt/cdrom
bash-3.00# sh setup.sh
Loki Update Tool not found, running installation program

 

the console it self works but I dont get to know the mounting points or which user I'm using the console for...

 

This is annoying! It's probobly my fault, dough. I think it has with the fact that i deletet the 'tmp' folder in the home directory.

 

Please help

Edited by kimothy
Link to comment
Share on other sites

actually i had the same thing in my mdk 10.1 installation. but it's nothing system critical and not your fault. it works again with le2005.

 

i know that there is a way round in 10.1 to solve this problem but i must admit that i don't remember which files needed some hacking.

Link to comment
Share on other sites

It sounds like you are referring to the PS1 environment variable.

 

See: http://www.zone-h.org/files/48/Extending%2...sh%20Prompt.txt

 

To see what your setting is, from a terminal, execute command: set | grep PS1

 

On my LE2005 system, it's: PS1='[\u@\h \W]\$ '

 

\u = user

\h = host

\W = working dir

 

I haven't changed it since I installed LE2005.

 

Also see: man bash

Edited by jboy
Link to comment
Share on other sites

I tried what you sead, jboy. this was my response...

 

bash-3.00$  set | grep PS1

PS1='\s-\v\$ '

OK, so enter this in a console: export PS1='[\u@\h \W]\$ '

 

That should give you the original prompt that you had when you installed LE2005. If you like it, you can add that command to the .bashrc file in your home directory.

 

Something must have changed your original prompt in some script file somewhere; perhaps in this .bashrc file in your home directory or /etc/bashrc. You might want to poke around to see where.

 

If you want to play with different possibilities for your prompt, check the web links in my original message above.

Edited by jboy
Link to comment
Share on other sites

OK, so enter this in a console: export PS1='[\u@\h \W]\$ '

 

That should give you the original prompt that you had when you installed LE2005. If you like it, you can add that command to the .bashrc file in your home directory.

 

Something must have changed your original prompt in some script file somewhere; perhaps in this .bashrc file in your home directory or /etc/bashrc. You might want to poke around to see where.

 

If you want to play with different possibilities for your prompt, check the web links in my original message above.

 

I did what you sead, but it did not help me much. Her a copy of what the console sead and whats in the file

 

# /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
   case $TERM in
xterm*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
  ;;
*)
  ;;
   esac
   [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
   
   if [ -z "$loginsh" ]; then # We're not a login shell
       for i in /etc/profile.d/*.sh; do
    if [ -x $i ]; then
        . $i
    fi
done
   fi
fi

[CODE]unset loginsh

 

bash-3.00$ export PS1='[\u@\h \W]\$
>

the next time I enter i get the 'bash-3.00$' again...

 

as for the .bash.rc in the home directory. I have no such file...

If it was should be in the tmp directory, well then it's gone...

 

Thanks for the help so far, dough

Edited by kimothy
Link to comment
Share on other sites

Guest Adriano1

export like that works only for the current session.

 

The file you have to have in your home directory (or you can create if it doesn't exist) is .bashrc, not .bash.rc.

 

add the export command you've been given to that file and it should work.

Link to comment
Share on other sites

Why do you get the "bash-3.00$"? THe answer is simple: because it is not a "login" shell (sounds confusing, though.)

If you run "bash --login", a normal prompt should usually pop up. If not, _then_ you can tweak on PS1. And if you login from tty1 _and_ get bash-3.00$ instead of "\A \h:\w > " (or similar) for PS1, then something is wrong.

Link to comment
Share on other sites

Why do you get the "bash-3.00$"? THe answer is simple: because it is not a "login" shell (sounds confusing, though.)

If you run "bash --login", a normal prompt should usually pop up. If not, _then_ you can tweak on PS1. And if you login from tty1 _and_ get bash-3.00$ instead of "\A \h:\w > " (or similar) for PS1, then something is wrong.

 

bash-3.00$ bash --login
bash-3.00$

 

As you see it did not change my prompt... How do you make tweak on PS1?

 

jboy told me to do this, but I was greek to me...

 

 

login from tty1

 

I dont know what tty 1 is... so that I have not tried.

I want to thank everyone who has tried to help me by replying. THANK YOU

Edited by kimothy
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...