You are not logged in.

#1 2009-03-12 22:18:35

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 697

[SOLVED]Problem with bash

OK I have a strange problem which probably started with me trying to get locale and KDE4.2.1 to work properly.
Anyway when I use Konsole or Yakuake it doesn't show the common [user@hostname] but instead is shows: bash-3.2.
Just like this:
bash.th.png

The question is what's easier:
To repair this in current user,
can I repair with skeleton (.skel)?
or to add a new user copy documents of my current user and rename the new user to my user?
As it does work correctly with a new user.

And also if anyone knows what made this happen I would appreciate it.

I suspect that reinstalling of KDE (which was not dome for the first time) had something to do with it, or maybe de deletion of every dot file I had.

Last edited by Primoz (2009-03-12 22:35:23)


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#2 2009-03-12 22:26:39

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: [SOLVED]Problem with bash

Its your PS1 in your .bashrc


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#3 2009-03-12 22:32:10

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: [SOLVED]Problem with bash

Nothing was sourced that sets your PS1 variable. Things that should get sourced:
/etc/profile <- global stuff, it itself sources some other things that are important
~/.bashrc <- custom settings

What happens when you start bash: (please read man bash "edit: section INVOCATION")
it is a login shell <- /etc/profile, ~/.bash_profile
it is not a login shell <- ~/.bashrc

So people tend to use login shells, and put "source ~/.bashrc" in their ~/.bash_profile

It seems that you started a non-login shell, and don't have a .bashrc

Either make a .bashrc that also sources /etc/profile, or start using login shells.

Last edited by Procyon (2009-03-13 14:42:58)

Offline

#4 2009-03-12 22:35:04

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 697

Re: [SOLVED]Problem with bash

Yeah it was the lack of PS1 or .bash_profile and .bashrc that made it that way I solved it now.
Sorry for bothering you.


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#5 2009-03-12 22:35:53

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: [SOLVED]Problem with bash

Primoz wrote:

Sorry for bothering you.

It is never a bother.


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#6 2009-03-12 22:47:15

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: [SOLVED]Problem with bash

By the way, try out 'shopt login_shell'

Offline

#7 2009-03-12 23:06:23

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 697

Re: [SOLVED]Problem with bash

Procyon wrote:

By the way, try out 'shopt login_shell'

I'm nt sure what it does. But it says that login_shel is off.
If I write only shopt I get the this list:

 shopt                         
cdable_vars     off                              
cdspell         off                              
checkhash       off                              
checkwinsize    off                              
cmdhist         on                               
compat31        off                              
dotglob         off                              
execfail        off                              
expand_aliases  on                               
extdebug        off                              
extglob         off                              
extquote        on                               
failglob        off                              
force_fignore   on                               
gnu_errfmt      off                              
histappend      off                              
histreedit      off                              
histverify      off                              
hostcomplete    on                               
huponexit       off                              
interactive_comments    on                       
lithist         off                              
login_shell     off                              
mailwarn        off
no_empty_cmd_completion off
nocaseglob      off
nocasematch     off
nullglob        off
progcomp        on
promptvars      on
restricted_shell        off
shift_verbose   off
sourcepath      on
xpg_echo        off

But I have no idea how to change something from off to on or vice versa.


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#8 2009-03-13 00:38:01

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED]Problem with bash

shopt is documented in info bash, section Bash Builtins


To know or not to know ...
... the questions remain forever.

Offline

#9 2009-03-13 14:17:41

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 697

Re: [SOLVED]Problem with bash

bernarcher wrote:

shopt is documented in info bash, section Bash Builtins

Thanks! That's all I need to know. Will take a look at it.


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#10 2009-03-13 20:57:01

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497
Website

Re: [SOLVED]Problem with bash

I got this wink

PS1="\u\[\e[0;36m\]@\[\e[0m\]\h \[\e[01;31m\]\W\[\e[0;36m\e[0m\]\$ ";
(a example of colorful bash prompt)


good luck


If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.

Offline

Board footer

Powered by FluxBB