You are not logged in.
Pages: 1
hello,
in my ttys it work but in my gnome-terminal it dont show me the folder I am inside.
always only bash-3.2 or sh-3.2
but i want for example [me@host /usr/bin]$ like i know it from other distributions
some one any idea?
Thanks
Last edited by saf (2009-02-01 19:48:01)
Offline
You are probably logged in as root. echo $USER will display what user you are logged in as. How do you start X11?
urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand
Offline
run this in terminal
source /etc/profile
Offline
http://bbs.archlinux.org/viewtopic.php?id=1817 for all kinds of ideas and
http://wiki.archlinux.org/index.php/Color_Bash_Prompt for more info.
Offline
hi
@lexion i start X11 over gdm as daemon in rc.conf
Hi Vladman,
thats almost great,
it shows the folder where i am but not the full path. is this possible?
Is it possible to let terminator or gnome-terminal run this command automatically when i start it?
hi xalviax, thanks for this links its interesting
Offline
i want for example [me@host /usr/bin]$ like i know it from other distributions
paste this in ~/.bashrc
PS1='\u@\h [\w]\$ '
Offline
This is my method, in $HOME/.bashrc:
TTY=$(basename $(tty))
HOSTNAME=$(hostname)
export PS1="\n$HOSTNAME - $LOGNAME ($TTY) [$SHLVL] - \$PWD\n> "
Mektub
Follow me on twitter: https://twitter.com/johnbina
Offline
The PS1 environment variable controls that, as you've probably seen from the others. Googling can provide more info on customizing it, as well as man pages.
Also, the whereami command should say - well, it's obvious.
Last edited by Ranguvar (2009-02-02 16:00:56)
Offline
hi guys
cool I didnt know u can modify it so much, i choosed this, based on the code from Mektub, without \n like biagio did
export PS1="[\u@\h \$PWD]$ "
and in /root/ i put same .bashrc exept with a # instead of the $ at the end
thanks
Last edited by saf (2009-02-02 13:42:19)
Offline
export PS1="[\u@\h \$PWD][b]$[/b] "
and in /root/ i put same .bashrc exept with a # instead of the $ at the end
$ and \$ are not the same thing.
if you are root, \$ returns "#" in the prompt
if you are <user>, \$ returns "$"
Last edited by biagio (2009-02-02 14:10:26)
Offline
You should make a symbolic link .bash_profile -> .bashrc
Do that for example for the root user, normally tty will be ok but when you do su in gnome,
you will get bash-3.2 because .bashrc doesn't get sourced.
Last edited by jordz (2009-02-02 14:07:54)
Offline
ah okay it makes the change between # and $ automatically
i made now
PS1='\n[\u@\h \w]\$ '
@symlink
u mean ln -s .bashrc .bash_profile in home and /root/
Last edited by saf (2009-02-02 14:18:14)
Offline
@symlink
u mean ln -s .bashrc .bash_profile in home and /root/
Yes for every user you want to fix this problem.
Normally .bash_profile sources .bash_rc, but it doesn't work when you su in X to a different user.
If you want the same bash settings in tty and X ,that's the easiest way to fix this.
Offline
okay i did
ty
Offline
Pages: 1